[llvm] [NFC][LoopVectorize] Avoid passing ScalarEvolution to VPlanTransforms::optimize (PR #108380)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 13 01:46:02 PDT 2024


================
@@ -535,8 +535,7 @@ createScalarIVSteps(VPlan &Plan, InductionDescriptor::InductionKind Kind,
   }
 
   // Truncate base induction if needed.
-  VPTypeAnalysis TypeInfo(Plan.getCanonicalIV()->getScalarType(),
-                          SE.getContext());
+  VPTypeAnalysis TypeInfo(Plan.getCanonicalIV()->getScalarType(), Ctx);
----------------
david-arm wrote:

Good point! I've spotted some more opportunities for clean up here. For example, the class constructor for `VPTypeAnalysis` takes both a Type and a LLVMContext, when you only need the former. I'll follow that up in another patch. :)

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


More information about the llvm-commits mailing list