This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: Fix RTL sharing found during PPC bootstrap


Hi Jan,

On Sat, 16 Dec 2006, Jan Hubicka wrote:
> this patch brings PPC into bootstrapland with RTL sharing verifier.
> The first part is fixing expand_synth_mult that is called from
> unroll-loops and producing shared SUBREGS.

Instead of a calling copy_rtx on op0 repeatedly in expand_mult_const
how about generalizing the code:

  /* Avoid referencing memory over and over.
     For speed, but also for correctness when mem is volatile.  */
  if (MEM_P (op0))
    op0 = force_reg (mode, op0);

and instead always call force_reg on op0.  I disagree that RTL
expansion assumes that sharing is OK, rather I think the problem
is that RTL expansion often assumes that it's operands are pseudos.
This no only prevent the sharing issue, but may generate more
efficient code where by avoiding repeated evaluation of a general
operand.

I much prefer the alternate fix if it bootstraps and regression
tests without problems.  And if you're planning on regularly
contributing to GCC, you should remember to include a ChangeLog
with your patch submissions :-)

Roger
--


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