summaryrefslogtreecommitdiff
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
commit1937e2f6ca0e6a04c4ad5fdb5b606b5ed9533e74 (patch)
tree805ac0b0e0259fbd40e34c9a51c8c76468310df9 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parentc7e42fd5b2edf6f72910addc1466bae5f36744e7 (diff)
downloadllvm-1937e2f6ca0e6a04c4ad5fdb5b606b5ed9533e74.tar.gz
llvm-1937e2f6ca0e6a04c4ad5fdb5b606b5ed9533e74.tar.bz2
llvm-1937e2f6ca0e6a04c4ad5fdb5b606b5ed9533e74.tar.xz
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 fa175109e9..140bad27f5 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();