aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-scopedtables.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2016-02-08 01:17:32 -0700
committerJeff Law <law@gcc.gnu.org>2016-02-08 01:17:32 -0700
commit0b604d2dfcb7090d505f61926d52a3120d2a8ae6 (patch)
treea0b8a7032a204ba54d4ba93707fd009cc159e7f2 /gcc/tree-ssa-scopedtables.c
parent0992653dafae6e1f1da30565549bf60a830d3514 (diff)
downloadgcc-0b604d2dfcb7090d505f61926d52a3120d2a8ae6.zip
gcc-0b604d2dfcb7090d505f61926d52a3120d2a8ae6.tar.gz
gcc-0b604d2dfcb7090d505f61926d52a3120d2a8ae6.tar.bz2
re PR tree-optimization/65917 (XFAIL: gcc.dg/tree-ssa/20030922-2.c scan-tree-dump-times dom1 "if " 2)
PR tree-optimization/65917 * tree-ssa-dom.c (record_temporary_equivalences): Record both equivalences from if (x == y) style conditionals. (loop_depth_of_name): Remove. (record_equality): Remove loop depth check. * tree-ssa-scopedtables.h (const_and_copies): Refine comments. (const_and_copies::record_const_or_copy_raw): New member function. * tree-ssa-scopedtables.c (const_and_copies::record_const_or_copy_raw): New, factored out of (const_and_copies::record_const_or_copy): Call new member function. PR tree-optimization/65917 * gcc.dg/tree-ssa/20030922-2.c: No longer xfailed. From-SVN: r233207
Diffstat (limited to 'gcc/tree-ssa-scopedtables.c')
-rw-r--r--gcc/tree-ssa-scopedtables.c40
1 files changed, 26 insertions, 14 deletions
diff --git a/gcc/tree-ssa-scopedtables.c b/gcc/tree-ssa-scopedtables.c
index 613f50b..b18978e 100644
--- a/gcc/tree-ssa-scopedtables.c
+++ b/gcc/tree-ssa-scopedtables.c
@@ -700,6 +700,28 @@ const_and_copies::pop_to_marker (void)
}
}
+/* Record that X has the value Y and that X's previous value is PREV_X.
+
+ This variant does not follow the value chain for Y. */
+
+void
+const_and_copies::record_const_or_copy_raw (tree x, tree y, tree prev_x)
+{
+ if (dump_file && (dump_flags & TDF_DETAILS))
+ {
+ fprintf (dump_file, "0>>> COPY ");
+ print_generic_expr (dump_file, x, 0);
+ fprintf (dump_file, " = ");
+ print_generic_expr (dump_file, y, 0);
+ fprintf (dump_file, "\n");
+ }
+
+ set_ssa_name_value (x, y);
+ m_stack.reserve (2);
+ m_stack.quick_push (prev_x);
+ m_stack.quick_push (x);
+}
+
/* Record that X has the value Y. */
void
@@ -708,7 +730,9 @@ const_and_copies::record_const_or_copy (tree x, tree y)
record_const_or_copy (x, y, SSA_NAME_VALUE (x));
}
-/* Record that X has the value Y and that X's previous value is PREV_X. */
+/* Record that X has the value Y and that X's previous value is PREV_X.
+
+ This variant follow's Y value chain. */
void
const_and_copies::record_const_or_copy (tree x, tree y, tree prev_x)
@@ -720,19 +744,7 @@ const_and_copies::record_const_or_copy (tree x, tree y, tree prev_x)
y = tmp ? tmp : y;
}
- if (dump_file && (dump_flags & TDF_DETAILS))
- {
- fprintf (dump_file, "0>>> COPY ");
- print_generic_expr (dump_file, x, 0);
- fprintf (dump_file, " = ");
- print_generic_expr (dump_file, y, 0);
- fprintf (dump_file, "\n");
- }
-
- set_ssa_name_value (x, y);
- m_stack.reserve (2);
- m_stack.quick_push (prev_x);
- m_stack.quick_push (x);
+ record_const_or_copy_raw (x, y, prev_x);
}
bool