[PATCH] D74651: Add IR constructs for inalloca replacement llvm.call.setup

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 16 12:50:17 PDT 2020


rnk added a comment.

In D74651#1987254 <https://reviews.llvm.org/D74651#1987254>, @aeubanks wrote:

> 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?


I like that nomenclature. The the whole feature can be referred to as "calls with preallocated argument memory" or "preallocated call sites", and it sounds like grammatically correct English.

> 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?

I guess in this case it would be best to put together a LangRef patch to land before this one, in case anyone wants to look at it alone, without the boilerplate.

The main thing we need in LangRef is to document the verifier rules that were added, and the rules for how to use the intrinsics without causing UB. The intrinsics depend on some unobservable state (ESP), and have to be called in a particular order to work at runtime.


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