[PATCH] D152164: [CUDA][HIP] Externalize device var in anonymous namespace

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 5 10:20:32 PDT 2023


tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/test/CodeGenCUDA/anon-ns.cu:46
+
+// COMMON-DAG: @[[STR1:.*]] = {{.*}} c"[[KERN1]]\00"
+// COMMON-DAG: @[[STR2:.*]] = {{.*}} c"[[KERN2]]\00"
----------------
Nit: I'd rename the patterns to reflect the names of the source entities they track, so we don't have to dig through multiple dependent matches in order to figure out what the test does.
E.g. for `tempKern` : `KERN3`, `STR3` -> `TKERN`, `TKERNSTR`.

Maybe give kernels/variables more distinct names as well. My brain keeps trying to interpret `temp` as `temporary`. 
A common naming scheme would be nice. E.g. `tk`, `tv` for the template kernel and variable, `a*` for anonymous entities.



CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152164/new/

https://reviews.llvm.org/D152164



More information about the cfe-commits mailing list