[PATCH] D38610: [AMDGPU] Lower enqueued blocks and generate runtime metadata

Yaxun Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 14:17:49 PDT 2017


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


================
Comment at: lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp:82
+      auto *AddrCast = cast<ConstantExpr>(*BitCast->user_begin());
+      auto RuntimeHandle = (F.getName() + "_runtime_handle").str();
+      auto *GV = new GlobalVariable(
----------------
arsenm wrote:
> This is still producing a std::string. This should be an explicit Twine, not auto
I tried that but it does not work. I got corrupted string when use it. The Twine documentation says it does not live beyond the statement where it is defined. Since I need to use RuntimeHandle in two places, it cannot be Twine.


https://reviews.llvm.org/D38610





More information about the llvm-commits mailing list