On 1/5/2015 1:51 PM, Jakub Jelinek wrote:
So isn't the right replacement for the target hook H.J. wanted to add
the HARD_FRAME_POINTER_IS_ARG_POINTER macro?
If argp is not hfp, then the stores through argp are not considered
to be based on the frame pointer, if it is the same thing, such as on PA,
then indeed sibcall stack argument stores are frame related.
You could also add a !reload_completed to that, after RA frame_read is
how this is handled.

       /* Arguments for a sibling call that are pushed to memory are passed
          using the incoming argument pointer of the current function.  If
         argument pointer is the hard frame pointer, then treat sibling
         calls as wild reads before reload; after reload frame_read flag
         should take care of this.  */
       if (HARD_FRAME_POINTER_IS_ARG_POINTER
          && SIBLING_CALL_P (insn)
          && !reload_completed)
         {
           add_wild_read (bb_info);
           return;
         }

?
I think there may be one situation after reload that's not handled
by the above.  frame_read is only used for const calls.  What about
the situation where we have a non const sibcall and the frame pointer
isn't eliminated?

Dave

--
John David Anglin    dave.ang...@bell.net

Reply via email to