Skip to content

Commit 493c15f

Browse files
committed
[LAA] address review (NFC)
1 parent f5026c3 commit 493c15f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/lib/Analysis/LoopAccessAnalysis.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,8 @@ void RuntimePointerChecking::generateChecks(
389389

390390
bool RuntimePointerChecking::needsChecking(
391391
const RuntimeCheckingPtrGroup &M, const RuntimeCheckingPtrGroup &N) const {
392-
for (auto &I : M.Members)
393-
for (auto &J : N.Members)
392+
for (const auto &I : M.Members)
393+
for (const auto &J : N.Members)
394394
if (needsChecking(I, J))
395395
return true;
396396
return false;
@@ -2062,9 +2062,10 @@ MemoryDepChecker::Dependence::DepType MemoryDepChecker::isDependent(
20622062
// Negative distances are not plausible dependencies.
20632063
if (SE.isKnownNonPositive(Dist)) {
20642064
if (SE.isKnownNonNegative(Dist)) {
2065-
if (HasSameSize)
2065+
if (HasSameSize) {
20662066
// Write to the same location with the same size.
20672067
return Dependence::Forward;
2068+
}
20682069
LLVM_DEBUG(dbgs() << "LAA: possibly zero dependence difference but "
20692070
"different type sizes\n");
20702071
return Dependence::Unknown;
@@ -3029,10 +3030,11 @@ LoopAccessInfo::LoopAccessInfo(Loop *L, ScalarEvolution *SE,
30293030
if (TTI) {
30303031
TypeSize FixedWidth =
30313032
TTI->getRegisterBitWidth(TargetTransformInfo::RGK_FixedWidthVector);
3032-
if (FixedWidth.isNonZero())
3033+
if (FixedWidth.isNonZero()) {
30333034
// Scale the vector width by 2 as rough estimate to also consider
30343035
// interleaving.
30353036
MaxTargetVectorWidthInBits = FixedWidth.getFixedValue() * 2;
3037+
}
30363038

30373039
TypeSize ScalableWidth =
30383040
TTI->getRegisterBitWidth(TargetTransformInfo::RGK_ScalableVector);

0 commit comments

Comments
 (0)