yaxunl added inline comments.
Comment at: lib/CodeGen/CGBlocks.cpp:1318
+CGM.getModule().getMDKindID("invariant.load"),
+llvm::MDNode::get(getLLVMContext(), None));
+
rjmccall wrote:
> OpenCL blocks are still potentially function-local, right? I
rjmccall added inline comments.
Comment at: lib/CodeGen/CGBlocks.cpp:1318
+CGM.getModule().getMDKindID("invariant.load"),
+llvm::MDNode::get(getLLVMContext(), None));
+
OpenCL blocks are still potentially function-local, right? I don't think
you
yaxunl created this revision.
yaxunl added reviewers: rjmccall, Anastasia.
OpenCL v2.0 s6.12.5:
Block variable declarations are implicitly qualified with const.
Therefore all block variables must be initialized at declaration time and
may not be reassigned.
As such, load of block in