[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:20:17 PST 2014


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-TTI-Add-a-new-hook-to-TargetTransformInfo-to-query-t.patch
Type: application/octet-stream
Size: 6042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140127/1470014e/attachment.obj>


More information about the llvm-commits mailing list