PATCH: loop.c misses add_label_notes call?

Alexander N. Kabaev ak03@gte.com
Thu Dec 21 08:08:00 GMT 2000


>
> Yes, well, the testcase that you posted doesn't fail with 
> current cvs.  So you either need to track down the patch
> that fixed your problem, or adjust the test to show that
> the problem still exists.


In the current cvs, the find_basic_blocks/clear_cfg functions are called for
the first time immediately after the first jump_optimize call and before
loop_optimize gets a chance to screw the REG_LABEL information, so the posted
test case will not fail on GCC 2.97. The problem is still very real on sjlj
exceptions platforms using GCC 2.95.2 with your improvements backported from
the cvs trunk. Since find_basic_blocks is being called after loop_optimize
and loop optimize fails to keep accurate REG_LABEL information on the code it
is modifying, find_basic_blocks can incorrectly remove the label as unused
even though label is still being used by the address by some insns.

I still think that the posted trivial fix should be applied to both
gcc-2.95-branch and the trunk. It looks like loop_optimize pass tries to
to keep REG_LABEL info accurate whenever it alters the code, but it clearly
fails to do that in one particular place - shouldn't this place be fixed just
for a consistency sake?

----------------------------------
E-Mail: Alexander N. Kabaev <ak03@gte.com>
Date: 21-Dec-2000
Time: 10:49:51
----------------------------------


More information about the Gcc-patches mailing list