<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;">Committed in r200271.<div><br></div><div>Cheers,</div><div>Juergen</div><div><br></div><div><br><div><div>On Jan 27, 2014, at 5:19 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: "Juergen Ributzka" <<a href="mailto:juergen@apple.com">juergen@apple.com</a>><br>To: "Hal J. Finkel" <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>><br>Cc: "Chandler Carruth" <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>>, "LLVM Commits" <<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a>><br>Sent: Monday, January 27, 2014 7:11:29 PM<br>Subject: Re: [PATCH] [TTI] Add a new hook to TargetTransformInfo to query the 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>Here is the updated patch.<br></blockquote><br>Looks good, thanks! Removing the TTI dependence seems like a nice cleanup.<br><br>-Hal<br><br><blockquote type="cite">-Juergen<br><br><br><br><br><br><br><br><br>On Jan 27, 2014, at 4:32 PM, Hal Finkel < <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> > wrote:<br><br><br><br>----- Original Message -----<br><br><br>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<br>query the target if a load of a constant should<br>be converted to simply the 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><br>I agree, this should be in TargetLowering. Otherwise, this seems<br>reasonable to me.<br><br>-Hal<br><br><br><br><br><br>On Mon, Jan 27, 2014 at 4:20 PM, Juergen Ributzka < <a href="mailto:juergen@apple.com">juergen@apple.com</a><br><br><br>wrote:<br><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>llvm-commits@cs.uiuc.edu<br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br><br><br>--<br>Hal Finkel<br>Assistant Computational Scientist<br>Leadership Computing Facility<br>Argonne National Laboratory<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>