On Tue, May 28, 2013 at 9:36 PM, Richard Sandiford <rdsandif...@googlemail.com> wrote: > Hi Steven, > > Steven Bosscher <stevenb....@gmail.com> writes: >> Imho the active-insn "idiom" is the best solution for the moment. I >> will fix this mess properly asap, probably next week. > > Just wondering, how are things going with this? (I assume fixing it > properly means getting rid of the FIXME in next_active_insn?)
Yes, it involves getting this to work: ------------------------- bool tablejump_p (const_rtx insn, rtx *labelp, rtx *tablep) { rtx label, table; if (!JUMP_P (insn)) return false; label = JUMP_LABEL (insn); if (label != NULL_RTX && !ANY_RETURN_P (label) && (table = next_active_insn (label)) != NULL_RTX && JUMP_TABLE_DATA_P (table)) { + gcc_assert (table == NEXT_INSN (label)); if (labelp) *labelp = label; if (tablep) *tablep = table; return true; } return false; } ------------------------- and then going over the places where next_*_insn is used to get the table. The trouble is that I haven't yet found a case where the above does *not* work. Help welcome. Ciao! Steven