Currently block is translated to a structure equivalent to
struct Block { void *isa; int flags; int reserved; void *invoke; void *descriptor; };
Except invoke, which is the pointer to the block invoke function,
all other fields are useless for OpenCL, which clutter the IR and
also waste memory since the block struct is passed to the block
invoke function as argument.
On the other hand, the size and alignment of the block struct is
not stored in the struct, which causes difficulty to implement
__enqueue_kernel as library function, since the library function
needs to know the size and alignment of the argument which needs
to be passed to the kernel.
This patch removes the useless fields from the block struct and adds
size and align fields. The equivalent block struct will become
struct Block { int size; int align; generic void *invoke; /* custom fields */ };
It also changes the pointer to the invoke function to be
a generic pointer since the address space of a function
may not be private on certain targets.
Why removing this?