]> granicus.if.org Git - llvm/commit
[InlineCost] Refactor the checks for different analyses to be a bit more
authorChandler Carruth <chandlerc@gmail.com>
Mon, 14 Aug 2017 21:25:00 +0000 (21:25 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 14 Aug 2017 21:25:00 +0000 (21:25 +0000)
commit91ffe00c5797daa27c9dac33d051b598a78f2440
tree200107baf69313aa74e0b91f355980545fbc090c
parent68d0bd1ed4f2ffe240f711c6dea176f459366db4
[InlineCost] Refactor the checks for different analyses to be a bit more
localized to the code that uses those analyses.

Technically, this can change behavior as we no longer require the
existence of the ProfileSummaryInfo analysis to use local profile
information via BFI. We didn't actually require the PSI to have an
interesting profile though, so this only really impacts the behavior in
non-default pass pipelines.

IMO, this makes it substantially less surprising how everything works --
before an analysis that wasn't actually used had to exist to trigger
*any* profile aware inlining. I think the new organization makes it more
obvious where various checks for profile signals happen.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310888 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/InlineCost.cpp
test/Transforms/Inline/pr26698.ll