When using -polly-ignore-integer-wrapping and -polly-acc-codegen-managed-memory
we add parameter dimensions lazily to the domains, which results in PPCG not
including parameter dimensions that are only used in memory accesses in the
kernel space. To make sure these parameters are still passed to the kernel, we
collect these parameter dimensions and align the kernel's parameter space
before code-generating it.
Details
- Reviewers
Meinersbur bollu singam-sanjay grosser
Diff Detail
- Build Status
Buildable 9433 Build 9433: arc lint + arc unit
Event Timeline
I would like to discuss the isl::space ParamSpace issue before LGTM'ing this patch.
include/polly/CodeGen/IslNodeBuilder.h | ||
---|---|---|
47 | Please see the comment about using isl::space * here to broadcast the fact that this is an optional member of the struct. | |
lib/CodeGen/IslNodeBuilder.cpp | ||
231–237 | Nit: Change the auto to MemoryAccess? It would not be obvious to someone who does not work on Polly that a statement iterator gives MemoryAccess. | |
306 | We abuse the fact that nullptr operations just propagate nullptr in ISL. I'm trying to think of neater ways to express this. I _really_ abusing nullptr this way since it is quite literally dependent on the ISL implementation. For now, we can make it a isl::space * to express the fact that it a choice. Ideally, we could somehow split the different "visitors" so that ISLNodeBuilder would not use the parameter visitor but GPUNodeBuilder could. | |
test/GPGPU/memory-only-referenced-from-access.ll | ||
50 | Please remove the metadata which is not required. |
Committed in r311239. I forgot to add the phab URL, hence I close it manually.
lib/CodeGen/IslNodeBuilder.cpp | ||
---|---|---|
231–237 | This is an unrelated change. I will do it ahead of the commit. | |
lib/CodeGen/PPCGCodeGeneration.cpp | ||
1446 | That's a clang-format artifact. Seems the formatting choice is not totally optimal here. I leave it as it is, as I see now way to work around it. |
Please see the comment about using isl::space * here to broadcast the fact that this is an optional member of the struct.