This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: extra machine-dependent passes


On Tue, Jun 19, 2001 at 04:24:39PM -0400, DJ Delorie wrote:
> Here, in get_func_hard_reg_initial_val:
> 
> +   push_topmost_sequence ();
> +   emit_insn_after (gen_rtx_SET (VOIDmode,
> + 				ivs->pseudos[ivs->num_entries-1],
> + 				gen_rtx_REG (mode, regno)),
> + 		   get_insns ());
> +   pop_topmost_sequence ();

Then indeed, I don't understand at all.

> 	gen_movsi_pic (operands[0], operands[1],
> 		       get_hard_reg_initial_value (PIC_REGNO, Pmode));

This is going to get called during initial code generation.
Which means that the above sequence is going to get emitted
into every relevant function before inlining.  Since you don't
seem to be making any effort to remove that set, don't you 
wind up with

	(set psuedoINNER pseudoOUTER)
	(set psuedoINNER somehardreg)

somewhere in the middle of the final function?

Seems to me the copy from the hard reg can only happen in the
non-inlined copy of the function.

> I would think that either an eliminable virtual register or CSE would
> take care of those cases.

Maybe.  I wouldn't trust CSE to eliminate a set of a hard register.



r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]