[llvm] 46853b9 - [SCCP] Drop unused early exit from visitStoreInst (NFC).

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 18 11:46:15 PDT 2020


Author: Florian Hahn
Date: 2020-04-18T19:44:54+01:00
New Revision: 46853b95ca550ccd6e2700df85f2a5f558134bb3

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

LOG: [SCCP] Drop unused early exit from visitStoreInst (NFC).

There are no lattice values associated with store instructions
directly. They will never get marked as overdefined.

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 6bb19383964c..187f26f7ca52 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -1061,11 +1061,6 @@ void SCCPSolver::visitStoreInst(StoreInst &SI) {
   if (TrackedGlobals.empty() || !isa<GlobalVariable>(SI.getOperand(1)))
     return;
 
-  // ResolvedUndefsIn might mark I as overdefined. Bail out, even if we would
-  // discover a concrete value later.
-  if (isOverdefined(ValueState[&SI]))
-    return (void)markOverdefined(&SI);
-
   GlobalVariable *GV = cast<GlobalVariable>(SI.getOperand(1));
   auto I = TrackedGlobals.find(GV);
   if (I == TrackedGlobals.end())


        


More information about the llvm-commits mailing list