summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/SCCP.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-07-18 08:34:52 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-07-18 08:34:52 +0000
commitf0a5bcaae406b0de9a2c4ec994902f27e6841d5c (patch)
tree7a006fa2296db5eb3df1a191a94e1a4154266020 /llvm/lib/Transforms/Scalar/SCCP.cpp
parentc44cb6bd9f94ec66ed25fc561b8687bcfaee153a (diff)
downloadbcm5719-llvm-f0a5bcaae406b0de9a2c4ec994902f27e6841d5c.tar.gz
bcm5719-llvm-f0a5bcaae406b0de9a2c4ec994902f27e6841d5c.zip
Delete a redundant if branch.
llvm-svn: 14967
Diffstat (limited to 'llvm/lib/Transforms/Scalar/SCCP.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/SCCP.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/SCCP.cpp b/llvm/lib/Transforms/Scalar/SCCP.cpp
index dc141d5b54e..3557cadd402 100644
--- a/llvm/lib/Transforms/Scalar/SCCP.cpp
+++ b/llvm/lib/Transforms/Scalar/SCCP.cpp
@@ -175,10 +175,7 @@ private:
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();
OpenPOWER on IntegriCloud