summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis/DependenceInfo.cpp
diff options
context:
space:
mode:
authorSiddharth Bhat <siddu.druid@gmail.com>2017-03-17 12:31:28 +0000
committerSiddharth Bhat <siddu.druid@gmail.com>2017-03-17 12:31:28 +0000
commit65f3d5201ef1e8dc91d1dbf4921808f2e63e095c (patch)
tree3745c59ad477871328cbbd4e38c3ba84f78fcb21 /polly/lib/Analysis/DependenceInfo.cpp
parent8a6e605e963e1b64a840ad7365dd7c463066482a (diff)
downloadbcm5719-llvm-65f3d5201ef1e8dc91d1dbf4921808f2e63e095c.tar.gz
bcm5719-llvm-65f3d5201ef1e8dc91d1dbf4921808f2e63e095c.zip
[DependenceInfo] Track may-writes and build flow information in
Dependences::calculateDependences. This ensures that we handle may-writes correctly when building dependence information. Also add a test case checking correctness of may-write information. Not handling it before was an oversight. Differential Revision: https://reviews.llvm.org/D31075 llvm-svn: 298074
Diffstat (limited to 'polly/lib/Analysis/DependenceInfo.cpp')
-rw-r--r--polly/lib/Analysis/DependenceInfo.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/polly/lib/Analysis/DependenceInfo.cpp b/polly/lib/Analysis/DependenceInfo.cpp
index 55e8995f054..8881c60b592 100644
--- a/polly/lib/Analysis/DependenceInfo.cpp
+++ b/polly/lib/Analysis/DependenceInfo.cpp
@@ -166,6 +166,8 @@ static void collectInfo(Scop &S, isl_union_map *&Read, isl_union_map *&Write,
if (MA->isRead())
Read = isl_union_map_add_map(Read, accdom);
+ else if (MA->isMayWrite())
+ MayWrite = isl_union_map_add_map(MayWrite, accdom);
else
Write = isl_union_map_add_map(Write, accdom);
}
@@ -366,6 +368,7 @@ void Dependences::calculateDependences(Scop &S) {
Flow = buildFlow(Read, Write, MayWrite, Schedule);
RAW = isl_union_flow_get_must_dependence(Flow);
+ RAW = isl_union_map_union(RAW, isl_union_flow_get_may_dependence(Flow));
isl_union_flow_free(Flow);
Flow = buildFlow(Write, Write, Read, Schedule);
OpenPOWER on IntegriCloud