[PATCH] Make InstCombine aware of TargetTransformInfo when optimize extension

Justin Holewinski jholewinski at nvidia.com
Tue Jun 30 09:34:38 PDT 2015


> On Jun 26, 2015, at 4:20 AM, Chandler Carruth <chandlerc at gmail.com> wrote:
> 
> This doesn't seem like the right approach at all.
> 
> I don't think we want to use cost heuristics to dictate the canonical form in the IR. It makes the canonicalization *much* more complex and hard to manage.

I agree.  I would prefer not to mix the concepts of legality and performance here.

> 
> I think that NVPTX should either change the datalayout to make i64 illegal (and that seems reasonable for instcombine to respect, but that would for example mean it would be an *absolute* decision, not a cost decision) or you'll need to do a late transform to narrow the operations as much as possible.

I don’t see how we could remove i64 as a legal type in NVPTX.  Our pointer size is 64-bit, so we need a container for pointers.

> 
> 
> http://reviews.llvm.org/D10750
> 
> EMAIL PREFERENCES
>  http://reviews.llvm.org/settings/panel/emailpreferences/
> 
> 


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------




More information about the llvm-commits mailing list