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]
Other format: [Raw text]

Re: Pre-inline optimization, version 3


Jan Hubicka <jh@suse.cz> writes:

> 	PR tree-optimization/1046
> 	* tree-tailcall.c (suitable_for_tail_call_opt_p): Use TREE_ADDRESSABLE
> 	when alias info is not ready.
> 	(pass_tail_recursion): Do not require aliasing.
> 	* tree-ssa-copyrename.c (pass_rename_ssa_cop): Likewise.
> 	* tree-ssa-ccp.c (pass_ccp, pass_fold_builtins): Likewise.
> 	* tree-ssa-copy.c (pass_copy_prop): Likewise.
> 	* tree-ssa-forwprop.c (pass_forwprop): Likewise.
> 	* tree-ssa-dce.c (pass_dce, pass_dce_loop, pass_cd_dce): Likewise.
> 	* passes.c (init_optimization_passes): Execute rename_ssa_copies,
> 	ccp, forwprop, copy_prop, merge_phi, copy_prop, dce and tail recursion
> 	before inlining.
> 	* tree-ssa-operands.c (add_virtual_operand, get_indirect_ref_operand):
> 	When aliasing is not build, mark statement as volatile.

This breaks Ada on ia64:

/tmp/cvs/gcc-20070112/Build/./prev-gcc/xgcc -B/tmp/cvs/gcc-20070112/Build/./prev-gcc/ -B/tmp/cvs/gcc-20070112/Build/root/ia64-suse-linux/bin/ -c -g -O2      -gnatpg -gnata -I- -I. -Iada -I../../gcc/ada ../../gcc/ada/erroutc.adb -o ada/erroutc.o

raised STORAGE_ERROR : stack overflow (or erroneous memory access)
make[3]: *** [ada/erroutc.o] Error 1


Program received signal SIGSEGV, Segmentation fault.
0x4000000000c81900 in ggc_set_mark (p=0x40000000011a00a8)
    at ../../gcc/ggc-page.c:596
596       while (table->high_bits != high_bits)
(gdb) bt
#0  0x4000000000c81900 in ggc_set_mark (p=0x40000000011a00a8)
    at ../../gcc/ggc-page.c:596
#1  0x400000000004e280 in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>)
    at ./gtype-ada.h:28
#2  0x4000000000050930 in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>)
    at ./gtype-ada.h:346
#3  0x4000000000050930 in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>)
    at ./gtype-ada.h:346
#4  0x400000000004f040 in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>)
    at ./gtype-ada.h:175
#5  0x4000000000052340 in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>)
    at ./gtype-ada.h:377
#6  0x40000000000510b0 in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>)
    at ./gtype-ada.h:413
#7  0x4000000000a45490 in gt_ggc_mx_tree_statement_list_node (
    x_p=<value optimized out>) at gtype-desc.c:546
#8  0x4000000000050710 in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>)
    at ./gtype-ada.h:407
#9  0x4000000000a588c0 in gt_ggc_mx_basic_block_def (x_p=<value optimized out>)
    at gtype-desc.c:714
#10 0x4000000000a5a000 in gt_ggc_mx_tree_ann_d (x_p=<value optimized out>)
    at gtype-desc.c:638
#11 0x40000000000507c0 in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>)
    at ./gtype-ada.h:335
#12 0x4000000000a45a00 in gt_ggc_mx_cgraph_edge (x_p=<value optimized out>)
    at gtype-desc.c:158
#13 0x4000000000a45980 in gt_ggc_mx_cgraph_edge (x_p=<value optimized out>)
    at gtype-desc.c:156
#14 0x4000000000a459c0 in gt_ggc_mx_cgraph_edge (x_p=<value optimized out>)
    at gtype-desc.c:157
#15 0x4000000000a459c0 in gt_ggc_mx_cgraph_edge (x_p=<value optimized out>)
    at gtype-desc.c:157
#16 0x4000000000a459c0 in gt_ggc_mx_cgraph_edge (x_p=<value optimized out>)
    at gtype-desc.c:157
#17 0x4000000000a45d90 in gt_ggc_mx_cgraph_node (x_p=<value optimized out>)
    at gtype-desc.c:182
#18 0x4000000000a461d0 in gt_ggc_m_P11cgraph_node4htab (
    x_p=<value optimized out>) at gtype-desc.c:1785
#19 0x4000000000a3c4e0 in ggc_mark_roots () at ../../gcc/ggc-common.c:118
#20 0x4000000000c83100 in ggc_collect () at ../../gcc/ggc-page.c:1906
#21 0x4000000000c86e30 in execute_todo (flags=33335) at ../../gcc/passes.c:862
#22 0x4000000000c874d0 in execute_one_pass (pass=0x6000000000040470)
    at ../../gcc/passes.c:973
#23 0x4000000000c87a50 in execute_pass_list (pass=0x6000000000040470)
    at ../../gcc/passes.c:999
#24 0x4000000000c87a90 in execute_pass_list (pass=0x600000000003bb00)
    at ../../gcc/passes.c:1000
#25 0x4000000000c86c30 in do_per_function (
    callback=@0x400000000121fce0: 0x4000000000c87a30 <execute_pass_list>, 
    data=0x600000000003f550) at ../../gcc/passes.c:742
#26 0x4000000000c87900 in execute_ipa_pass_list (pass=0x600000000003bab8)
    at ../../gcc/passes.c:1021
#27 0x4000000000d41490 in cgraph_optimize () at ../../gcc/cgraphunit.c:1177
#28 0x400000000005acd0 in gnat_write_global_declarations ()
    at ../../gcc/ada/utils.c:3772
#29 0x4000000000c05810 in toplev_main (argc=<value optimized out>, 
    argv=<value optimized out>) at ../../gcc/toplev.c:1040
#30 0x40000000006e1820 in main (argc=17, argv=0x607ffffffe20e6a8)
    at ../../gcc/main.c:35

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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