[LLVMdev] 2 versions of printInstruction()
    Triple Yang 
    triple.yang at gmail.com
       
    Fri May 11 00:27:56 PDT 2012
    
    
  
Hi, LLVMers,
I notice that there are two versions of printInstruction() generated
by tablegen:
(1) XXXInstPrinter::printInstruction(const MCInst *MI, raw_ostream
&os), like for X86.
(2) XXXAsmPrinter::printInstruction(const MachineInstr *MI,
raw_ostream &os), like for Sparc.
I guess Sparc backend directly transform MachineInstr objects into
ostream, while X86 backend convert MachineInstr into MCInst first,
then prints out MCInst as text.
So, why does tablegen result in such differences?
Best regards.
-- 
æšćć (Yang Yongyong)
    
    
More information about the llvm-dev
mailing list