]> granicus.if.org Git - llvm/commit
[PM] Fix a really nasty bug introduced when adding PGO support to the
authorChandler Carruth <chandlerc@gmail.com>
Sun, 22 Jan 2017 10:34:01 +0000 (10:34 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Sun, 22 Jan 2017 10:34:01 +0000 (10:34 +0000)
commit4eca3114194fb48e2a7ec84b6eb382a956213447
treec82ad8abace4d3c0f8c9a1771607bbb3ab2bcad8
parent36a10eedff74178a83c607fd8db750524c47538a
[PM] Fix a really nasty bug introduced when adding PGO support to the
new PM's inliner.

The bug happens when we refine an SCC after having computed a proxy for
the FunctionAnalysisManager, and then proceed to compute fresh analyses
for functions in the *new* SCC using the manager provided by the old
SCC's proxy. *And* when we manage to mutate a function in this new SCC
in a way that invalidates those analyses. This can be... challenging to
reproduce.

I've managed to contrive a set of functions that trigger this and added
a test case, but it is a bit brittle. I've directly checked that the
passes run in the expected ways to help avoid the test just becoming
silently irrelevant.

This gets the new PM back to passing the LLVM test suite after the PGO
improvements landed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292757 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/Inliner.cpp
test/Other/new-pm-defaults.ll
test/Transforms/Inline/cgscc-incremental-invalidate.ll [new file with mode: 0644]