This is the mail archive of the gcc@gcc.gnu.org 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]

Re: [tree-ssa] Gimple and tail calls


On Fri, Nov 07, 2003 at 11:50:40PM +0100, Jan Hubicka wrote:
> I would like to ask for opinions on representation.  I've added an new
> flag to CALL_EXPR (CALL_EXPR_TAILCALL) signalizing calls that can be
> converted to tail calls and the tail recognizer updates CFG in a way we
> do for tail calls in GCC (removing edges out of CFG, adding abnormal
> sibcall edge to exit).

No.  CALL_EXPR_TAILCALL can only mean that there are no external
dataflow reasons that the tail call might fail.  Conversion to
tailcall can still fail for target-specific reasons.

I expect these to mostly due to parameter passing.  Either not
enough stack space for the called function's parameters, or
strange parameter overlap.  Other ABI bits can be checked earlier.

> The actual problem is that some tail calls returns return value of
> CALL_EXPR, while other do not (either because function return NULL or
> undefined value).

So?  Why is this a problem?

> TO represnet this I can nest CALL_EXPR with CALL_EXPR_TAILCALL inside
> RETURN_EXPR.  Does this sound like sane extension of GIMPLE?

No.


r~


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