[PATCH] D110549: [HIPSPV][1/4] Refactor HIP tool chain
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 22 13:11:28 PST 2021
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
More information about the cfe-commits
mailing list