[PATCH] D74651: Add IR constructs for inalloca replacement llvm.call.setup
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 16 11:44:13 PDT 2020
aeubanks marked an inline comment as done.
aeubanks added a comment.
> In any case, I think we should use a name that makes sense for either implementation strategy.
>
> Should we double down on the `preallocated` terminology? `llvm.call.preallocated.arg`? The number arguments make more sense this way, they refer to the N'th "preallocated" argument. The pattern would be:
>
> %cs = call token @llvm.call.setup(i32 3)
> %x = call i8* @llvm.call.preallocated.arg(token %cs, i32 0)
> %y = call i8* @llvm.call.preallocated.arg(token %cs, i32 1)
> %z = call i8* @llvm.call.preallocated.arg(token %cs, i32 2)
> ...
>
>
> (I suppose that if we ever wanted to do staircasing, we would have to require that the calls be evaluated right to left.)
I like adding `preallocated` to the intrinsic name, but I think we should do it for all the intrinsics, especially since the `@llvm.call` prefix seems fairly generic.
Do `@llvm.call.preallocated.setup`, `@llvm.call.preallocated.arg`, and `@llvm.call.preallocated.teardown` sound good?
In D74651#1985503 <https://reviews.llvm.org/D74651#1985503>, @efriedma wrote:
> We still need a LangRef patch at some point.
>
> I suspect we might end up tweaking the signature of llvm.call.setup, based on the llvm-dev discussion, but we can experiment in-tree, I guess.
Does the LangRef patch typically come before, after, or in the same commit? After doing some experimenting?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74651/new/
https://reviews.llvm.org/D74651
More information about the llvm-commits
mailing list