diff options
author | Michael Kruse <llvm@meinersbur.de> | 2017-05-21 22:46:57 +0000 |
---|---|---|
committer | Michael Kruse <llvm@meinersbur.de> | 2017-05-21 22:46:57 +0000 |
commit | 706f79ab14a4fdfe465520bab713570316462889 (patch) | |
tree | 62ede8989b473108c5e182869b93cfdc197bb48e /polly/lib/Exchange/JSONExporter.cpp | |
parent | 3318970cd32082a799d5a7d833d44728d057a126 (diff) | |
download | bcm5719-llvm-706f79ab14a4fdfe465520bab713570316462889.tar.gz bcm5719-llvm-706f79ab14a4fdfe465520bab713570316462889.zip |
[CodeGen] Support partial write accesses.
Allow the BlockGenerator to generate memory writes that are not defined
over the complete statement domain, but only over a subset of it. It
generates a condition that evaluates to 1 if executing the subdomain,
and only then execute the access.
Only write accesses are supported. Read accesses would require a PHINode
which has a value if the access is not executed.
Partial write makes DeLICM able to apply mappings that are not defined
over the entire domain (for instance, a branch that leaves a loop with
a PHINode in its header; a MemoryKind::PHI write when leaving is never
read by its PHI read).
Differential Revision: https://reviews.llvm.org/D33255
llvm-svn: 303517
Diffstat (limited to 'polly/lib/Exchange/JSONExporter.cpp')
-rw-r--r-- | polly/lib/Exchange/JSONExporter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/polly/lib/Exchange/JSONExporter.cpp b/polly/lib/Exchange/JSONExporter.cpp index 21722d08e6b..0e8ff564eaa 100644 --- a/polly/lib/Exchange/JSONExporter.cpp +++ b/polly/lib/Exchange/JSONExporter.cpp @@ -446,8 +446,9 @@ bool JSONImporter::importAccesses(Scop &S, Json::Value &JScop, CurrentAccessDomain = isl_set_intersect_params(CurrentAccessDomain, S.getContext()); - if (isl_set_is_subset(CurrentAccessDomain, NewAccessDomain) == - isl_bool_false) { + if (MA->isRead() && + isl_set_is_subset(CurrentAccessDomain, NewAccessDomain) == + isl_bool_false) { errs() << "Mapping not defined for all iteration domain elements\n"; isl_set_free(CurrentAccessDomain); isl_set_free(NewAccessDomain); |