[PATCH] D74651: Add IR constructs for inalloca replacement preallocated call setup
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 27 14:01:16 PDT 2020
aeubanks added a comment.
In D74651#2005985 <https://reviews.llvm.org/D74651#2005985>, @efriedma wrote:
> > What about if we directly replace the llvm.call.preallocated.arg() with an alloca (as opposed to an alloca in the entry block)?
>
> There can be more than one llvm.call.preallocated.arg referring to the same argument, so probably you'd want to insert the alloca at the point of the llvm.call.preallocated.setup. But yes, that should work.
We could go down the route of doing something similar to inalloca where the `llvm.call.preallocated.setup` becomes an `alloca` of a structure containing all the arguments, and the `llvm.call.preallocated.arg` becomes a gep of the `alloca`. I've changed the LangRef to say that. I'm not sure if I'm overspecifying in the LangRef though, maybe that should be an implementation detail?
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