[InlineCost] CallAnalyzer: use TTI info for extractvalue - they are free (PR50099)
authorRoman Lebedev <lebedev.ri@gmail.com>
Fri, 30 Apr 2021 10:22:35 +0000 (13:22 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 30 Apr 2021 10:55:11 +0000 (13:55 +0300)
commitba5b015b0de13b412d73d127ca181115c5e78717
tree367d7266d346055c7fb6fc86fbc7ea6278ee75cb
parentfd89af6880f33ead708abe2f7d88ecb687d4e0d2
[InlineCost] CallAnalyzer: use TTI info for extractvalue - they are free (PR50099)

It seems incorrect to use TTI data in some places,
and override it in others. In this case, TTI says
that `extractvalue` are free, yet we bill them.

While this doesn't address https://bugs.llvm.org/show_bug.cgi?id=50099 yet,
it reduces the cost from 55 to 50 while the threshold is 45.

Differential Revision: https://reviews.llvm.org/D101228
llvm/lib/Analysis/InlineCost.cpp
llvm/test/Transforms/Inline/X86/extractvalue.ll