/// If the branch condition of the header is partially invariant, return a pair
/// containing the instructions to duplicate and a boolean Constant to update
/// the condition in the loops created for the true or false successors.
-Optional<IVConditionInfo> hasPartialIVCondition(Loop &L, unsigned MSSAThreshold,
- MemorySSA &MSSA, AAResults &AA);
+Optional<IVConditionInfo> hasPartialIVCondition(const Loop &L,
+ unsigned MSSAThreshold,
+ const MemorySSA &MSSA,
+ AAResults &AA);
} // end namespace llvm
return MemoryRuntimeCheck;
}
-Optional<IVConditionInfo> llvm::hasPartialIVCondition(Loop &L,
+Optional<IVConditionInfo> llvm::hasPartialIVCondition(const Loop &L,
unsigned MSSAThreshold,
- MemorySSA &MSSA,
+ const MemorySSA &MSSA,
AAResults &AA) {
auto *TI = dyn_cast<BranchInst>(L.getHeader()->getTerminator());
if (!TI || !TI->isConditional())