[llvm] 3fed6d4 - [VPlan] Mark overriden function in VPWidenPHIRecipe as virtual.
    Florian Hahn via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Jul  6 04:00:58 PDT 2021
    
    
  
Author: Florian Hahn
Date: 2021-07-06T12:00:41+01:00
New Revision: 3fed6d443f802c43aade1b5b1b09f5e2f8b3edb1
URL: https://github.com/llvm/llvm-project/commit/3fed6d443f802c43aade1b5b1b09f5e2f8b3edb1
DIFF: https://github.com/llvm/llvm-project/commit/3fed6d443f802c43aade1b5b1b09f5e2f8b3edb1.diff
LOG: [VPlan] Mark overriden function in VPWidenPHIRecipe as virtual.
VPReductionRecipe overrides those implementations. Mark them as virtual
in the VPWidenPHIRecipe to unbreak build in certain configurations.
Added: 
    
Modified: 
    llvm/lib/Transforms/Vectorize/VPlan.h
Removed: 
    
################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h
index d92ea16ad058..83de2d47de64 100644
--- a/llvm/lib/Transforms/Vectorize/VPlan.h
+++ b/llvm/lib/Transforms/Vectorize/VPlan.h
@@ -1073,7 +1073,7 @@ class VPWidenPHIRecipe : public VPRecipeBase, public VPValue {
     addOperand(&Start);
   }
 
-  ~VPWidenPHIRecipe() override = default;
+  virtual ~VPWidenPHIRecipe() override = default;
 
   /// Method to support type inquiry through isa, cast, and dyn_cast.
   static inline bool classof(const VPRecipeBase *B) {
@@ -1086,12 +1086,12 @@ class VPWidenPHIRecipe : public VPRecipeBase, public VPValue {
   }
 
   /// Generate the phi/select nodes.
-  void execute(VPTransformState &State) override;
+  virtual void execute(VPTransformState &State) override;
 
 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
   /// Print the recipe.
-  void print(raw_ostream &O, const Twine &Indent,
-             VPSlotTracker &SlotTracker) const override;
+  virtual void print(raw_ostream &O, const Twine &Indent,
+                     VPSlotTracker &SlotTracker) const override;
 #endif
 
   /// Returns the start value of the phi, if it is a reduction or first-order
        
    
    
More information about the llvm-commits
mailing list