This revision was automatically updated to reflect the committed changes.
Closed by commit rC354568: [OpenCL] Simplify LLVM IR generated for OpenCL
blocks (authored by asavonic, committed by ).
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58388/new/
https://revie
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Great! Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58388/new/
https://reviews.llvm.org/D58388
___
cfe-commits mail
AlexeySotkin marked an inline comment as done.
AlexeySotkin added inline comments.
Comment at: lib/CodeGen/CGOpenCLRuntime.cpp:131
+static const BlockExpr *getBlockExpr(const Expr *E) {
+ if (auto Cast = dyn_cast(E)) {
+E = Cast->getSubExpr();
Anastasia wrot
AlexeySotkin updated this revision to Diff 187575.
AlexeySotkin added a comment.
Fix resolving of block invoke function in case of sequence of assignments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58388/new/
https://reviews.llvm.org/D58388
Files:
lib/CodeGen/CGBlocks.cpp
lib/C
Anastasia added inline comments.
Comment at: lib/CodeGen/CGBlocks.cpp:1275
+// We *can* call the block directly unless it is a function argument.
+if (!isa(E->getCalleeDecl()))
+ Func = CGM.getOpenCLRuntime().getInvokeFunction(E->getCallee());
I thin
AlexeySotkin updated this revision to Diff 187399.
AlexeySotkin added a comment.
Fix ObjC lit tests failure
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58388/new/
https://reviews.llvm.org/D58388
Files:
lib/CodeGen/CGBlocks.cpp
lib/CodeGen/CGOpenCLRuntime.cpp
lib/CodeGen/CGOpenC
AlexeySotkin created this revision.
AlexeySotkin added reviewers: Anastasia, yaxunl, svenvh.
AlexeySotkin added a project: clang.
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::