[llvm] [LV] Make having flags (FMFs etc) not require inheriting VPSingleDefRecipe (PR #114972)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 5 13:41:27 PST 2024


================
@@ -803,6 +805,13 @@ class VPRecipeBase : public ilist_node_with_parent<VPRecipeBase, VPBasicBlock>,
   /// Returns the debug location of the recipe.
   DebugLoc getDebugLoc() const { return DL; }
 
+  /// Returns the IR flags for the recipe.
+  virtual const VPRecipeIRFlags *getIRFlags() const { return nullptr; }
----------------
fhahn wrote:

Would it be possible to still retain the option to cast/dyn_cast to VPRecipeIRFlags by implementing VPRecipeIRFlags::classof for VPRecipeBase instead?


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


More information about the llvm-commits mailing list