[PATCH] D42922: [CUDA] Register relocatable GPU binaries

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 19 11:38:45 PDT 2018


Hahnfeld added inline comments.


================
Comment at: lib/CodeGen/CGCUDANV.cpp:283-285
+  llvm::FunctionType *RegisterGlobalsFnTy;
+  llvm::FunctionType *RegisterLinkedBinaryFnTy;
+  llvm::Function *DummyCallback;
----------------
tra wrote:
> Instead of tracking these through the conditionals of pretty long function, could we make these pointers class fields and init them in the constructor and make accessors return them and, possibly, assert that they are used if RDC is enabled?
I've removed the caching entirely because that's already done by `llvm::FunctionType::get()`. These are now called in new methods to avoid duplication.


https://reviews.llvm.org/D42922





More information about the cfe-commits mailing list