This is the mail archive of the gcc@gcc.gnu.org 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]

Re: Invalid shortcut in calculate_global_regs_live


On Thu, Nov 23, 2000 at 06:45:17PM +0000, Bernd Schmidt wrote:
> After the second iteration, reg 1 also becomes live at the start of block B.
> However, now we do not recognize a change in global_live_at_end of block A:
> the set is unchanged, so we find no reason to rescan.  This is incorrect; the
> register must now be marked as live at the start of A.

Ah yes, this explanation I follow.  Tricky.

I think it's clear we need to track the set of registers that are
locally conditionally set as well.  We then rescan the block if
any of these registers are live_at_end, regardless of observed
change in liveness.

We still terminate because we do nothing when we find the set of
live_at_start has not changed.

Given the expense of a forced rescan, it would probably be worth
the effort to compute the set of registers that are _only_ ever
conditionally set, and never unconditionally set.  This would seem
to require two new regsets during propagate_block.

I also recommend removing local_set from struct basic_block, and
having compute_global_regs_live put a structure in bb->aux just
like other passes do.



r~

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