aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-16 01:42:28 +0000
committerDan Gohman <gohman@apple.com>2008-09-16 01:42:28 +0000
commit5ea89a04a96691210f0ad8e56ad6a91bae8e5f82 (patch)
tree805ac0b0e0259fbd40e34c9a51c8c76468310df9 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parent78a38db4ab6b5212a2392c4980eb7ca8c14ec45e (diff)
downloadexternal_llvm-5ea89a04a96691210f0ad8e56ad6a91bae8e5f82.zip
external_llvm-5ea89a04a96691210f0ad8e56ad6a91bae8e5f82.tar.gz
external_llvm-5ea89a04a96691210f0ad8e56ad6a91bae8e5f82.tar.bz2
Don't take the time to CheckDAGForTailCallsAndFixThem when tail calls
are not enabled. Instead just omit the tail call flag when calls are created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index fa17510..140bad2 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -526,7 +526,8 @@ void SelectionDAGISel::SelectBasicBlock(BasicBlock *LLVMBB,
// with correct tailcall attribute so that the target can rely on the tailcall
// attribute indicating whether the call is really eligible for tail call
// optimization.
- CheckDAGForTailCallsAndFixThem(*CurDAG, TLI);
+ if (PerformTailCallOpt)
+ CheckDAGForTailCallsAndFixThem(*CurDAG, TLI);
// Final step, emit the lowered DAG as machine code.
CodeGenAndEmitDAG();