[llvm-dev] Pre-register allocation callback
Matthias Braun via llvm-dev
llvm-dev at lists.llvm.org
Mon Feb 20 17:49:56 PST 2017
TargetPassConfig is responsible for setting up the codegen pipeline. Most of its functions can be overridden to customize it for your target. Overriding addPreRegAlloc() may be useful in your case, an alternative that would be insertPass() which allows you to insert somthing after a given pass (though that is more bittle and I'd rather recommend the override method).
> On Feb 20, 2017, at 5:39 PM, Alex Susu via llvm-dev <llvm-dev at lists.llvm.org> wrote:
> I would like to implement in the back end a pre-register allocation (R.A.) small "pass" (in which I bundle some MachineInstr).
> So far I've managed to implement in method bool [Target]InstrInfo::expandPostRAPseudo(MachineInstr &MI), after R.A. as the name of the method implies, my small "pass", relying on the fact I actually want to treat only INLINEASM instructions, which are considered pseudo-instructions.
> Is there already a callback like expandPostRAPseudo() in [Target]InstrInfo or some other class where I can implement my small "pass" before R.A.? (I could implement a new machine pass registered before R.A., but I ask since maybe there is a simpler solution.)
> Thank you,
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
More information about the llvm-dev