void const_and_copies::pop_to_marker (void) { while (stack.length () > 0) { tree prev_value, dest; dest = stack.pop (); /* A NULL value indicates we should stop unwinding, otherwise pop off the next entry as they're recorded in pairs. */ if (dest == NULL) break; if (dump_file && (dump_flags & TDF_DETAILS)) { fprintf (dump_file, "<<<< COPY "); print_generic_expr (dump_file, dest, 0); fprintf (dump_file, " = "); print_generic_expr (dump_file, SSA_NAME_VALUE (dest), 0); fprintf (dump_file, "\n"); } prev_value = stack.pop (); set_ssa_name_value (dest, prev_value); } }
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); }
void const_and_copies::record_const_or_copy (tree x, tree y, tree prev_x) { /* Y may be NULL if we are invalidating entries in the table. */ if (y && TREE_CODE (y) == SSA_NAME) { tree tmp = SSA_NAME_VALUE (y); 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); stack.reserve (2); stack.quick_push (prev_x); stack.quick_push (x); }