[llvm] r179413 - CostModel: increase the default cost of supported floating point operations from 1 to two. Fixed a few tests that changes because now the cost of one insert + a vector operation on two doubles is lower than two scalar operations on doubles.

Nadav Rotem nrotem at apple.com
Sun Apr 14 01:04:45 PDT 2013


On Apr 12, 2013, at 2:51 PM, Eric Christopher <echristo at gmail.com> wrote:

> At some point something more than magic numbers would be good. Maybe
> an enum or something at least with some accompanying documentation as
> to how the magic numbers were gotten. :)
> 

Hi Eric, 

The BasicTargetTransformInfo needs to implement heuristics for estimating the costs of instructions.  For example, it needs to estimate the cost of instructions that the different backends mark as 'legal' or 'custom'.  At the moment the magic numbers in the code are accompanied by a comment.  I don't think that grouping all of these numbers into a single table/enum would make them more readable. Do you think that we should do something similar to InlineCost.h ? It has fewer parameters but the idea is the same.
 
Thanks,
Nadav

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


More information about the llvm-commits mailing list