[llvm] [VPlan] Remove loop region in optimizeForVFAndUF. (PR #108378)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 1 15:53:28 PST 2025


================
@@ -794,11 +794,14 @@ static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
     return R.getVPSingleValue()->replaceAllUsesWith(R.getOperand(1));
 }
 
-/// Try to simplify the recipes in \p Plan
-static void simplifyRecipes(VPlan &Plan) {
+/// Try to simplify the recipes in \p Plan. If \p CanonicalIVTy is not nullptr,
+/// use it directly instead of retrieving the canonical IV type from the plan
+/// which may not exist any longer.
----------------
ayalz wrote:

Simpler to always pass in this Type, which is essentially the type of all "symbolic live-ins" - those whose underlying IR value will be generated later / at code-gen. Or find a way for each such live-in to provide its type.

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


More information about the llvm-commits mailing list