[NFC] Refine API: add missing const notion in hasPartialIVCondition
authorMax Kazantsev <mkazantsev@azul.com>
Tue, 11 Oct 2022 11:30:17 +0000 (18:30 +0700)
committerMax Kazantsev <mkazantsev@azul.com>
Tue, 11 Oct 2022 12:35:16 +0000 (19:35 +0700)
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/lib/Transforms/Utils/LoopUtils.cpp

index efdd831..54d98c6 100644 (file)
@@ -541,8 +541,10 @@ struct IVConditionInfo {
 /// 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
 
index 888be82..75a755c 100644 (file)
@@ -1708,9 +1708,9 @@ Value *llvm::addDiffRuntimeChecks(
   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())