aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-operands.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>2005-12-12 12:59:16 -0700
committerJeff Law <law@gcc.gnu.org>2005-12-12 12:59:16 -0700
commit0e0ed594114997686efba9a45b8782ce87c465c3 (patch)
treec76d6731feeecd4ca0a01da9f4b777624a718874 /gcc/tree-ssa-operands.c
parente525ba8e6ccfe6fd514ee115c97413f19f7700e8 (diff)
downloadgcc-0e0ed594114997686efba9a45b8782ce87c465c3.zip
gcc-0e0ed594114997686efba9a45b8782ce87c465c3.tar.gz
gcc-0e0ed594114997686efba9a45b8782ce87c465c3.tar.bz2
tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Remove reassociation code.
* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Remove reassociation code. * passes.c (init_optimization_passes): Run reassociation again after loop optimizations. * tree-ssa-dom.c (thread_across_edge): Canonicalize condition if necessary. (optimize_stmt): Ditto. (canonicalize_comparison): New function. * tree-ssa-operands.c (swap_tree_operands): Make external. (get_expr_operands): Stop auto-canonicalization. * tree-ssa-reassoc.c: Rewrite. (init_optimization_passes): * tree-flow.h (swap_tree_operands): Prototype. * Makefile.in (tree-ssa-reassoc.o): Update dependencies. * gcc.dg/tree-ssa/ssa-pre-2.c: Update due to reassociation changes. * gcc.dg/tree-ssa/reassoc-1.c: Likewise. * gcc.dg/tree-ssa/reassoc-2.c: Likewise. * gcc.dg/tree-ssa/reassoc-3.c: Likewise. * gcc.dg/tree-ssa/reassoc-4.c: Likewise. * gcc.dg/tree-ssa/reassoc-5.c: New. * gcc.dg/tree-ssa/reassoc-6.c: New. * gcc.dg/tree-ssa/reassoc-7.c: New. * gcc.dg/tree-ssa/reassoc-8.c: New. * gcc.dg/tree-ssa/reassoc-9.c: New. * gcc.dg/tree-ssa/reassoc-10.c: New. * gcc.dg/tree-ssa/reassoc-11.c: New. From-SVN: r108425
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r--gcc/tree-ssa-operands.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c
index 9edc840..72c2d71 100644
--- a/gcc/tree-ssa-operands.c
+++ b/gcc/tree-ssa-operands.c
@@ -1047,7 +1047,6 @@ swap_tree_operands (tree stmt, tree *exp0, tree *exp1)
*exp1 = op0;
}
-
/* Recursively scan the expression pointed to by EXPR_P in statement referred
to by INFO. FLAGS is one of the OPF_* constants modifying how to interpret
the operands found. */
@@ -1260,39 +1259,6 @@ get_expr_operands (tree stmt, tree *expr_p, int flags)
case ASSERT_EXPR:
do_binary:
{
- tree op0 = TREE_OPERAND (expr, 0);
- tree op1 = TREE_OPERAND (expr, 1);
-
- /* 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)
- {
- TREE_SET_CODE (expr, swap_tree_comparison (code));
- swap_tree_operands (stmt,
- &TREE_OPERAND (expr, 0),
- &TREE_OPERAND (expr, 1));
- }
-
- /* For a commutative operator we can just swap the operands. */
- else if (commutative_tree_code (code))
- {
- swap_tree_operands (stmt,
- &TREE_OPERAND (expr, 0),
- &TREE_OPERAND (expr, 1));
- }
- }
-
get_expr_operands (stmt, &TREE_OPERAND (expr, 0), flags);
get_expr_operands (stmt, &TREE_OPERAND (expr, 1), flags);
return;