<div>This patch modifies Verifier.cpp to allow the first argument to llvm.gcroot to be a "non-pointer" alloca. This allows you to have an alloca of, say, struct type which may contain pointers that need to be traced. Note that the first argument is still required to be an alloca, but is no longer required to be an alloca of a pointer.</div>

<div><br></div><div>For safety, the code requires the metadata argument to llvm.gcroot to be a non-null constant if the first argument is anything but a pointer. The theory is that gcroot will need some kind of information about the structure of the item being traced in order to interpret it. Allocas which are pointers can point to tagged objects of some sort, so the metadata is optional in that case.</div>

<div><br></div><div>I've currently written a bunch of code for my own compiler which relies on this patch. (I'm fairly far along on a non-shadow-stack gc, which creates static call frame descriptor maps that store all of the offsets of pointers within the call frame. This will make it possible to handle concurrent collection, which shadow-stack cannot do. The hardest part so far has been supporting union types, which may or may not be traced depending on what's in the union at the moment.)</div>

<br>-- <br>-- Talin<br>