[llvm] [LoopInterchange] Use ArrayRef in more places (NFC) (PR #146077)
Ryotaro Kasuga via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 27 07:25:50 PDT 2025
================
@@ -309,18 +307,18 @@ static void populateWorklist(Loop &L, LoopVector &LoopList) {
LoopList.push_back(CurrentLoop);
}
-static bool hasSupportedLoopDepth(SmallVectorImpl<Loop *> &LoopList,
+static bool hasSupportedLoopDepth(ArrayRef<Loop *> LoopList,
OptimizationRemarkEmitter &ORE) {
unsigned LoopNestDepth = LoopList.size();
if (LoopNestDepth < MinLoopNestDepth || LoopNestDepth > MaxLoopNestDepth) {
LLVM_DEBUG(dbgs() << "Unsupported depth of loop nest " << LoopNestDepth
<< ", the supported range is [" << MinLoopNestDepth
<< ", " << MaxLoopNestDepth << "].\n");
- Loop **OuterLoop = LoopList.begin();
+ Loop *OuterLoop = LoopList.front();
ORE.emit([&]() {
return OptimizationRemarkMissed(DEBUG_TYPE, "UnsupportedLoopNestDepth",
- (*OuterLoop)->getStartLoc(),
- (*OuterLoop)->getHeader())
+ OuterLoop->getStartLoc(),
+ OuterLoop->getHeader())
----------------
kasuga-fj wrote:
Unrelated changes?
https://github.com/llvm/llvm-project/pull/146077
More information about the llvm-commits
mailing list