[PATCH] D28538: [CodeGen] [CUDA] Add the ability set default attrs on functions in linked modules.

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 23 06:44:03 PST 2017


hfinkel added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenModule.h:1030
+  /// This is useful for adding attrs to bitcode modules that you want to link
+  /// with but don't control, such as CUDA's libdevice.  When linking with such
+  /// a bitcode library, you probably want to set e.g. its functions'
----------------
I think there is an important point here that is missing: for libdevice, we happen to know that this is safe. I think that needs to be in the comment somehow. In general, this is dangerous. libdevice, as I understand it, is specifically designed to make this work (via NVVMReflect).



https://reviews.llvm.org/D28538





More information about the llvm-commits mailing list