[llvm-dev] Bundling MachineInstr instructions before register allocation seems to always give errors
Matthias Braun via llvm-dev
llvm-dev at lists.llvm.org
Thu Feb 23 20:09:48 PST 2017
In theory it should be possible. In practice you will run into issues because nobody is really doing that right now so some things like liveness updates are semi-broken. I am currently working on some patches myself for bundling some things pre-ra myself. I should put up some fixes for the infrastructure soon(ish).
- Matthias
> On Feb 23, 2017, at 6:45 AM, Alex Susu via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hello.
> I am having difficulties to bundle MachineInstr instructions, before register allocation (RA).
> More exactly, I registered a simple pass in addPreRegAlloc() that is trying to create bundles.
>
> I see that it is written at http://llvm.org/docs/CodeGenerator.html#machineinstr-bundles:
> <<Packing / bundling of MachineInstr’s should be done as part of the register
> allocation super-pass.
> More specifically, the pass which determines what MIs should be bundled
> together must be done after code generator exits SSA form (i.e.
> after two-address pass, PHI elimination, and copy coalescing).
> Bundles should only be finalized (i.e. adding BUNDLE MIs and input and
> output register MachineOperands) after virtual registers have been
> rewritten into physical registers.
> This requirement eliminates the need to add virtual register operands
> to BUNDLE instructions which would effectively double the virtual
> register def and use lists.>>
>
> I presume this is the reason why I'm getting always errors after creating bundles in the pass registered in addPreRegAlloc().
> More exactly, my pass seems to be invoked before the "Eliminate PHI nodes for register allocation" pass.
>
> If however, there is a simple possibility to bundle MachineInstr before RA, please let me know.
>
> Thank you,
> Alex
>
> PS: Is there a possibility to bundle MachineInstr instructions before RA and use llvm::finalizeBundle() on these bundles in a pass invoked after RA?
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
More information about the llvm-dev
mailing list