]> granicus.if.org Git - llvm/commit
[InlineCost, NFC] Change CallAnalyzer::isGEPFree to use TTI::getUserCost instead...
authorEvgeny Astigeevich <evgeny.astigeevich@arm.com>
Thu, 27 Jul 2017 12:49:27 +0000 (12:49 +0000)
committerEvgeny Astigeevich <evgeny.astigeevich@arm.com>
Thu, 27 Jul 2017 12:49:27 +0000 (12:49 +0000)
commite067bb531a93576aa0af97e720d5c8fd734868de
tree2f63f30269b7fcf384309732cc96a38ab083f1c8
parent064cf49c35c96359ea016c9f69f1f6768c9a4a16
[InlineCost, NFC] Change CallAnalyzer::isGEPFree to use TTI::getUserCost instead of TTI::getGEPCost

Currently CallAnalyzer::isGEPFree uses TTI::getGEPCost to check if GEP is free.
TTI::getGEPCost cannot handle cases when GEPs participate in Def-Use dependencies
(see https://reviews.llvm.org/D31186 for example).
There is TTI::getUserCost which can calculate the cost more accurately by
taking dependencies into account.

Differential Revision: https://reviews.llvm.org/D33685

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@309268 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InlineCost.cpp