Skip to content

Commit

Permalink
[NFC] Refine API: add missing const notion in hasPartialIVCondition
Browse files Browse the repository at this point in the history
  • Loading branch information
xortator committed Oct 11, 2022
1 parent d983f5f commit a8a0789
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions llvm/include/llvm/Transforms/Utils/LoopUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Transforms/Utils/LoopUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit a8a0789

Please sign in to comment.