[PATCH] D88734: [HIP] Align device binary

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 2 13:59:15 PDT 2020


yaxunl marked an inline comment as done.
yaxunl added inline comments.


================
Comment at: clang/tools/clang-offload-bundler/ClangOffloadBundler.cpp:374
+    auto BI = BundlesInfo[CurWriteBundleTarget];
+    OS.seek(BI.Offset);
     OS.write(Input.getBufferStart(), Input.getBufferSize());
----------------
tra wrote:
> Does the bundler anways create the file from scratch or truncate it?
> If it were to operate on existing file, seek would leave some data as is and that may result in nondeterministic output.
> It may be better to explicitly zero the padding.
It will truncate the output file if it exists, therefore it should be fine to use seek.


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

https://reviews.llvm.org/D88734



More information about the cfe-commits mailing list