diff options
| author | Dan Gohman <gohman@apple.com> | 2010-04-19 18:41:46 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-04-19 18:41:46 +0000 |
| commit | a91754da6797f1a4139612179406410c8675aceb (patch) | |
| tree | 6b43e53580b78b82f2eec02d6cca87b0056d7502 /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h | |
| parent | 5c6525fbee380fbd04c24b581b7662fdd495d855 (diff) | |
| download | bcm5719-llvm-a91754da6797f1a4139612179406410c8675aceb.tar.gz bcm5719-llvm-a91754da6797f1a4139612179406410c8675aceb.zip | |
Move isInTailCallPosition out of SelectionDAGBuilder, as it isn't
SelectionDAG-specific.
llvm-svn: 101801
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h index 34c8da62f7f..0d9af1a9bf3 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h @@ -24,6 +24,7 @@ #endif #include "llvm/CodeGen/ValueTypes.h" #include "llvm/CodeGen/ISDOpcodes.h" +#include "llvm/Support/CallSite.h" #include <vector> namespace llvm { @@ -166,6 +167,15 @@ ISD::CondCode getFCmpCondCode(FCmpInst::Predicate Pred); /// ISD::CondCode getICmpCondCode(ICmpInst::Predicate Pred); +/// Test if the given instruction is in a position to be optimized +/// with a tail-call. This roughly means that it's in a block with +/// a return and there's nothing that needs to be scheduled +/// between it and the return. +/// +/// This function only tests target-independent requirements. +bool isInTailCallPosition(ImmutableCallSite CS, Attributes CalleeRetAttr, + const TargetLowering &TLI); + } // end namespace llvm #endif |

