Annotate LLVM-IR for all parallel loops
This change allows to annotate all parallel loops with loop id metadata.
Furthermore, it will annotate memory instructions with
llvm.mem.parallel_loop_access metadata for all surrounding parallel loops.
This is especially usefull if an external paralleliser is used.
This also removes the PollyLoopInfo class and comments the
LoopAnnotator.
A test case for multiple parallel loops is attached.
llvm-svn: 218793
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp
index 22a8fe5..f5599ee 100644
--- a/polly/lib/CodeGen/IslCodeGeneration.cpp
+++ b/polly/lib/CodeGen/IslCodeGeneration.cpp
@@ -319,8 +319,8 @@
CmpInst::Predicate Predicate;
bool Parallel;
- Parallel = IslAstInfo::isInnermostParallel(For) &&
- !IslAstInfo::isReductionParallel(For);
+ Parallel =
+ IslAstInfo::isParallel(For) && !IslAstInfo::isReductionParallel(For);
Body = isl_ast_node_for_get_body(For);
@@ -362,7 +362,7 @@
create(Body);
- Annotator.End();
+ Annotator.popLoop(Parallel);
IDToValue.erase(IteratorID);