[llvm] [LoopVectorize] Refine runtime memory check costs when there is an outer loop (PR #76034)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 22 04:00:24 PST 2023


================
@@ -2070,7 +2070,7 @@ class GeneratedRTChecks {
     }
   }
 
-  InstructionCost getCost() {
+  InstructionCost getCost(Loop *OuterLoop) {
----------------
fhahn wrote:

It might be better to store the inner or outer loop directly in the struct; the inner loop is passed in to `Create` and there are 2 places that check for an outer loop already (via `if (auto *PL = LI->getLoopFor(LoopVectorPreHeader))`)

https://github.com/llvm/llvm-project/pull/76034


More information about the llvm-commits mailing list