HomePhabricator

[OpenCL] Remove block invoke function from emitted block literal struct

Description

[OpenCL] Remove block invoke function from emitted block literal struct

OpenCL runtime tracks the invoke function emitted for
any block expression. Due to restrictions on blocks in
OpenCL (v2.0 s6.12.5), it is always possible to know the
block invoke function when emitting call of block expression
or enqueue_kernel builtin functions. Since enqueu_kernel
already has an argument for the invoke function, it is redundant
to have invoke function member in the llvm block literal structure.

This patch removes invoke function from the llvm block literal
structure. It also removes the bitcast of block invoke function
to the generic block literal type which is useless for OpenCL.

This will save some space for the kernel argument, and also
eliminate some store instructions.

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

Details

Committed
yaxunlMar 7 2018, 11:32 AM
Differential Revision
D43783: [OpenCL] Remove block invoke function from emitted block literal struct
Branches
Unknown
Tags
Unknown