Simplify LLVM IR generated for OpenCL blocks
authorAndrew Savonichev <andrew.savonichev@intel.com>
Thu, 21 Feb 2019 11:02:10 +0000 (11:02 +0000)
committerGianfranco Costamagna <locutusofborg@debian.org>
Wed, 7 Aug 2019 13:11:36 +0000 (14:11 +0100)
commitd824db1c33d87333602df7a903781ac3f3d07f64
treeeb6585cbb2daac99c8b9202231da24171c53d993
parent3edf21e95bed597edb66487be51c084d58d201ff
Simplify LLVM IR generated for OpenCL blocks

Summary:
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()`

Reviewers: Anastasia, yaxunl, svenvh

Reviewed By: Anastasia

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D58388

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@354568 91177308-0d34-0410-b5e6-96231b3b80d8

Gbp-Pq: Name OpenCL-Simplify-LLVM-IR-generated-for-OpenCL-blocks.patch
clang/lib/CodeGen/CGBlocks.cpp
clang/lib/CodeGen/CGOpenCLRuntime.cpp
clang/lib/CodeGen/CGOpenCLRuntime.h
clang/test/CodeGenOpenCL/blocks.cl
clang/test/CodeGenOpenCL/cl20-device-side-enqueue.cl