summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-11-10 04:13:31 +0000
committerNadav Rotem <nrotem@apple.com>2013-11-10 04:13:31 +0000
commit5ba1c6ced8071108c5c62f6ccb4450e392d94e1d (patch)
treeeb037cd13a1e4ee5ab107cd9ed9eb5ea95c943fd /llvm/lib/Transforms/Utils/SimplifyCFG.cpp
parentb12f2f3b6043fc5fdf5b22d12dc73a2ea100911b (diff)
downloadbcm5719-llvm-5ba1c6ced8071108c5c62f6ccb4450e392d94e1d.tar.gz
bcm5719-llvm-5ba1c6ced8071108c5c62f6ccb4450e392d94e1d.zip
SimplifyCFG has a heuristics for out-of-order processors that decides when it is worthwhile to merge branches. It tries to estimate if the operands of the instruction that we want to hoist are ready. This commit marks function arguments as 'ready' because they require no calculation. This boosts libquantum and a few other workloads from the testsuite.
llvm-svn: 194346
Diffstat (limited to 'llvm/lib/Transforms/Utils/SimplifyCFG.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/SimplifyCFG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index 1398697dc55..d36d9dc1b96 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -2096,7 +2096,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI) {
for (Instruction::op_iterator OI = BonusInst->op_begin(),
OE = BonusInst->op_end(); OI != OE; ++OI) {
Value *V = *OI;
- if (!isa<Constant>(V))
+ if (!isa<Constant>(V) && !isa<Argument>(V))
UsedValues.insert(V);
}
OpenPOWER on IntegriCloud