aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhouyi Zhou <yizhouzhou@ict.ac.cn>2013-08-20 06:25:10 +0000
committerJeff Law <law@gcc.gnu.org>2013-08-20 00:25:10 -0600
commitd71ff3faa157470cb3425c7009ccddc335919ab3 (patch)
tree0b39e1aa3dc0b1f1cd32d8d2529a42ca517dc25b
parenta98cbc3694b03f28ebd51581c6d1cd5c13c52e10 (diff)
downloadgcc-d71ff3faa157470cb3425c7009ccddc335919ab3.zip
gcc-d71ff3faa157470cb3425c7009ccddc335919ab3.tar.gz
gcc-d71ff3faa157470cb3425c7009ccddc335919ab3.tar.bz2
tree-ssa-ccp.c (get_default_value): Remove redundant condition checks.
* tree-ssa-ccp.c (get_default_value): Remove redundant condition checks. From-SVN: r201870
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/tree-ssa-ccp.c23
2 files changed, 19 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1c95d9a..56e6fd4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-20 Zhouyi Zhou <yizhouzhou@ict.ac.cn>
+
+ * tree-ssa-ccp.c (get_default_value): Remove redundant condition
+ checks.
+
2013-08-20 David Malcolm <dmalcolm@redhat.com>
Make opt_pass and gcc::pass_manager be GC-managed, so that pass
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 6472f48..78687f7 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -258,12 +258,7 @@ get_default_value (tree var)
val.mask = double_int_minus_one;
}
}
- else if (is_gimple_assign (stmt)
- /* Value-returning GIMPLE_CALL statements assign to
- a variable, and are treated similarly to GIMPLE_ASSIGN. */
- || (is_gimple_call (stmt)
- && gimple_call_lhs (stmt) != NULL_TREE)
- || gimple_code (stmt) == GIMPLE_PHI)
+ else if (is_gimple_assign (stmt))
{
tree cst;
if (gimple_assign_single_p (stmt)
@@ -274,9 +269,19 @@ get_default_value (tree var)
val.value = cst;
}
else
- /* Any other variable defined by an assignment or a PHI node
- is considered UNDEFINED. */
- val.lattice_val = UNDEFINED;
+ {
+ /* Any other variable defined by an assignment is considered
+ UNDEFINED. */
+ val.lattice_val = UNDEFINED;
+ }
+ }
+ else if ((is_gimple_call (stmt)
+ && gimple_call_lhs (stmt) != NULL_TREE)
+ || gimple_code (stmt) == GIMPLE_PHI)
+ {
+ /* A variable defined by a call or a PHI node is considered
+ UNDEFINED. */
+ val.lattice_val = UNDEFINED;
}
else
{