[PATCH] D43783: [OpenCL] Remove block invoke function from emitted block literal struct

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 6 09:40:59 PST 2018

yaxunl added inline comments.

Comment at: lib/CodeGen/CGBlocks.cpp:1065-1067
+  llvm::Value *FuncPtr;
+  if (!CGM.getLangOpts().OpenCL) {
bader wrote:
> I think it would be more readable if we merge this if statement with the if statement at the line #1103.
> It's used to initialize FuncPtr for non-OpenCL languages and the first use of this variable is in the else block of if statement at the line #1103.
> If I didn't miss something it should reasonable to combine this if block with 'else' block at the line #1106.
BlockPtr is used on line 1093, so it cannot be moved to line 1106.


More information about the cfe-commits mailing list