[PATCH] D38610: [AMDGPU] Lower enqueued blocks and generate runtime metadata
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 6 10:55:20 PDT 2017
rampitec added inline comments.
================
Comment at: lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp:44
+
+ /// \brief Unify multiple OpenCL metadata due to linking.
+ class AMDGPUOpenCLEnqueuedBlockLowering : public ModulePass {
----------------
The comment looks wrong.
================
Comment at: lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp:74
+ bool Changed = false;
+ for (auto &I : M.functions()) {
+ if (I.hasFnAttribute("enqueued-block")) {
----------------
Can you change I with F? "I" associates with an instruction.
================
Comment at: lib/Target/AMDGPU/AMDGPUOpenCLEnqueuedBlockLowering.cpp:78
+ !isa<ConstantExpr>(*I.user_begin()) ||
+ !isa<ConstantExpr>(*I.user_begin()->user_begin())) {
+ continue;
----------------
Users of user_begin() can be empty.
https://reviews.llvm.org/D38610
More information about the llvm-commits
mailing list