[polly] r246281 - Virtualize the IslNodeBuilder

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 00:07:04 PDT 2015


Author: grosser
Date: Fri Aug 28 02:07:04 2015
New Revision: 246281

URL: http://llvm.org/viewvc/llvm-project?rev=246281&view=rev
Log:
Virtualize the IslNodeBuilder

This allows users to extend the IslNodeBuilder to create their own optimization
passes. This feature is not used in Polly's codebase itself, but as these
funtions are not performance critical, the cost of making experiments of
external users easier seems low enough to do so.

Modified:
    polly/trunk/include/polly/CodeGen/IslNodeBuilder.h

Modified: polly/trunk/include/polly/CodeGen/IslNodeBuilder.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/IslNodeBuilder.h?rev=246281&r1=246280&r2=246281&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/IslNodeBuilder.h (original)
+++ polly/trunk/include/polly/CodeGen/IslNodeBuilder.h Fri Aug 28 02:07:04 2015
@@ -36,7 +36,7 @@ public:
                  &ExprBuilder),
         RegionGen(BlockGen), P(P), DL(DL), LI(LI), SE(SE), DT(DT) {}
 
-  ~IslNodeBuilder() {}
+  virtual ~IslNodeBuilder() {}
 
   void addParameters(__isl_take isl_set *Context);
   void create(__isl_take isl_ast_node *Node);
@@ -182,8 +182,8 @@ private:
   /// currently not special handling for marker nodes implemented.
   ///
   /// @param Mark The node we generate code for.
-  void createMark(__isl_take isl_ast_node *Marker);
-  void createFor(__isl_take isl_ast_node *For);
+  virtual void createMark(__isl_take isl_ast_node *Marker);
+  virtual void createFor(__isl_take isl_ast_node *For);
   void createForVector(__isl_take isl_ast_node *For, int VectorWidth);
   void createForSequential(__isl_take isl_ast_node *For);
 
@@ -254,13 +254,13 @@ private:
                                  std::vector<LoopToScevMapT> &VLTS,
                                  std::vector<Value *> &IVS,
                                  __isl_take isl_id *IteratorID);
-  void createIf(__isl_take isl_ast_node *If);
+  virtual void createIf(__isl_take isl_ast_node *If);
   void createUserVector(__isl_take isl_ast_node *User,
                         std::vector<Value *> &IVS,
                         __isl_take isl_id *IteratorID,
                         __isl_take isl_union_map *Schedule);
-  void createUser(__isl_take isl_ast_node *User);
-  void createBlock(__isl_take isl_ast_node *Block);
+  virtual void createUser(__isl_take isl_ast_node *User);
+  virtual void createBlock(__isl_take isl_ast_node *Block);
 };
 
 #endif




More information about the llvm-commits mailing list