[PATCH] D96195: [HIP] Fix managed variable linkage

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 22 09:52:48 PST 2021


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


================
Comment at: clang/lib/CodeGen/CGCUDARuntime.h:107
+  /// Transform managed variables in device compilation.
+  virtual void transformManagedVars() = 0;
 };
----------------
yaxunl wrote:
> tra wrote:
> > Can we fold it into `makeModuleCtorFunction` ?  It does not look like something we would need to customize independently of other glue generating machinery.
> > 
> makeModuleCtorFunction is creating module ctor function, but transformManagedVars has nothing to do with module ctor function.
> 
> Also, makeModuleCtorFunction is called in host compilation only.
> 
> Do we want to rename the API here finalizeModule ? And let it call makeModuleCtorFunction and transformManagedVars as static functions in CGCUDANV.cpp ?
SGTM. 


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

https://reviews.llvm.org/D96195



More information about the cfe-commits mailing list