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]
Other format: [Raw text]

RE: Bogus REG_EQUIV note generation [was RE: Deep CSE bug!]


> -----Original Message-----
> From: Jeffrey A Law
> Sent: 23 June 2004 18:38

> > the move-by-words infinitely.  I presume I have to do something like
> > 
> >         rtx nop_move = gen_rtx_SET (mode, x, y);
> >         last_insn = emit_insn (nop_move);
> > 
> > yes?  I'll be giving that a go after I hit send on this 
> post, anyway.
> Looks like the right idea.

  It just occurs to me to wonder exactly when to emit it.  Just after the
loop that decomposes the subwords is this bit of code

      /* Show the output dies here.  This is necessary for SUBREGs
	 of pseudos since we cannot track their lifetimes correctly;
	 hard regs shouldn't appear here except as return values.
	 We never want to emit such a clobber after reload.  */
      if (x != y
	  && ! (reload_in_progress || reload_completed)
	  && need_clobber != 0)
	emit_insn (gen_rtx_CLOBBER (VOIDmode, x));

  Now, I can imagine that emitting a move into x immediately before x gets
clobbered isn't going to do much good.  OTOH that clobber only gets emitted
if we're setting things other than a subreg (when we decompose x).  I'm not
sure what conditions would make that happen.

>  You might have a peek at
> emit_no_conflict_block.  In fact, I'm not sure why we're not using
> emit_no_conflict_block since it's whole purpose is to do a series
> of operations on a multi-word object one word at a time, add the
> necessary notes, etc etc.

  Mmmm, so I see.  Mind you it only emits the REG_EQUAL note on the last
insn, which is the situation that was causing the problem in the first
place: having a const_double REG_EQUAL on an insn that only set one single
subword part.  

  Maybe an effective approach would be to replace the decomposition loop in
emit_move_insn_1 with a call to emit_no_conflict_block and get
emit_no_conflict_block to emit decomposed REG_EQUAL notes and a nop move?

    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


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