[llvm] 977d27d - [SCCP] Report changes after removing stores to constant global

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 07:09:40 PDT 2020


Author: serge-sans-paille
Date: 2020-06-05T16:09:07+02:00
New Revision: 977d27d881fb06c03fd8ef1d62b543b696c508d4

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

LOG: [SCCP] Report changes after removing stores to constant global

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

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/SCCP.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index 6eb83af8a371..cfe5aea61093 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -2031,6 +2031,7 @@ bool llvm::runIPSCCP(
     while (!GV->use_empty()) {
       StoreInst *SI = cast<StoreInst>(GV->user_back());
       SI->eraseFromParent();
+      MadeChanges = true;
     }
     M.getGlobalList().erase(GV);
     ++IPNumGlobalConst;


        


More information about the llvm-commits mailing list