Skip to content

Commit 0898348

Browse files
committed
[LAA] Make blockNeedsPredication arguments const (NFC).
The arguments aren't modified, mark them as const. This prepares for new users in a follow-up, which only have access to const versions of the arguments.
1 parent ab645f1 commit 0898348

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

llvm/include/llvm/Analysis/LoopAccessAnalysis.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,8 +724,9 @@ class LoopAccessInfo {
724724

725725
/// Return true if the block BB needs to be predicated in order for the loop
726726
/// to be vectorized.
727-
LLVM_ABI static bool blockNeedsPredication(BasicBlock *BB, Loop *TheLoop,
728-
DominatorTree *DT);
727+
LLVM_ABI static bool blockNeedsPredication(const BasicBlock *BB,
728+
const Loop *TheLoop,
729+
const DominatorTree *DT);
729730

730731
/// Returns true if value \p V is loop invariant.
731732
LLVM_ABI bool isInvariant(Value *V) const;

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2856,8 +2856,9 @@ void LoopAccessInfo::emitUnsafeDependenceRemark() {
28562856
}
28572857
}
28582858

2859-
bool LoopAccessInfo::blockNeedsPredication(BasicBlock *BB, Loop *TheLoop,
2860-
DominatorTree *DT) {
2859+
bool LoopAccessInfo::blockNeedsPredication(const BasicBlock *BB,
2860+
const Loop *TheLoop,
2861+
const DominatorTree *DT) {
28612862
assert(TheLoop->contains(BB) && "Unknown block used");
28622863

28632864
// Blocks that do not dominate the latch need predication.

0 commit comments

Comments
 (0)