summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/JumpThreading.cpp
diff options
context:
space:
mode:
authorEli Bendersky <eliben@google.com>2014-03-17 16:19:07 +0000
committerEli Bendersky <eliben@google.com>2014-03-17 16:19:07 +0000
commit576ef3c66764a45249780f068bbd5e41c9cb21d6 (patch)
treed4b3a4d3cfa79362deca1b4cae3d971cd2a3784b /llvm/lib/Transforms/Scalar/JumpThreading.cpp
parent83731469a1be2f81b483a37c8c12739a8fb153c5 (diff)
downloadbcm5719-llvm-576ef3c66764a45249780f068bbd5e41c9cb21d6.tar.gz
bcm5719-llvm-576ef3c66764a45249780f068bbd5e41c9cb21d6.zip
Consistent use of the noduplicate attribute.
The "noduplicate" attribute of call instructions is sometimes queried directly and sometimes through the cannotDuplicate() predicate. This patch streamlines all queries to use the cannotDuplicate() predicate. It also adds this predicate to InvokeInst, to mirror what CallInst has. llvm-svn: 204049
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/JumpThreading.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index dcb4a954fc9..067deb7d78d 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -255,7 +255,7 @@ static unsigned getJumpThreadDuplicationCost(const BasicBlock *BB,
// as having cost of 2 total, and if they are a vector intrinsic, we model
// them as having cost 1.
if (const CallInst *CI = dyn_cast<CallInst>(I)) {
- if (CI->hasFnAttr(Attribute::NoDuplicate))
+ if (CI->cannotDuplicate())
// Blocks with NoDuplicate are modelled as having infinite cost, so they
// are never duplicated.
return ~0U;
OpenPOWER on IntegriCloud