[llvm] r307764 - [PM] Fix a silly bug in my recent update to the CG update logic.
Chandler Carruth via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 02:08:11 PDT 2017
Author: chandlerc
Date: Wed Jul 12 02:08:11 2017
New Revision: 307764
URL: http://llvm.org/viewvc/llvm-project?rev=307764&view=rev
Log:
[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. =[
Modified:
llvm/trunk/lib/Analysis/CGSCCPassManager.cpp
llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp
Modified: llvm/trunk/lib/Analysis/CGSCCPassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/CGSCCPassManager.cpp?rev=307764&r1=307763&r2=307764&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/CGSCCPassManager.cpp (original)
+++ llvm/trunk/lib/Analysis/CGSCCPassManager.cpp Wed Jul 12 02:08:11 2017
@@ -373,7 +373,7 @@ incorporateNewSCCRange(const SCCRangeT &
// 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.
Modified: llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp?rev=307764&r1=307763&r2=307764&view=diff
==============================================================================
--- llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp (original)
+++ llvm/trunk/unittests/Analysis/CGSCCPassManagerTest.cpp Wed Jul 12 02:08:11 2017
@@ -1261,12 +1261,12 @@ TEST_F(CGSCCPassManagerTest, TestAnalysi
// 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);
}
}
More information about the llvm-commits
mailing list