[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 17:11:29 PST 2014
Here is the updated patch.
-Juergen
On Jan 27, 2014, at 4:32 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
>> From: "Chandler Carruth" <chandlerc at google.com>
>> To: "Juergen Ributzka" <juergen at apple.com>
>> Cc: "LLVM Commits" <llvm-commits at cs.uiuc.edu>
>> Sent: Monday, January 27, 2014 6:26:27 PM
>> Subject: Re: [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.
>>
>>
>>
>> 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.
>>
>
> I agree, this should be in TargetLowering. Otherwise, this seems reasonable to me.
>
> -Hal
>
>>
>>
>> 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
>>
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
> --
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140127/c2095080/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-TLI-Add-a-new-hook-to-TargetLowering.patch
Type: application/octet-stream
Size: 11700 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140127/c2095080/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140127/c2095080/attachment-0001.html>
More information about the llvm-commits
mailing list