This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: extra machine-dependent passes
On Wed, Jun 20, 2001 at 09:38:05AM -0400, DJ Delorie wrote:
> We'd have to add a whole new pass for that. Adding them as and when
> needed is just as complex.
Huh? You exaggerate.
void
emit_initial_value_sets ()
{
struct initial_value_struct *ivs = fun->hard_reg_initial_vals;
int i;
rtx seq;
if (ivs == 0)
return;
start_sequence ();
for (i = 0; i < ivs->num_entries; i++)
emit_move_insn (ivs->entries[i].pseudo, ivs->entries[i].hard_reg);
seq = get_insns ();
end_sequence ();
emit_insns_after (seq, get_insns ());
}
Call that in rest_of_compilation here:
/* Now that integrate will no longer see our rtl, we need not
distinguish between the return value of this function and the
return value of called functions. Also, we can remove all SETs
of subregs of hard registers; they are only here because of
- integrate.*/
+ integrate. Also, we can now initialize pseudos intended to
+ carry magic hard reg data throughout the function. */
rtx_equal_function_value_matters = 0;
purge_hard_subreg_sets (get_insns ());
+ emit_initial_value_sets ();
/* Don't return yet if -Wreturn-type; we need to do jump_optimize. */
r~