[LLVMdev] How to build a map between IR Instruction and MachineInstrs?

Haishan hndxvon at 163.com
Thu Dec 12 05:58:43 PST 2013


Hi,
  I try to add a backend (machine function) pass in LLVM 3.3 source code.
In order to analyse precise information of machine instructions, I need some information of
IR instruction which corresponds to MachineInstrs. If so, it's much easier to analyse IR Instructions instead of MachineInstrs.
However, in the frame of LLVM 3.3, I can't find the corresponding(connected) information
from Instruction to MachineInstrs in the CodeGenAndEmitDAG function.
PS: I once used IROrder which is a member of class SDNode as unchangeable information, but it's roughly corresponding information, so the map <Instruction*, vector<MachineInstr*> > often overlaps.
Could someone help me with that?
Thank you very much in advance.
-Haishan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131212/0e32caec/attachment.html>


More information about the llvm-dev mailing list