aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-dom.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2016-11-09 15:09:12 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2016-11-09 15:09:12 +0000
commit2c49f22a484e13d6fceeb2af6ea045c17ece466b (patch)
treee0f78d4e95fc767f706361bf8e00ac809f803d3b /gcc/tree-ssa-dom.c
parent68c937083c9bea6f91357e60e39db22750908506 (diff)
downloadgcc-2c49f22a484e13d6fceeb2af6ea045c17ece466b.zip
gcc-2c49f22a484e13d6fceeb2af6ea045c17ece466b.tar.gz
gcc-2c49f22a484e13d6fceeb2af6ea045c17ece466b.tar.bz2
tree-ssa-dom.c (canonicalize_comparison): Remove.
2016-11-09 Richard Biener <rguenther@suse.de> * tree-ssa-dom.c (canonicalize_comparison): Remove. (optimize_stmt): Remove redundant pre-propagation canonicalization of comparison operand order. From-SVN: r242003
Diffstat (limited to 'gcc/tree-ssa-dom.c')
-rw-r--r--gcc/tree-ssa-dom.c46
1 files changed, 0 insertions, 46 deletions
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 5376ff9..85689f3 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -753,49 +753,6 @@ make_pass_dominator (gcc::context *ctxt)
}
-/* Given a conditional statement CONDSTMT, convert the
- condition to a canonical form. */
-
-static void
-canonicalize_comparison (gcond *condstmt)
-{
- tree op0;
- tree op1;
- enum tree_code code;
-
- gcc_assert (gimple_code (condstmt) == GIMPLE_COND);
-
- op0 = gimple_cond_lhs (condstmt);
- op1 = gimple_cond_rhs (condstmt);
-
- code = gimple_cond_code (condstmt);
-
- /* If it would be profitable to swap the operands, then do so to
- canonicalize the statement, enabling better optimization.
-
- By placing canonicalization of such expressions here we
- transparently keep statements in canonical form, even
- when the statement is modified. */
- if (tree_swap_operands_p (op0, op1, false))
- {
- /* For relationals we need to swap the operands
- and change the code. */
- if (code == LT_EXPR
- || code == GT_EXPR
- || code == LE_EXPR
- || code == GE_EXPR)
- {
- code = swap_tree_comparison (code);
-
- gimple_cond_set_code (condstmt, code);
- gimple_cond_set_lhs (condstmt, op1);
- gimple_cond_set_rhs (condstmt, op0);
-
- update_stmt (condstmt);
- }
- }
-}
-
/* A trivial wrapper so that we can present the generic jump
threading code with a simple API for simplifying statements. */
static tree
@@ -1789,9 +1746,6 @@ optimize_stmt (basic_block bb, gimple_stmt_iterator si,
print_gimple_stmt (dump_file, stmt, 0, TDF_SLIM);
}
- if (gimple_code (stmt) == GIMPLE_COND)
- canonicalize_comparison (as_a <gcond *> (stmt));
-
update_stmt_if_modified (stmt);
opt_stats.num_stmts++;