[polly] r261496 - IslAst: Expose IslAst class in header file [NFC]
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 21 12:01:29 PST 2016
Author: grosser
Date: Sun Feb 21 14:01:28 2016
New Revision: 261496
URL: http://llvm.org/viewvc/llvm-project?rev=261496&view=rev
Log:
IslAst: Expose IslAst class in header file [NFC]
This allows other passes and transformations to use some of the existing AST
building infrastructure. This is not yet used in Polly itself.
Modified:
polly/trunk/include/polly/CodeGen/IslAst.h
polly/trunk/lib/CodeGen/IslAst.cpp
Modified: polly/trunk/include/polly/CodeGen/IslAst.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/CodeGen/IslAst.h?rev=261496&r1=261495&r2=261496&view=diff
==============================================================================
--- polly/trunk/include/polly/CodeGen/IslAst.h (original)
+++ polly/trunk/include/polly/CodeGen/IslAst.h Sun Feb 21 14:01:28 2016
@@ -41,6 +41,32 @@ namespace polly {
class Scop;
class IslAst;
class MemoryAccess;
+struct Dependences;
+
+class IslAst {
+public:
+ static IslAst *create(Scop *Scop, const Dependences &D);
+ ~IslAst();
+
+ /// Print a source code representation of the program.
+ void pprint(llvm::raw_ostream &OS);
+
+ __isl_give isl_ast_node *getAst();
+
+ /// @brief Get the run-time conditions for the Scop.
+ __isl_give isl_ast_expr *getRunCondition();
+
+private:
+ Scop *S;
+ isl_ast_node *Root;
+ isl_ast_expr *RunCondition;
+ std::shared_ptr<isl_ctx> Ctx;
+
+ IslAst(Scop *Scop);
+ void init(const Dependences &D);
+
+ void buildRunCondition(__isl_keep isl_ast_build *Build);
+};
class IslAstInfo : public ScopPass {
public:
Modified: polly/trunk/lib/CodeGen/IslAst.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/IslAst.cpp?rev=261496&r1=261495&r2=261496&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/IslAst.cpp (original)
+++ polly/trunk/lib/CodeGen/IslAst.cpp Sun Feb 21 14:01:28 2016
@@ -71,33 +71,6 @@ static cl::opt<bool> DetectParallel("pol
cl::init(false), cl::ZeroOrMore,
cl::cat(PollyCategory));
-namespace polly {
-class IslAst {
-public:
- static IslAst *create(Scop *Scop, const Dependences &D);
- ~IslAst();
-
- /// Print a source code representation of the program.
- void pprint(llvm::raw_ostream &OS);
-
- __isl_give isl_ast_node *getAst();
-
- /// @brief Get the run-time conditions for the Scop.
- __isl_give isl_ast_expr *getRunCondition();
-
-private:
- Scop *S;
- isl_ast_node *Root;
- isl_ast_expr *RunCondition;
- std::shared_ptr<isl_ctx> Ctx;
-
- IslAst(Scop *Scop);
- void init(const Dependences &D);
-
- void buildRunCondition(__isl_keep isl_ast_build *Build);
-};
-} // End namespace polly.
-
/// @brief Free an IslAstUserPayload object pointed to by @p Ptr
static void freeIslAstUserPayload(void *Ptr) {
delete ((IslAstInfo::IslAstUserPayload *)Ptr);
More information about the llvm-commits
mailing list