This is the mail archive of the
mailing list for the GCC project.
Re: [PR46204] sel-sched: delete empty BBs more carefully
- From: Vladimir Makarov <vmakarov at redhat dot com>
- To: Alexander Monakov <amonakov at ispras dot ru>
- Cc: gcc-patches at gcc dot gnu dot org, Andrey Belevantsev <abel at ispras dot ru>
- Date: Fri, 12 Nov 2010 17:15:07 -0500
- Subject: Re: [PR46204] sel-sched: delete empty BBs more carefully
- References: <alpine.LNX.email@example.com>
On 11/10/2010 12:26 PM, Alexander Monakov wrote:
Hello,As I understand g++.dg/torture/stackalign/throw-1.C is the test.
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?
The patch looks ok for me. Thank you for the patch, Alexander.