Description
We install the GC after register allocation and stack frame construction so that the GC can see a fully concrete stack. We would like to run complex instruction selection (#763) before register allocation, since some complex instructions can require fewer temporaries than the subgraphs they replace. Together this implies that complex instructions cannot be used in the GC, which is problematic since some of them (conditional operations, multi-base memory access) could be quite useful there. We do not want to have to maintain a version of each GC for each target.
Possible solutions would be to allow the stack to be partially concrete in some language (concrete above a frame, abstract below it), or to split instruction selection into one pass that runs before register allocation and one that runs after it (likely duplicating much logic and proof machinery).