[llvm-dev] Running GlobaISel passes after SelectionDAG instruction selection
Quentin Colombet via llvm-dev
llvm-dev at lists.llvm.org
Mon Nov 7 11:23:51 PST 2016
> On Nov 7, 2016, at 9:57 AM, Tim Northover <tnorthover at apple.com> wrote:
> On 7 Nov 2016, at 09:28, Tom Stellard <tom at stellard.net> wrote:
>> I already have a working prototype where I run SelectionDAG ISel and
>> then the InstructionSelector pass right afterwards, but I think to
>> make this approach work long-term, we will need to agree that this is a
>> supported use case of GlobalISel, and we will also need to start
>> building the GlobalISel code by default.
> Enabling GlobalISel by default should be fine now. I think it was mostly disabled because we used to add extra type data to the MachineInstr class, which penalized existing memory usage. Now we store that in MachineRegisterInfo and there's no overhead unless you're actually using GlobalISel.
> My main worry is that this form of plumbing would seem to turn the fallback code path into an infinite loop if you're not careful (and not actually simplify SelectionDAG if you are).
> Other than that, I suppose the biggest issue would be divergence between what InstructionSelect expects (from RegBankSelect) and what your SelectionDAG shim is providing. I think that should be fairly minimal though (InstructionSelect needs to be able to cope with fully constrained VRegs anyway IMO), so no real objections here.
More information about the llvm-dev