[PATCH] [Polly] [IslCodeGenerator] Add OpenMP support
Andreas Simbuerger
simbuerg at fim.uni-passau.de
Thu Nov 13 22:57:45 PST 2014
================
Comment at: lib/CodeGen/IslCodeGeneration.cpp:90
@@ -83,1 +89,3 @@
+ /// @brief The current iteration of out of scop loops
+ ///
----------------
out-of-scop
================
Comment at: lib/CodeGen/IslCodeGeneration.cpp:301
@@ +300,3 @@
+
+/// Extract the values and SCEVs needed to code generate a ScopStmt.
+///
----------------
Extract the values and SCEVs needed to generate code for a ScopStmt.
================
Comment at: lib/CodeGen/IslCodeGeneration.cpp:305
@@ +304,3 @@
+/// Values this statement depends on as well as a set of SCEV expressions that
+/// need to be synthesized when code generating this statment.
+static int findValuesInStmt(isl_set *Set, void *User) {
----------------
... when generating code for this statement.
================
Comment at: lib/CodeGen/IslCodeGeneration.cpp:356
@@ +355,3 @@
+
+ Values.remove_if([this](const Value *V) { return isa<GlobalValue>(V); });
+
----------------
jdoerfert wrote:
> I'm still not really convinced this is better/nicer than a static function.
Most likely the static function would get a descriptive name, such as: isGlobalValue, right? That is quite redundant given the only statement this function executes is: return isa<GlobalValue>(V);
Furthermore, I do not think that this static function would get called from somewhere else in here, so whats the point in having it around on the top-level.
================
Comment at: lib/CodeGen/IslCodeGeneration.cpp:615
@@ +614,3 @@
+ // Create for all loops we depend on values that contain the current loop
+ // iteration. These values are necessary to code generate SCEVs that depend on
+ // such loops. As a result we need to pass them to the subfunction.
----------------
... generate code for SCEVs...
================
Comment at: lib/Support/SCEVValidator.cpp:365
@@ -364,1 +364,3 @@
+struct SCEVFindLoops : public SCEVVisitor<SCEVFindLoops, void> {
+ SetVector<const Loop *> &Loops;
----------------
jdoerfert wrote:
> There is another type of "SCEVVisitor", Sebastian pointed it out to me once. IT only has one function something like:
> visit(const SCEV *S);
> and you cast the SCEV yourself. I would suggest using that for visitors that are only interested in one or two SCEV types.
Nice find, that simplifies so many things
http://reviews.llvm.org/D5517
More information about the llvm-commits
mailing list