[llvm] r185754 - Stop putting operations after a tail call.
Tim Northover
t.p.northover at gmail.com
Sun Jul 7 10:35:10 PDT 2013
Hi Duncan,
> What I'm imagining (it may be crazy) is that some
> targets might still generate a call for the tail call, and just use the
> tail-callness to avoid setting up parameters again.
So a sort of reverse-tail call, where the savings are in the callee
rather than the caller, and the caller still has to destroy its frame?
Interesting.
I don't think that fits with what SelectionDAG refers to as a tail
call, even before my change. Quite some effort is made not to put
anything after a tail call (or other block terminator, they're largely
treated equivalently), and I think that's mostly why the generic DAG
code even knows or cares about their existence.
Just one edge case was missed as far as I'm aware (a true tail call
from the entry basic block when FastISel is notionally enabled but
doesn't actually exist).
I'd probably model that scenario as a normal call from the caller's
perspective, setting some MachineFunctionInfo flags to control
prologue and epilogue as appropriate.
Cheers.
Tim.
More information about the llvm-commits
mailing list