diff options
author | Eli Bendersky <eliben@google.com> | 2014-03-17 16:19:07 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2014-03-17 16:19:07 +0000 |
commit | 576ef3c66764a45249780f068bbd5e41c9cb21d6 (patch) | |
tree | d4b3a4d3cfa79362deca1b4cae3d971cd2a3784b /llvm/lib/Analysis/LoopInfo.cpp | |
parent | 83731469a1be2f81b483a37c8c12739a8fb153c5 (diff) | |
download | bcm5719-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/Analysis/LoopInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/LoopInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index d4e7b54f224..b38672ec394 100644 --- a/llvm/lib/Analysis/LoopInfo.cpp +++ b/llvm/lib/Analysis/LoopInfo.cpp @@ -218,12 +218,12 @@ bool Loop::isSafeToClone() const { return false; if (const InvokeInst *II = dyn_cast<InvokeInst>((*I)->getTerminator())) - if (II->hasFnAttr(Attribute::NoDuplicate)) + if (II->cannotDuplicate()) return false; for (BasicBlock::iterator BI = (*I)->begin(), BE = (*I)->end(); BI != BE; ++BI) { if (const CallInst *CI = dyn_cast<CallInst>(BI)) { - if (CI->hasFnAttr(Attribute::NoDuplicate)) + if (CI->cannotDuplicate()) return false; } } |