[PATCH] D49022: [Polly-ACC] disallow managed memory code generation for OpenCL
Philip Pfaffe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 6 09:15:25 PDT 2018
philip.pfaffe added a comment.
I don't like that this messes with global state. This destroys local reasoning and makes refactoring unnecessarily harder in the future.
How about instead wrapping accesses to the flag in a helper function like `useManagedMemory()` that performs this check?
================
Comment at: lib/CodeGen/PPCGCodeGeneration.cpp:3569
+ // only use managed memory if we generate code for a NVPTX device
+ PollyManagedMemory = (PollyManagedMemory && (Architecture == GPUArch::NVPTX64));
+
----------------
This modifies global state.
Repository:
rPLO Polly
https://reviews.llvm.org/D49022
More information about the llvm-commits
mailing list