clspv icon indicating copy to clipboard operation
clspv copied to clipboard

add support for memcpy/memset with opaque pointers

Open rjodinchr opened this issue 3 years ago • 0 comments

Use InferType to get the type. If InferType returns null, it means that we are not capable of inferring the type. In that case, choose an appropriate type and add a gep so that future pass can infer the type we choose. ReplacePointerBitcast might rework what we did in this pass to have something coherent at a function level.

Fix memcpy, which did not work as expected when having no unpacking but a type smaller than the size of the copy. Fix it by removing the if statement which is not needed. It will produce unnecessary gep, which is not a issue.

Fix memset to work on a subset of a type. It still needs to be complete type, like for memcpy.

rjodinchr avatar Aug 11 '22 08:08 rjodinchr