<div dir="auto"><span style="font-family:sans-serif;font-size:16.512px">SelectionDAGBuilder contained within SelectionDAGISel has a map (NodeMap) b/w Value (Instruction) and corrosponding dag value (SDValue).</span><div dir="auto" style="font-family:sans-serif;font-size:16.512px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:16.512px">Isn't that usable for your purpose.</div><div dir="auto" style="font-family:sans-serif;font-size:16.512px"><br></div><div dir="auto" style="font-family:sans-serif;font-size:16.512px">Thanks,</div><div dir="auto" style="font-family:sans-serif;font-size:16.512px">Jatin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 27 Nov 2017 18:21, "Jonathan via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I am working on llvm gpu backend. The instruction metadata can only get in IR (class instruction). In DAG stage, the instructions are reordered, so I cannot map the metadata to correct instruction if I cannot access instruction from DAG or MachineInstr structure.<div><br></div><div><br><div><blockquote type="cite"><div>On Nov 26, 2017, at 11:02 PM, Ryan Taylor <<a href="mailto:ryta1203@gmail.com" target="_blank">ryta1203@gmail.com</a>> wrote:</div><br class="m_-6393046661858355501Apple-interchange-newline"><div><div dir="auto">It might be a more useful to know what it is you need from the IR in the DAG or what it is you r trying to do?<div dir="auto"><br></div><div dir="auto"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Nov 25, 2017 7:59 PM, "Jonathan via llvm-dev" <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote">The llvm backend uses class Instruction in IR handle stage, create SDVaule and DAG in DAG translation stage and class MachineInstr in Machine instruction translation stage.<br>
Can I access class Instruction from DAG structure or stage, or access DAG and Instruction from MachineInstr structure or stage?<br>
<br>
Jonathan<br>
______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>
</div></blockquote></div><br></div></div><br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div></div>