Emit direct call of block invoke functions when possible, i.e. in case the
block is not passed as a function argument.
Also doing some refactoring of CodeGenFunction::EmitBlockCallExpr()
Details
Details
Diff Detail
Diff Detail
Event Timeline
lib/CodeGen/CGBlocks.cpp | ||
---|---|---|
1274 | I think it's reasonable enough... if we restrict blocks as parameters in the spec later it should be easy enough to modify this code. | |
lib/CodeGen/CGOpenCLRuntime.cpp | ||
131 | Btw, does this handle the case when we assign a variable multiple time? I was just wondering if we need a loop somewhere? I.e. does something like this work now: typedef void (^bl_t)(local void *); bl_t a = ...; bl_t b = a; bl_t c = b; c(); enqueue_kernel(... c, ...); |
lib/CodeGen/CGOpenCLRuntime.cpp | ||
---|---|---|
131 | You are right, we need a loop. Now it works. |
I think it's reasonable enough... if we restrict blocks as parameters in the spec later it should be easy enough to modify this code.