tra added a subscriber: echristo.
tra added inline comments.

================
Comment at: clang/lib/Driver/ToolChains/HIPUtility.cpp:119-133
+  // Add MC directives to embed target binaries. We ensure that each
+  // section and image is 16-byte aligned. This is not mandatory, but
+  // increases the likelihood of data to be aligned with a cache block
+  // in several main host machines.
+  ObjStream << "#       HIP Object Generator\n";
+  ObjStream << "# *** Automatically generated by Clang ***\n";
+  ObjStream << "  .protected __hip_fatbin\n";
----------------
Using MC for just wrapping a blob into an object file strikes me as something 
MC is not intended for.

@echristo -- is it OK to use MC as a tool in the standard compilation pipeline? 
I vaguely recall we had a conversaion about using objcopy for similar purposes 
during early days of CUDA and the conclusion was that we generally don't want 
that. I might be wrong, too, it's been too long ago.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D110549

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to