On 12-10-11 4:17 PM, Steven Bosscher wrote:
Hello,

IRA uses record_loop_exits() to cache the loop exit edges, but due to
a code ordering bug the edges are not actually recorded.
record_loop_exits() starts with:

   if (!current_loops)
     return;
I have no idea why record_loop_exits is here. Loop exits are not used in IRA. I think it should be removed.
So ira.c should set current_loops before calling record_loop_exits.
With the current order, the exists are not actually recorded. Also,
ira.c should release recorded exits and loops, this releases a
considerable amount of GC memory that can be re-used in the next IRA
iteration.

It's not clear to me why IRA has to re-compute the cfgloop tree from
scratch, though, so I've added a "???" comment for that.
I am not a specialist in cfgloop code. I did not find how to update it incrementally. So I just rebuild it.

My be you can advice how to do this. IRA can generate insns on the BB edges, it results in creation of new BBs on the region exits/enters.
Bootstrapped&tested (with and without checking) on
powerpc64-unknown-linux-gnu. OK for trunk?


Reply via email to