Deleting jump tables and CFG

Geoff Keating geoffk@geoffk.org
Mon Dec 1 20:17:00 GMT 2003


Jan Hubicka <hubicka@ucw.cz> writes:

> >     I went into assumption that GGC thinks that 'u' does not point into
> >     RTL not accessible via normal INSN chain, but it does not appear to be
> >     the case, 'u' is not handled specially by ggc_mark_rtx_children, so I
> >     guess this is some kind of memory corruption.
> > 
> > I went through the same process.  But something is blowing up and it
> > definitely appears related to GC, so I'll have to investigate further.
> > But the root of the problem is clearly that the CODE_LABEL isn't in the insn
> > chain while the jumptable is.
> That should not be major problem assuming that problematic jumptable
> gets elliminated before final pass (so we don't get unreferenced
> labels).
> GGC has interesting behaviour when dealing with doubly linked chains
> that are not really doubly linked (as in the case of dead CODE_LABEL
> whose pointers point to the middle of RTL stream), perhaps you need to
> manage NEXT_INSN/PREV_INSN of that CODE_LABEL to be NULL.
> RTL_NEXT contains some tricks to get around this problem, so it may not
> be the case anyway...

Yes.  That code was written specifically to deal with this case.

(You meant RTL_PREV, not RTL_NEXT, I think.)

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc mailing list