This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]


     Morning all!

  Sorry to bore everyone with old-fashioned 3.x stuff :) but I was just
wondering if there's a little loophole here that I may have fallen into?

     A C expression that evaluates to true if it is ok to perform a
     sibling call to DECL from the current function.

     It is not uncommon for limitations of calling conventions to
     prevent tail calls to functions outside the current unit of
     translation, or during PIC compilation.  Use this macro to enforce
     these restrictions, as the `sibcall' md pattern can not fail, or
     fall over to a "normal" call.

  As I understand it, stack frame layout is iteratively converged on in a
process that repeatedly calls I_F_P_O, and the final frame size isn't known
for sure until the final iteration of this process, yes?

  However F_O_F_S is called much earlier on in function compilation, before
I_F_P_O is even called once.

  So, what if the decision it needs to make depends on the stack frame size of
the current function?  The comment above suggests that we can't say OK to it
now and refuse to match the sibcall_epilog pattern later by testing in the
pattern condition whether the stack frame size is in range and refusing to
match if so, as it says we can't fall back.  And we can't test this condition
at F_O_F_S time, because the stack frame size is still unknown.

  Is this right?  Is get_frame_size() valid at F_O_F_S time, so that we can at
least take a best-guess at the final frame size?

Can't think of a witty .sigline today....

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]