[PATCH] D103108: [CUDA][HIP] Promote const variables to constant
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 26 14:37:48 PDT 2021
tra added a comment.
Overall looks good, though I've got one more question.
================
Comment at: clang/test/SemaCUDA/device-use-host-var.cu:90
+ const int &ref_const_var = global_const_var;
const int &ref_constexpr_var = global_constexpr_var;
*out = ref_host_var;
----------------
What happens if we have `const int &ref_foo = something_we_cant_emit_on_device;`?
Both if ref_foo is and isn't used from device code.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D103108/new/
https://reviews.llvm.org/D103108
More information about the cfe-commits
mailing list