[PATCH] D70669: [AArch64TTI] Do not return TCC_Free for all unknown intrinsics.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 12:31:38 PST 2019


fhahn added a comment.

In D70669#1759879 <https://reviews.llvm.org/D70669#1759879>, @SjoerdMeijer wrote:

> I wanted to look into this to make a less hand wavy suggestion, but I got lost a little bit lost, which always happens when I look in that jungle that is TTI and TTIImpl etc., so will just ask a question instead.
>
> But I was wondering why can't we look at the instruction, and also look at the (immediate) arguments, and depending on how we expect them to get materialized return a cost that is  something like the cost_instruction + cost_immediate?


I think currently we just look at the instruction and ignore the operands for the cost. IIRC some passes include the cost of the arguments in the cost they use, but I think in some cases that's quite pass specific. I think the problem with including the cost of the arguments is that in order to compute the cost of an argument that's an instruction, do we also compute the cost of that instruction? How far do we recurse? For constants that's no need to recurse, but I am not sure if there is a big benefit by including their cost?

Anyways, I agree that there's a lot of potential to improve TTI, but I am not sure it should be done as part of this patch :)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70669





More information about the llvm-commits mailing list