This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: regmove sometimes fails to update basic_block_end
- To: Bernd Schmidt <crux at Pool dot Informatik dot RWTH-Aachen dot DE>
- Subject: Re: regmove sometimes fails to update basic_block_end
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 01 Oct 1998 20:00:44 -0600
- cc: egcs-patches at cygnus dot com
- Reply-To: law at cygnus dot com
In message <Pine.SOL.3.90.980930160250.18576L-100000@matula.informatik.rwth-a
achen.de>you write:
> The current egcs snapshots have a bug in regmove.c which may lead to
> basic_block_end not being updated properly after emitting new insns.
> A test case can be found in gcc.c-torture/unsorted/charmtst.c. The bug
> will trigger when this is compiled on an i586-linux system and can be
> observed in the charmtst.c.regmove dump.
>
> I've attached a suggested fix. This fix relies on the basic block heads
> being correct in all cases (regmove does try to update them).
>
> Handling this sort of thing would be easier if every insn had an additional
> field that carried the basic block number. Would such a change be applied?
>
> Bernd
>
> * regmove.c (regmove_optimize): Add variable old_max_uid.
> At the end of the function, update basic_block_end.
Thanks for the comments in the later message. I agree, your patch is simpler
than trying to keep basic_block_end up to date on the fly.
I've installed this patch.
Thanks!
jeff