ARM Cast Cost Table

Nadav Rotem nrotem at apple.com
Tue Jan 29 10:46:32 PST 2013


Hi Renato, 

Thanks for working on this. I have some comments. 

The changes to ARMTargetMachine.h are unrelated to the cost model. Lets commit them in a separate patch. 

The code in ARMTTI::getCastInstrCos looks good.

+                                 ISD, DstTy.getSimpleVT(), SrcTy.getSimpleVT());

Did we pass the 80-col ?  I am not sure. 

In your test cases you execute both LLC and OPT. If you are checking the LLC generates the right pattern then this test should be in tests/CodeGen/ARM/.  Can you make the tests smaller ?  You can write a two-line function in LL that takes the arguments and performs the operation on it. 

Thanks,
Nadav 


On Jan 29, 2013, at 10:32 AM, Renato Golin <renato.golin at linaro.org> wrote:

> Hi Nadav,
> 
> This is an entry level change, just to make sure everything is in the right place and the infrastructure is ready. The code change is trivial.
> 
> http://llvm-reviews.chandlerc.com/D345
> 
> I spent a bit more time on tests, to make sure the costs were correctly taken and exposing the instruction I expect to do the cast clearly stated. 
> 
> Both tests refer to the same source code, but one is vectorized and the other is not. With time, we can fill them with cost checks for other instructions, I just didn't do it because I wasn't sure they were correct (some I know aren't).
> 
> cheers,
> --renato
> <cast-cost.patch>

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


More information about the llvm-commits mailing list