[PATCH] PR opt/12280: Avoid RTL sharing in noce_emit_cmove

Jan Hubicka jh@suse.cz
Tue Nov 11 17:59:00 GMT 2003


> > > I am currently testing modified patch that allows sharing of CONSTs
> > > everywhere.
> > 
> > Maybe.  I'm thinking that we probably only shared CONSTs at all 
> > to make sharing of constant MEMs possible.  Perhaps we shouldn't
> > bother sharing them at all.
> 
> I an give this approach a try and return back on how many bugs it finds.
> Any good reasons for unsharing them?  (it looks quite wastefull for me).
> I think the only reason why CONSTs containing labels are shared is to
> get redirect_jump working on architectures that mangle destination label
> into CONST sequences.
> I was not able to come with any different case where sharing them might
> be harmfull and perhaps we may want to update it on the other side (make
> redirect_jump to always produce new CONST) that would harm just those
> interesting architectures.  (any example of these?)
> > 
> > Clearly all of this is going to require extensive testing on many
> > ports.  Your checker is going to find *lots* of latent bugs.
> 
> Yes.  I can find lots of latent bugs on i386 as well.
> Lets get the code into final form and not enable the checking until I
> get it bootstrapping at least on few main architectures.  Here is
> updated patch.  I finally got what you were shooting for with copy_rtx.
> Sorry for being so dense these days...

I also run into interesting sharing bug in i386.
We simply do expand division during loop unrolling.  The division
instruction is represented as divide+mod combo so the operands appears
twice and thus get shared.
What would you think about my plan to unshare each insn sequence emit to
the stream?

Honza



More information about the Gcc-patches mailing list