This is the mail archive of the gcc-patches@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: regmove sometimes fails to update basic_block_end



  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


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