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 in ifcvt try 2


> On Fri, Jun 27, 2003 at 09:51:34PM +0200, Jan Hubicka wrote:
> > +   /* Even tought we take care to unshare seqeuence after emit, we have
> > +      to unshare it's arguments so we don't get sharing in between
> > +      the sequence and outer chain.  */
> > +   cond = copy_rtx (cond);
> > +   x = copy_rtx (x);
> 
> This part is easier to do centrally (without wasting memory) if you 
> do *not* reset the "mark set" bit in unshare_all_rtl_in_chain, but
> instead *set* the bit in noce_process_if_block.

OK, so you mean to set centrelly these bits for all operands put into
if_info and clear it after processing believing that no one will
actually fetch extra data from the insn chain directly?
This is already done in some cases in noce_try_cmove_arith and other,
but certainly I can deal with these by hand..

Perhaps we need verifier thatn RTL is unshared.  RTL sharing is nasty
issue and the this sollution looks a bit unsafe.
Do you think that hooking the code from unshare_all_rtx that will
actualy ICE when something should be copied called from somewhere like
verify_insn_chain would be usefull?
I recall that I wrote code to verify some other RTL invariants (like
that there should be no VOIDmodes in subregs or that binary operations
should have same modes) but don't remember what happent to it...

Honza
> 
> 
> r~


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