[PATCH] D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks

2019-02-21 Thread Andrew Savonichev via Phabricator via cfe-commits
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

[PATCH] D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks

2019-02-20 Thread Anastasia Stulova via Phabricator via cfe-commits
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

[PATCH] D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks

2019-02-20 Thread Alexey Sotkin via Phabricator via cfe-commits
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

[PATCH] D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks

2019-02-20 Thread Alexey Sotkin via Phabricator via cfe-commits
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

[PATCH] D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks

2019-02-20 Thread Anastasia Stulova via Phabricator via cfe-commits
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

[PATCH] D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks

2019-02-19 Thread Alexey Sotkin via Phabricator via cfe-commits
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

[PATCH] D58388: [OpenCL] Simplify LLVM IR generated for OpenCL blocks

2019-02-19 Thread Alexey Sotkin via Phabricator via cfe-commits
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::