<div>Hi Ivan,</div><div><br></div><div>Matcher table generation which is implemented in utils/DAGISelEmitter.cpp does use heusiristics like number of instructions which a pattern will cover, latency (not the one which Targets scheduling defines) while emitting the candidate patterns for a give dag node.<br></div><div><br></div><div>Current implications may not be implication of algorithm in toto though.</div><div><br></div><div>Thanks,</div><div>JatinĀ <br><br>On Wednesday, March 28, 2018, Ivan Kulagin via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Is the algorithm described in the article "Near-Optimal Instruction<br>
Selection on DAGs<br>
(<a href="https://llvm.org/pubs/2008-CGO-DagISel.html" target="_blank">https://llvm.org/pubs/2008-<wbr>CGO-DagISel.html</a>)" really used in llvm<br>
instruction selection?<br>
I've studied implementation (SelectionDAGISel.cpp) and I see that<br>
instructions are selected<br>
by target specific MatcherTable generated by llvm-tblgen. In the<br>
implementation the first<br>
matching pattern from MatcherTable is selected but in the paper all<br>
matching patterns (in paper<br>
named tiles) are selected for each DAG node and cost estimation is<br>
performed for every tile and<br>
node. Then the best tiles are selected by dynamic programming.<br>
<br>
Could you please explain me how llvm instruction selection relates to<br>
the NOLTIS algorithm<br>
in the paper?<br>
<br>
Does it make sense to use dynamic programming for instruction<br>
selection based on MatcherTable?<br>
<br>
--<br>
With best regards,<br>
Ivan Kulagin.<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" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
</blockquote></div>