<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;"><div></div><div><br><div><div>On Jan 27, 2014, at 4:32 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">----- Original Message -----<br><blockquote type="cite">From: "Chandler Carruth" <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>><br>To: "Juergen Ributzka" <<a href="mailto:juergen@apple.com">juergen@apple.com</a>><br>Cc: "LLVM Commits" <<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>><br>Sent: Monday, January 27, 2014 6:26:27 PM<br>Subject: Re: [PATCH] [TTI] Add a new hook to TargetTransformInfo to query the<span class="Apple-tab-span" style="white-space: pre;">   </span>target if a load of a constant should<br>be converted to simply the<span class="Apple-tab-span" style="white-space: pre;"> </span>constant itself.<br><br><br><br>Why is this going into the TargetTransformInfo which is for use by<br>IR-level analysis routines when its only caller is in the<br>SelectionDAG? The SelectionDAG can query TargetLowering directly.<br><br></blockquote><br>I agree, this should be in TargetLowering. Otherwise, this seems reasonable to me.<br><br>-Hal<br><br><blockquote type="cite"><br><br>On Mon, Jan 27, 2014 at 4:20 PM, Juergen Ributzka < <a href="mailto:juergen@apple.com">juergen@apple.com</a><br><blockquote type="cite">wrote:<br></blockquote><br><br>Hi Hal<br><br>this is the new target hook we talked about before. I also added Evan<br>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<br>constant should be converted to just a constant, but the threshold<br>for this was set to an arbitrary value. This value works well for<br>the two targets (ARM and X86) that implement this target-hook, but<br>it isn't target-independent at all.<br><br>Now targets have the possibility to decide directly if this<br>optimization should be performed. The default value is set to false<br>to preserve the current behavior.<br><br>Please review.<br><br>Thanks<br><br>-Juergen<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br><br><br><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">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br><br></blockquote><br>--<span class="Apple-converted-space"> </span><br>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory</div></blockquote></div><br></div></body></html>