[llvm] df67589 - [CallGraphUpdater][NFC] Minor updates to D77855

Johannes Doerfert via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 19:28:37 PDT 2020


Author: Johannes Doerfert
Date: 2020-04-15T21:26:35-05:00
New Revision: df675890b7633ae8677b86be8a47ac21deb8b669

URL: https://github.com/llvm/llvm-project/commit/df675890b7633ae8677b86be8a47ac21deb8b669
DIFF: https://github.com/llvm/llvm-project/commit/df675890b7633ae8677b86be8a47ac21deb8b669.diff

LOG: [CallGraphUpdater][NFC] Minor updates to D77855

I uploaded the old version accidentally instead of the one with these
minor adjustments requested by the reviewers.

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

Added: 
    

Modified: 
    llvm/lib/Analysis/CallGraphSCCPass.cpp
    llvm/lib/Transforms/Utils/CallGraphUpdater.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Analysis/CallGraphSCCPass.cpp b/llvm/lib/Analysis/CallGraphSCCPass.cpp
index 8a222a62a585..79fa372917ca 100644
--- a/llvm/lib/Analysis/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/CallGraphSCCPass.cpp
@@ -563,7 +563,7 @@ void CallGraphSCC::ReplaceNode(CallGraphNode *Old, CallGraphNode *New) {
 }
 
 void CallGraphSCC::DeleteNode(CallGraphNode *Old) {
-  ReplaceNode(Old, /* New */ nullptr);
+  ReplaceNode(Old, /*New=*/nullptr);
 }
 
 //===----------------------------------------------------------------------===//

diff  --git a/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp b/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
index 219c46d0fe34..8cdf01e80935 100644
--- a/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
+++ b/llvm/lib/Transforms/Utils/CallGraphUpdater.cpp
@@ -112,7 +112,7 @@ void CallGraphUpdater::removeFunction(Function &DeadFn) {
     DeadFunctions.push_back(&DeadFn);
 
   // For the old call graph we remove the function from the SCC right away.
-  if (CGSCC && !ReplacedFunctions.count(&DeadFn))
+  if (CG && !ReplacedFunctions.count(&DeadFn))
     CGSCC->DeleteNode((*CG)[&DeadFn]);
 }
 


        


More information about the llvm-commits mailing list