mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Constify arguments to methods in LoopInfo. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237223 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user