[PATCH] D43769: [TTI] rename getArithmeticInstructionCost() to getUnitThroughput(); NFC

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 27 11:16:48 PST 2018


spatel added a comment.

In https://reviews.llvm.org/D43769#1020967, @ABataev wrote:

> In https://reviews.llvm.org/D43769#1020943, @spatel wrote:
>
> > > This just needs to be fixed somehow, e.g by introducing some multiplier.
> >
> > Now I'm even more confused.
> >
> > The cost model is approximating the throughput of the entire target, not a single pipeline/execution unit.
> >  But https://reviews.llvm.org/D43733 did the opposite of that. We said that FP ops after Pentium4 have the lowest possible reciprocal throughput value which means they have the same throughput as an integer add.
> >  Did we purposely introduce wrong costs because we acknowledge that the cost-based calculations in the vectorizers are broken? And this is how we are working around that?
>
>
> The throughput of the integer ops is something about 0.25-0.5, but we just can't represent these numbers with integer type, so we just round these values to 1. That's why I say, that we need some kind of multiplier to fix this problem.


Ok, but do you agree that changing the cost of FP ops to be the same as int ops moved us further away from x86 reality than before?


https://reviews.llvm.org/D43769





More information about the llvm-commits mailing list