[PATCH] D76434: [SCEV] Query for immediate cost in Expander

Sam Parker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 08:05:30 PDT 2020


samparker added a comment.

I'm pretty sure there's only two APIs that were designed around throughput: 'getInstructionThroughput' and 'getArithmeticInstrCost' and maybe the latter should be named more explicitly. The code size calls are generally a bit more explicit, so there's 'getIntImmCodeSizeCost', which is not the one I've used.

> "how much more computations are we willing to do without it being too much of a burden?"

And this also depends what we're considering as a 'burden', and another angle that I'll probably need to look at in the near future is the burden of code size... Either way, this code shouldn't assume that constants are free (in any sense of the term).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76434/new/

https://reviews.llvm.org/D76434





More information about the llvm-commits mailing list