[llvm-commits] CVS: llvm/lib/Transforms/Scalar/SCCP.cpp

LLVM llvm at cs.uiuc.edu
Sun Jul 18 01:35:03 PDT 2004



Changes in directory llvm/lib/Transforms/Scalar:

SCCP.cpp updated: 1.97 -> 1.98

---
Log message:

Delete a redundant if branch.


---
Diffs of the changes:  (+1 -4)

Index: llvm/lib/Transforms/Scalar/SCCP.cpp
diff -u llvm/lib/Transforms/Scalar/SCCP.cpp:1.97 llvm/lib/Transforms/Scalar/SCCP.cpp:1.98
--- llvm/lib/Transforms/Scalar/SCCP.cpp:1.97	Sat Jul 17 19:31:05 2004
+++ llvm/lib/Transforms/Scalar/SCCP.cpp	Sun Jul 18 03:34:52 2004
@@ -175,10 +175,7 @@
     hash_map<Value*, InstVal>::iterator I = ValueState.find(V);
     if (I != ValueState.end()) return I->second;  // Common case, in the map
       
-    if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
-      // The address of a global is a constant...
-      ValueState[V].markConstant(GV);
-    } else if (Constant *CPV = dyn_cast<Constant>(V)) {  // Constants are constant
+    if (Constant *CPV = dyn_cast<Constant>(V)) {  // Constants are constant
       ValueState[CPV].markConstant(CPV);
     } else if (isa<Argument>(V)) {                // Arguments are overdefined
       ValueState[V].markOverdefined();





More information about the llvm-commits mailing list