1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-02-01 05:01:59 +01:00

[PM] Fix a silly bug in my recent update to the CG update logic.

I used the wrong variable to update. This was even covered by a unittest
I wrote, and the comments for the unittest were correct (if confusing)
but the test itself just matched the buggy behavior. =[

llvm-svn: 307764
This commit is contained in:
Chandler Carruth 2017-07-12 09:08:11 +00:00
parent b6b2ab061b
commit 4a89b23644
2 changed files with 7 additions and 7 deletions

View File

@ -373,7 +373,7 @@ incorporateNewSCCRange(const SCCRangeT &NewSCCRange, LazyCallGraph &G,
// Ensure new SCCs' function analyses are updated.
if (NeedFAMProxy)
updateNewSCCFunctionAnalyses(*C, G, AM);
updateNewSCCFunctionAnalyses(NewC, G, AM);
// Also propagate a normal invalidation to the new SCC as only the current
// will get one from the pass manager infrastructure.

View File

@ -1261,12 +1261,12 @@ TEST_F(CGSCCPassManagerTest, TestAnalysisInvalidationCGSCCUpdate) {
// split their SCCs. Then we re-run over the whole module. Then we re-run
// over three functions merged back into a single SCC, and then over the
// whole module again.
EXPECT_EQ(6 + 2 + 6 + 3 + 6, FunctionAnalysisRuns);
EXPECT_EQ(6 + 3 + 6 + 3 + 6, FunctionAnalysisRuns);
// Re run the function analysis twice over the entire module, and then re-run
// it over the `(h3, h1, h2)` SCC due to invalidation. Then we re-un over
// three functions merged back into a single SCC, and then over the whole
// module.
EXPECT_EQ(6 + 2 + 6 + 3 + 6, IndirectFunctionAnalysisRuns);
// Re run the function analysis over the entire module, and then re-run it
// over the `(h3, h1, h2)` SCC due to invalidation. Then we re-run it over
// the entire module, then the three functions merged back into a single SCC,
// and then over the whole module.
EXPECT_EQ(6 + 3 + 6 + 3 + 6, IndirectFunctionAnalysisRuns);
}
}