[PATCH] [TTI] Add a new hook to TargetTransformInfo to query the target if a load of a constant should be converted to simply the constant itself.

Juergen Ributzka juergen at apple.com
Mon Jan 27 16:29:43 PST 2014


True, that is even better. In this case we can completely remove the dependence of SelectionDAG on TTI.
-Juergen

On Jan 27, 2014, at 4:26 PM, Chandler Carruth <chandlerc at google.com> wrote:

> 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.
> 
> 
> On Mon, Jan 27, 2014 at 4:20 PM, Juergen Ributzka <juergen at apple.com> wrote:
> Hi Hal
> 
> 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.
> 
> 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.
> 
> 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.
> 
> Please review.
> 
> Thanks
> 
> -Juergen
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140127/c94ba0f5/attachment.html>


More information about the llvm-commits mailing list