[PATCH] D85276: [PGO][CUDA][HIP] Skip generating profile on the device stub and wrong-side functions.

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 5 09:42:50 PDT 2020


tra added a comment.

LGTM for CUDA.



================
Comment at: clang/lib/CodeGen/CodeGenPGO.cpp:839-840
 
+  // Skip host-only functions in the CUDA device compilation and device-only
+  // functions in the host compilation.
+  if (CGM.getLangOpts().CUDA &&
----------------
We will still have around some functions that may never be used on the host side (HD functions referenced from device code only).  I'm not sure if that's a problem for profiling, though. I wonder if we can somehow tie `skipRegionMappingForDecl` to whether we've actually codegen'ed the function. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85276



More information about the cfe-commits mailing list