Calling life_analysis from other optimizers (i.e. VRP)

John Wehle john@feith.com
Thu Jun 29 17:03:00 GMT 2000


>> Any problem with VRP calling:
>> 
>> life_analysis (get_insns (), NULL, PROP_KILL_DEAD_CODE | PROP_SCAN_DEAD_CODE);
>> 
>> before starting its main loop?
>
> None.

Unfortunately compiling gcc.c-torture/execute/930614-2.c on the Alpha with
-O3 -fomit-frame-pointer -funroll-loops now fails.  It also fails without
VRP if -fssa used with -O3 -fomit-frame-pointer -funroll-loops (SSA also
calls life_analysis).

$ ../../../xgcc -B../../../ -O3 -fomit-frame-pointer -funroll-loops -fssa -fno-vrp -S 930614-2.c
930614-2.c: In function `main':
930614-2.c:16: warning: implicit declaration of function `abort'
930614-2.c:19: warning: implicit declaration of function `exit'
xgcc: Internal compiler error: program cc1 got fatal signal 11

$ gdb ../../../cc1 core
(gdb) where
#0  0x1201a76d0 in bitmap_copy (to=0x140090cd8, from=0x0) at bitmap.c:247
#1  0x120360394 in merge_if_block (test_bb=0x140090118, then_bb=0x1400ba128, 
    else_bb=0x1400ba180, join_bb=0x1400ba1d8) at ifcvt.c:1357
#2  0x120360290 in noce_process_if_block (test_bb=0x140090118, 
    then_bb=0x1400ba128, else_bb=0x1400ba180, join_bb=0x1400ba1d8)
    at ifcvt.c:1311
#3  0x120360308 in process_if_block (test_bb=0x140090118, then_bb=0x1400ba128, 
    else_bb=0x1400ba180, join_bb=0x1400ba1d8) at ifcvt.c:1326
#4  0x120360a38 in find_if_block (test_bb=0x140090118, then_edge=0x140087680, 
    else_edge=0x1400876d0) at ifcvt.c:1570
#5  0x1203606c8 in find_if_header (test_bb=0x140090118) at ifcvt.c:1456
#6  0x120362034 in if_convert (life_data_ok=0) at ifcvt.c:2098
#7  0x120036d7c in rest_of_compilation (decl=0x31f00) at toplev.c:3117
#8  0x120392d04 in finish_function (nested=0) at c-decl.c:6578
#9  0x120363a48 in yyparse () at c-parse.y:342
#10 0x1200347f0 in compile_file (name=0x350d0 "/tmp/ccochmFM.i")
    at toplev.c:2297
#11 0x12003c898 in main (argc=12, argv=0x11ffffce8) at toplev.c:4774

(gdb) list ifcvt.c:1357
1352
1353      /* First merge TEST block into THEN block.  This is a no-brainer since
1354         the THEN block did not have a code label to begin with.  */
1355
1356      if (combo_bb->global_live_at_end)
1357        COPY_REG_SET (combo_bb->global_live_at_end, then_bb->global_live_at_end);
1358      merge_blocks_nomove (combo_bb, then_bb);
1359      num_removed_blocks++;
1360
1361      /* The ELSE block, if it existed, had a label.  That label count

I haven't looked at this enough to determine the correct fix.  Should SSA
and VRP be clearing / freeing global_live_at_start and global_live_at_end?

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------



More information about the Gcc mailing list