[llvm] [VPlanTransform] Specialize simplifyRecipe for VPSingleDefRecipe pointer. nfc (PR #165568)
Mel Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 30 01:38:16 PDT 2025
================
@@ -1057,54 +1057,51 @@ static VPValue *tryToFoldLiveIns(VPSingleDefRecipe &R,
return nullptr;
}
-/// Try to simplify recipe \p R.
-static void simplifyRecipe(VPRecipeBase &R, VPTypeAnalysis &TypeInfo) {
- VPlan *Plan = R.getParent()->getPlan();
-
- auto *Def = dyn_cast<VPSingleDefRecipe>(&R);
- if (!Def)
- return;
+/// Try to simplify VPSingleDefRecipe \p Def.
+static void simplifySingleDefRecipe(VPSingleDefRecipe &Def,
----------------
Mel-Chen wrote:
Revert the change for renaming 05ff0bc0528d239ea8bd5f007e69928ea88c487f
Currently, it is indeed possible to add more simplification patterns using overloading, so keeping the original function name works. However, I think the best approach would be to create a visitor class to make the entire simplification process more readable.
cc. @fhahn
https://github.com/llvm/llvm-project/pull/165568
More information about the llvm-commits
mailing list