[llvm-dev] Cloning a MachineInstr

Jim Grosbach via llvm-dev llvm-dev at lists.llvm.org
Wed Dec 2 19:27:17 PST 2015


> On Dec 2, 2015, at 7:01 PM, Rail Shafigulin <rail at esenciatech.com> wrote:
> 
> 
> You shouldn’t need to modify the the MachineFunction to do that. Just emit the extra MCInst directly. The ARM backend does things analogous to this for some of its MC level pseudo-instructions that might prove useful as examples you could adapt.
> 
> 
> After looking at multiple options this was exactly my conclusion. Do you mind pointing me to the code in ARM that does that?

There’s a giant switch statement in ARMAsmPrinter::EmitInstruction() that does a lot of it. The ARM::BMOVPCRX_CALL case does multiple instruction expansion from a single MachineInstr.


> 
>  
> -- 
> Rail Shafigulin
> Software Engineer 
> Esencia Technologies

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151202/a104174a/attachment.html>


More information about the llvm-dev mailing list