diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-05 01:29:28 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-05 01:29:28 +0000 |
commit | f9bbcd1afd24110b4b90f31779d95b16c58e2f69 (patch) | |
tree | 3df7deb507877d684ce8053d0208d01f6199f61e /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h | |
parent | cdb125ce66bc3cc911abcf132239b01cdd2ca442 (diff) | |
download | bcm5719-llvm-f9bbcd1afd24110b4b90f31779d95b16c58e2f69.tar.gz bcm5719-llvm-f9bbcd1afd24110b4b90f31779d95b16c58e2f69.zip |
Major calling convention code refactoring.
Instead of awkwardly encoding calling-convention information with ISD::CALL,
ISD::FORMAL_ARGUMENTS, ISD::RET, and ISD::ARG_FLAGS nodes, TargetLowering
provides three virtual functions for targets to override:
LowerFormalArguments, LowerCall, and LowerRet, which replace the custom
lowering done on the special nodes. They provide the same information, but
in a more immediately usable format.
This also reworks much of the target-independent tail call logic. The
decision of whether or not to perform a tail call is now cleanly split
between target-independent portions, and the target dependent portion
in IsEligibleForTailCallOptimization.
This also synchronizes all in-tree targets, to help enable future
refactoring and feature work.
llvm-svn: 78142
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h index bebe5ca1aaa..379ced966fa 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuild.h @@ -363,13 +363,20 @@ public: /// GFI - Garbage collection metadata for the function. GCFunctionInfo *GFI; + /// HasTailCall - This is set to true if a call in the current + /// block has been translated as a tail call. In this case, + /// no subsequent DAG nodes should be created. + /// + bool HasTailCall; + LLVMContext *Context; SelectionDAGLowering(SelectionDAG &dag, TargetLowering &tli, FunctionLoweringInfo &funcinfo, CodeGenOpt::Level ol) : CurDebugLoc(DebugLoc::getUnknownLoc()), - TLI(tli), DAG(dag), FuncInfo(funcinfo), OptLevel(ol), + TLI(tli), DAG(dag), FuncInfo(funcinfo), OptLevel(ol), + HasTailCall(false), Context(dag.getContext()) { } |