<div dir="ltr"><div><div>I think the "initial selection DAG" building process should be target independent. After that, there is DAG combining, legalization, instruction selection and scheduling all of which are at least partially target-dependent.<br><br></div>As far as TableGen records, the ones from your target should really only be consulted as part of instruction selection and scheduling as far as I'm aware. And the DAG instruction selector will actually output information about which record it is using for the match and if it does not match, it mentions the index where the match failed.<br><br></div>N<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 3, 2016 at 3:05 AM, Alex Susu via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">  Hello.<br>
    In order to detect a problem in the initial selection DAG creation that I have in my back end I need to output detailed debug info from the SelectionDAG.cpp module with all the TableGen records that are being processed, and compare between a working back end and my buggy back end.<br>
<br>
    I can debug by adding myself DEBUG() statements in the visit*() methods of the SelectionDAG.cpp module or by using GDB on this module.<br>
    Did anybody try a better way for debugging the selection DAG creation within the SelectionDAG.cpp module?<br>
<br>
  Thank you,<br>
    Alex<br>
_______________________________________________<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/mailman/listinfo/llvm-dev</a><br>
</blockquote></div><br></div>