[LLVMdev] Overloaded intrinsics: name explosion

Ramkumar Ramachandra artagnon at gmail.com
Thu Jan 15 15:33:40 PST 2015


Hi,

So, we currently have gc.result.int, gc.result.float. gc.result.ptr,
gc.relocate, and gc.statepoint. gc.statepoint's signature is fine with
a iPTRAny as the first argument. gc.result is in trouble, because none
of the signatures admit even a simple array of integers, and there's
no aAny. And certainly no vectors. So we can get a gc.result.vector to
add to this mess, and admit [1] to make iAny work with integer arrays
(and fAny work with float arrays). Then we can't have an array of
pointers.

gc.relocate suffers from the same problem: we want to be able to
relocate a vector of pointers, but it's simply not possible with its
signature.

My proposal is to:
1. Introduce aAny.
2. Make iAny work with integer arrays (they already work with integer
vectors), fAny work with float arrays.
3. Introduce ifavpAny to admit basically anything, and clean up the
user-facing interface.

What do people think?

Ram

[1]: http://reviews.llvm.org/D6988



More information about the llvm-dev mailing list