[LLVMdev] Instruction Cost

Sanjay Patel spatel at rotateright.com
Wed Jan 14 17:00:57 PST 2015


On Wed, Jan 14, 2015 at 5:08 PM, Hal Finkel <hfinkel at anl.gov> wrote:

> > 1. A series of APIs of TargetTransformInfo that compute the cost of
> > instructions of a particular type (e.g. getArithmeticInstrCost and
> > getShuffleCost)
>
> These are used by the vectorizers, and roughly, return costs in reciprocal
> throughput (the higher the throughput the lower the cost).
>

Do you think we could replace this with data from the CPU scheduling models
(if it exists in a particular CPU's model)?

One number for all CPUs may not always be adequate:
http://llvm.org/bugs/show_bug.cgi?id=21356
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150114/89f620af/attachment.html>


More information about the llvm-dev mailing list