On Thu, Nov 21, 2013 at 8:57 PM, Teresa Johnson wrote: > There are two problems I am fixing here (see > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59233 for full analysis). > > The first is the original ICE in crossjump optimization, which was > exposed by enabling -freorder-blocks-and-partition which was > conservatively preventing some upstream block combining optimizations. > The issue is that the block ended in a NOTE_INSN_DELETED, which > old_insns_match_p could not handle. I am fixing this by passing > old_insns_match_p the last instruction in the block that it knows how > to handle. > > The second issue this exposed was that we were unnecessarily marking > landing pad branches EDGE_PRESERVE since > flag_reorder_blocks_and_partition was on, even though this was -Os and > we will gate partitioning off.
So we keep an edge to a landing pad... Why is this a problem? > * bb-reorder.c (do_partition_blocks): New function. > (gate_handle_partition_blocks): Call do_partition_blocks. > * bb-reorder.h (do_partition_blocks): Declare. > * except.c (dw2_build_landing_pads): Call do_partition_blocks. Exporting this gate function from bb-reorder.c shouldn't be necessary. Better fix this at the root, in except.c. > * cfgcleanup.c (outgoing_edges_match): Walk up past note instructions > not understood by old_insns_match_p. This part is OK. Ciao! Steven