This is the mail archive of the 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: [PR46204] sel-sched: delete empty BBs more carefully

On 11/10/2010 12:26 PM, Alexander Monakov wrote:

When deleting an empty basic block, we redirect all incoming non-fallthrough
edges to its successor.  However, we must also take care of the incoming
fallthrough edge if the preceding basic block ends with a conditional jump to
the next instruction (otherwise, by deleting the empty basic block we can
remove the label that the jump refers to).  Fixed in maybe_tidy_empty_bb by
trying to remove the jump or redirecting it to the successor of the empty block.

The patch also removes recomputing of topological order in that function.  We
can not invalidate it by moving an edge destination along an existing edge.  I
have tried to add the corresponding assert, but it would be quite verbose,
since the fallthrough edge may be a back edge, in which case it will look like
we are invalidating toporder, even though we are legally creating a new back
edge in the region, and will delete the old back edge soon (we can create
multiple back edges that way, but we'd only care when pipelining, and we
wouldn't have a fallthrough back edge then).

Bootstrapped and regtested on ia64 with sel-sched enabled at -O2, also tested
on x86-64 with sel-sched enabled for bootstrap.  OK?

As I understand g++.dg/torture/stackalign/throw-1.C is the test.

The patch looks ok for me. Thank you for the patch, Alexander.

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