[llvm] [LoopIdiomVectorize] Bail when vectorization is disabled (PR #181142)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 18 17:55:07 PST 2026
================
@@ -199,7 +204,17 @@ PreservedAnalyses LoopIdiomVectorizePass::run(Loop &L, LoopAnalysisManager &AM,
if (ByteCmpVF.getNumOccurrences())
BCVF = ByteCmpVF;
- LoopIdiomVectorize LIV(VecStyle, BCVF, &AR.DT, &AR.LI, &AR.TTI, DL);
+ Function &F = *L.getHeader()->getParent();
+ auto &FAMP = AM.getResult<FunctionAnalysisManagerLoopProxy>(L, AR);
+ auto *ORE = FAMP.getCachedResult<OptimizationRemarkEmitterAnalysis>(F);
+
+ std::optional<OptimizationRemarkEmitter> ORELocal;
----------------
mshockwave wrote:
I think that'll lead to heap allocation, while the current approach puts the object on the stack.
https://github.com/llvm/llvm-project/pull/181142
More information about the llvm-commits
mailing list