[polly] r276269 - IslNodeBuilder: expose addReferencesFromStmt [NFC]

Tobias Grosser via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 21 06:15:55 PDT 2016


Author: grosser
Date: Thu Jul 21 08:15:55 2016
New Revision: 276269

URL: http://llvm.org/viewvc/llvm-project?rev=276269&view=rev
Log:
IslNodeBuilder: expose addReferencesFromStmt [NFC]

This will be used by Polly GPGPU to determine the values that need to be
passed to GPU kernels.

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

Modified: polly/trunk/include/polly/CodeGen/IslNodeBuilder.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/IslNodeBuilder.h?rev=276269&r1=276268&r2=276269&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/IslNodeBuilder.h (original)
+++ polly/trunk/include/polly/CodeGen/IslNodeBuilder.h Thu Jul 21 08:15:55 2016
@@ -27,6 +27,18 @@ struct isl_ast_node;
 struct isl_ast_build;
 struct isl_union_map;
 
+struct SubtreeReferences {
+  LoopInfo &LI;
+  ScalarEvolution &SE;
+  Scop &S;
+  ValueMapT &GlobalMap;
+  SetVector<Value *> &Values;
+  SetVector<const SCEV *> &SCEVs;
+  BlockGenerator &BlockGen;
+};
+
+isl_stat addReferencesFromStmt(const ScopStmt *Stmt, void *UserPtr);
+
 class IslNodeBuilder {
 public:
   IslNodeBuilder(PollyIRBuilder &Builder, ScopAnnotator &Annotator, Pass *P,

Modified: polly/trunk/lib/CodeGen/IslNodeBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslNodeBuilder.cpp?rev=276269&r1=276268&r2=276269&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslNodeBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/IslNodeBuilder.cpp Thu Jul 21 08:15:55 2016
@@ -177,16 +177,6 @@ int IslNodeBuilder::getNumberOfIteration
     return NumberIterations + 1;
 }
 
-struct SubtreeReferences {
-  LoopInfo &LI;
-  ScalarEvolution &SE;
-  Scop &S;
-  ValueMapT &GlobalMap;
-  SetVector<Value *> &Values;
-  SetVector<const SCEV *> &SCEVs;
-  BlockGenerator &BlockGen;
-};
-
 /// @brief Extract the values and SCEVs needed to generate code for a block.
 static int findReferencesInBlock(struct SubtreeReferences &References,
                                  const ScopStmt *Stmt, const BasicBlock *BB) {
@@ -213,7 +203,7 @@ static int findReferencesInBlock(struct
 /// @param Stmt    The statement for which to extract the information.
 /// @param UserPtr A void pointer that can be casted to a SubtreeReferences
 ///                structure.
-static isl_stat addReferencesFromStmt(const ScopStmt *Stmt, void *UserPtr) {
+isl_stat addReferencesFromStmt(const ScopStmt *Stmt, void *UserPtr) {
   auto &References = *static_cast<struct SubtreeReferences *>(UserPtr);
 
   if (Stmt->isBlockStmt())




More information about the llvm-commits mailing list