[PATCH] D44984: [HIP] Add hip input kind and codegen for kernel launching

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 24 10:51:54 PDT 2018


tra added inline comments.


================
Comment at: lib/CodeGen/CGCUDANV.cpp:51-52
   llvm::Constant *getLaunchFn() const;
+  std::string addPrefixToName(CodeGenModule &CGM, StringRef FuncName) const;
+  std::string addUnderscoredPrefixToName(CodeGenModule &CGM,
+                                         StringRef FuncName) const;
----------------
rjmccall wrote:
> tra wrote:
> > `const CodeGenModule &CGM`
> Why doesn't the CGNVCUDARuntime just hold on to a reference to the CGM?  That's what we do with all the other separated singletons (like the CGCXXABI), and it would let you avoid some of the redundant fields like Context and TheModule.
Actually,  CGCUDARuntime already has CGM field, so the CGM argument can be just dropped.


https://reviews.llvm.org/D44984





More information about the cfe-commits mailing list