diff options
author | Nadav Rotem <nrotem@apple.com> | 2013-11-10 04:13:31 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2013-11-10 04:13:31 +0000 |
commit | 30150a128c7b2488225331417153ccec75bac65c (patch) | |
tree | 9dda8d3f33330407319195c979403e9202b568e2 /lib/Transforms | |
parent | 20f1fe5c50c1a8ea69e635b4928c7f46e10c8cac (diff) | |
download | external_llvm-30150a128c7b2488225331417153ccec75bac65c.zip external_llvm-30150a128c7b2488225331417153ccec75bac65c.tar.gz external_llvm-30150a128c7b2488225331417153ccec75bac65c.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index 1398697..d36d9dc 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/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); } |