1 #ifndef LOCAL_REDUCTION_H 2 #define LOCAL_REDUCTION_H 7 #include "clang/AST/RecursiveASTVisitor.h" 25 void Initialize(clang::ASTContext &Ctx);
27 void HandleTranslationUnit(clang::ASTContext &Ctx);
29 std::set<clang::Stmt *> toSet(std::vector<clang::Stmt *> &Vec);
30 std::set<clang::Stmt *> setDifference(std::set<clang::Stmt *> &A,
31 std::set<clang::Stmt *> &B);
37 void filterElements(std::vector<clang::Stmt *> &Vec);
47 int countReturnStmts(std::set<clang::Stmt *> &Elements);
48 bool noReturn(std::set<clang::Stmt *> &FunctionStmts,
49 std::set<clang::Stmt *> &AllRemovedStmts);
50 bool danglingLabel(std::set<clang::Stmt *> &Remaining);
51 bool brokenDependency(std::set<clang::Stmt *> &Remaining);
53 std::vector<clang::DeclRefExpr *> getDeclRefExprs(
clang::Expr *E);
58 std::set<clang::Stmt *> RemovedElements;
59 std::vector<clang::FunctionDecl *> Functions;
60 std::queue<clang::Stmt *> Queue;
67 :
public clang::RecursiveASTVisitor<LocalElementCollectionVisitor> {
77 #endif // LOCAL_REDUCTION_H clang::Expr Expr
Definition: LocalReduction.cpp:31
Represents a general reduction step.
Definition: Reduction.h:14
clang::DeclGroupRef DeclGroupRef
Definition: LocalReduction.cpp:16
clang::DoStmt DoStmt
Definition: LocalReduction.cpp:35
LocalElementCollectionVisitor(LocalReduction *R)
Definition: LocalReduction.h:69
Represents a local reduction phase.
Definition: LocalReduction.h:17
clang::Stmt Stmt
Definition: LocalReduction.cpp:25
std::vector< DDElement > DDElementVector
Definition: ProbabilisticModel.h:12
clang::IfStmt IfStmt
Definition: LocalReduction.cpp:20
clang::LabelStmt LabelStmt
Definition: LocalReduction.cpp:21
LocalReduction()
Definition: LocalReduction.h:21
Definition: LocalReduction.h:66
clang::SwitchStmt SwitchStmt
Definition: LocalReduction.cpp:34
clang::CompoundStmt CompoundStmt
Definition: LocalReduction.cpp:15
clang::FunctionDecl FunctionDecl
Definition: LocalReduction.cpp:18
clang::DeclRefExpr DeclRefExpr
Definition: LocalReduction.cpp:32
clang::ForStmt ForStmt
Definition: LocalReduction.cpp:33
~LocalReduction()
Definition: LocalReduction.h:22
llvm::PointerUnion< clang::Decl *, clang::Stmt * > DDElement
Definition: ProbabilisticModel.h:11
clang::WhileStmt WhileStmt
Definition: LocalReduction.cpp:27