summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-05-13 01:12:06 +0000
committerPete Cooper <peter_cooper@apple.com>2015-05-13 01:12:06 +0000
commit016daa662fad50588be18388a143f334ecd0a5f7 (patch)
tree028ff040f7db536eec1f2c47b5d1549be6c1eae1 /llvm/lib/Analysis
parentf7c163c98664de4143e2cbadb9e8c59fa32fa830 (diff)
downloadbcm5719-llvm-016daa662fad50588be18388a143f334ecd0a5f7.tar.gz
bcm5719-llvm-016daa662fad50588be18388a143f334ecd0a5f7.zip
Constify arguments to methods in LoopInfo. NFC
llvm-svn: 237223
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/LoopInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp
index b3a33326c00..09045dcf8e7 100644
--- a/llvm/lib/Analysis/LoopInfo.cpp
+++ b/llvm/lib/Analysis/LoopInfo.cpp
@@ -56,15 +56,15 @@ static const char *const LoopMDName = "llvm.loop";
/// isLoopInvariant - Return true if the specified value is loop invariant
///
-bool Loop::isLoopInvariant(Value *V) const {
- if (Instruction *I = dyn_cast<Instruction>(V))
+bool Loop::isLoopInvariant(const Value *V) const {
+ if (const Instruction *I = dyn_cast<Instruction>(V))
return !contains(I);
return true; // All non-instructions are loop invariant
}
/// hasLoopInvariantOperands - Return true if all the operands of the
/// specified instruction are loop invariant.
-bool Loop::hasLoopInvariantOperands(Instruction *I) const {
+bool Loop::hasLoopInvariantOperands(const Instruction *I) const {
for (unsigned i = 0, e = I->getNumOperands(); i != e; ++i)
if (!isLoopInvariant(I->getOperand(i)))
return false;
OpenPOWER on IntegriCloud