You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AllocaOp verifies that the returned address type is the pointer of the allocated type, e.g. u64 * and u64. The dynamic allocation builtins, in general, are allocating buffers of size size bytes and returning void * pointers. To support this in #547, we introduced an AllocaOp of type u8, and had to later on bitcast the return address to void *. Usually right afterwards, the user of the builtin dynamic alloca will cast the operation to its intended value, e.g.
int *a = (int *)__builtin_alloca(sizeof(int) * size);
We should define a method to remove this redundant bitcasts by either (or both):
Allowing AllocaOp to have different address type than allocation type
Remove this redundancy later in CastOp::fold.
The text was updated successfully, but these errors were encountered:
AllocaOp
verifies that the returned address type is the pointer of the allocated type, e.g.u64 *
andu64
. The dynamic allocation builtins, in general, are allocating buffers of sizesize
bytes and returningvoid *
pointers. To support this in #547, we introduced anAllocaOp
of typeu8
, and had to later on bitcast the return address tovoid *
. Usually right afterwards, the user of the builtin dynamic alloca will cast the operation to its intended value, e.g.We should define a method to remove this redundant bitcasts by either (or both):
AllocaOp
to have different address type than allocation typeCastOp::fold
.The text was updated successfully, but these errors were encountered: