/* Allocate registers within a basic block, for GNU compiler.
Copyright (C) 1987, 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+ Inc.
This file is part of GCC.
/* If we haven't done so, record for reload that this is an
equivalencing insn. */
- if (!reg_equiv[regno].is_arg_equivalence
- && (!MEM_P (x) || rtx_equal_p (src, x)))
+ if (!reg_equiv[regno].is_arg_equivalence)
reg_equiv_init[regno]
= gen_rtx_INSN_LIST (VOIDmode, insn, reg_equiv_init[regno]);
/* Run old register allocator. Return TRUE if we must exit
rest_of_compilation upon return. */
-static void
+static unsigned int
rest_of_handle_local_alloc (void)
{
int rebuild_notes;
allocate_reg_info (max_regno, FALSE, TRUE);
/* And the reg_equiv_memory_loc array. */
- VARRAY_GROW (reg_equiv_memory_loc_varray, max_regno);
- reg_equiv_memory_loc = &VARRAY_RTX (reg_equiv_memory_loc_varray, 0);
+ VEC_safe_grow (rtx, gc, reg_equiv_memory_loc_vec, max_regno);
+ memset (VEC_address (rtx, reg_equiv_memory_loc_vec), 0,
+ sizeof (rtx) * max_regno);
+ reg_equiv_memory_loc = VEC_address (rtx, reg_equiv_memory_loc_vec);
allocate_initial_values (reg_equiv_memory_loc);
- regclass (get_insns (), max_reg_num (), dump_file);
+ regclass (get_insns (), max_reg_num ());
rebuild_notes = local_alloc ();
/* Local allocation may have turned an indirect jump into a direct
timevar_pop (TV_JUMP);
}
- if (dump_enabled_p (pass_local_alloc.static_pass_number))
+ if (dump_file && (dump_flags & TDF_DETAILS))
{
timevar_push (TV_DUMP);
- dump_flow_info (dump_file);
+ dump_flow_info (dump_file, dump_flags);
dump_local_alloc (dump_file);
timevar_pop (TV_DUMP);
}
+ return 0;
}
struct tree_opt_pass pass_local_alloc =