<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">True, that is even better. In this case we can completely remove the dependence of SelectionDAG on TTI.<div>-Juergen</div><div><br><div><div>On Jan 27, 2014, at 4:26 PM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Why is this going into the TargetTransformInfo which is for use by IR-level analysis routines when its only caller is in the SelectionDAG? The SelectionDAG can query TargetLowering directly.</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Jan 27, 2014 at 4:20 PM, Juergen Ributzka <span dir="ltr"><<a href="mailto:juergen@apple.com" target="_blank">juergen@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Hal<br>
<br>
this is the new target hook we talked about before. I also added Evan and Nadav, because I had to modify the ARM and X86 backend.<br>
<br>
Before this patch we used getIntImmCost to determine if a load of a constant should be converted to just a constant, but the threshold for this was set to an arbitrary value. This value works well for the two targets (ARM and X86) that implement this target-hook, but it isn't target-independent at all.<br>

<br>
Now targets have the possibility to decide directly if this optimization should be performed. The default value is set to false to preserve the current behavior.<br>
<br>
Please review.<br>
<br>
Thanks<br>
<span class="HOEnZb"><font color="#888888"><br>
-Juergen<br>
<br>
</font></span><br>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></body></html>