* [Bug tree-optimization/18519] ICE: Segmentation fault at -O3
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
@ 2004-11-16 11:09 ` micis at gmx dot de
2004-11-16 13:14 ` [Bug tree-optimization/18519] [4.0 Regression] " pinskia at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: micis at gmx dot de @ 2004-11-16 11:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From micis at gmx dot de 2004-11-16 11:09 -------
Created an attachment (id=7554)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7554&action=view)
preprocessed source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault at -O3
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
2004-11-16 11:09 ` [Bug tree-optimization/18519] " micis at gmx dot de
@ 2004-11-16 13:14 ` pinskia at gcc dot gnu dot org
2004-11-16 14:27 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-16 13:14 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-16 13:14 -------
Note -O2 -finline-functions is enough to reproduce the bug.
The backtrace:
#0 0x002c51e0 in operand_equal_p (arg0=0x26cb000, arg1=0x26c9300, flags=0) at /Users/pinskia/
src/local/gcc/gcc/fold-const.c:2350
#1 0x00159c40 in thread_jumps () at /Users/pinskia/src/local/gcc/gcc/tree-flow-inline.h:306
#2 0x00159c40 in thread_jumps () at /Users/pinskia/src/local/gcc/gcc/tree-flow-inline.h:306
#3 0x0015a6d0 in cleanup_tree_cfg () at /Users/pinskia/src/local/gcc/gcc/tree-cfg.c:872
#4 0x0019adbc in perform_tree_ssa_dce (aggressive=0 '\0') at /Users/pinskia/src/local/gcc/gcc/tree-
ssa-dce.c:954
#5 0x0016e554 in execute_pass_list (pass=0x26cb000) at /Users/pinskia/src/local/gcc/gcc/tree-
optimize.c:508
#6 0x0016e5e8 in execute_pass_list (pass=0x26cb000) at /Users/pinskia/src/local/gcc/gcc/tree-
optimize.c:546
#7 0x0016e890 in tree_rest_of_compilation (fndecl=0x26c9300) at /Users/pinskia/src/local/gcc/gcc/
tree-optimize.c:640
#8 0x000e93e4 in expand_body (fn=0x26c9300) at /Users/pinskia/src/local/gcc/gcc/cp/semantics.c:
2920
#9 0x00458260 in cgraph_expand_function (node=0x23b2d80) at /Users/pinskia/src/local/gcc/gcc/
cgraphunit.c:822
#10 0x00459220 in cgraph_optimize () at /Users/pinskia/src/local/gcc/gcc/cgraphunit.c:1689
#11 0x0008b678 in cp_finish_file () at /Users/pinskia/src/local/gcc/gcc/cp/decl2.c:3070
#12 0x00140a78 in c_common_parse_file (set_yydebug=40677376) at /Users/pinskia/src/local/gcc/
gcc/c-opts.c:1096
#13 0x004007cc in toplev_main (argc=1171, argv=0x750000) at /Users/pinskia/src/local/gcc/gcc/
toplev.c:985
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Summary|ICE: Segmentation fault at -|[4.0 Regression] ICE:
|O3 |Segmentation fault at -O3
Target Milestone|--- |4.0.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault at -O3
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
2004-11-16 11:09 ` [Bug tree-optimization/18519] " micis at gmx dot de
2004-11-16 13:14 ` [Bug tree-optimization/18519] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-11-16 14:27 ` pinskia at gcc dot gnu dot org
2004-11-16 14:31 ` [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-16 14:27 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-16 14:27 -------
Confirmed reduced testcase:
struct QChar {
unsigned short ucs;
} ;
int tibetan_form( const QChar &c );
static inline int tibetan_nextSyllableBoundary( int start, bool *invalid, QChar *uc)
{
int pos = 0;
int state = tibetan_form( uc[pos] );
if ( state != 1 )
{
if ( state != 0 )
*invalid = 1;
goto finish;
}
finish:
*invalid = 0;
return start+pos;
}
void tibetan_shape( int from, int len, QChar *uc)
{
int sstart = from;
int end = sstart + len;
while ( sstart < end ) {
bool invalid;
tibetan_nextSyllableBoundary(sstart, &invalid, uc );
}
}
: Search converges between 2004-10-26-161001-trunk (#611) and 2004-11-03-014001-trunk
(#612).
Really only -O1 -finline-functions is needed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-11-16 14:27:29
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (2 preceding siblings ...)
2004-11-16 14:27 ` pinskia at gcc dot gnu dot org
@ 2004-11-16 14:31 ` pinskia at gcc dot gnu dot org
2004-11-16 14:45 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-16 14:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-16 14:31 -------
I almost think it was caused by:
2004-10-27 Kazu Hirata <kazu@cs.umass.edu>
* tree-cfg.c (thread_jumps): Speed up by reordering the two
conditions for entering basic blocks into worklist.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |kazu at cs dot umass dot edu
Summary|[4.0 Regression] ICE: |[4.0 Regression] ICE:
|Segmentation fault at -O3 |Segmentation fault with
| |optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (3 preceding siblings ...)
2004-11-16 14:31 ` [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization pinskia at gcc dot gnu dot org
@ 2004-11-16 14:45 ` pinskia at gcc dot gnu dot org
2004-11-16 14:56 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-16 14:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-16 14:45 -------
I forgot to say that the reduced testcase only fails at -O1 now (I don't know why).
Also here is the C example (which is just slight changes to C++ example):
#define bool _Bool
typedef struct QChar {
unsigned short ucs;
} QChar;
int tibetan_form( const QChar *c );
static inline int tibetan_nextSyllableBoundary( int start, bool *invalid, QChar *uc)
{
int pos = 0;
int state = tibetan_form( &uc[pos] );
if ( state != 1 )
{
if ( state != 0 )
*invalid = 1;
goto finish;
}
finish:
*invalid = 0;
return start+pos;
}
void tibetan_shape( int from, int len, QChar *uc)
{
int sstart = from;
int end = sstart + len;
while ( sstart < end ) {
bool invalid;
tibetan_nextSyllableBoundary(sstart, &invalid, uc );
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (4 preceding siblings ...)
2004-11-16 14:45 ` pinskia at gcc dot gnu dot org
@ 2004-11-16 14:56 ` pinskia at gcc dot gnu dot org
2004-11-16 15:06 ` kazu at cs dot umass dot edu
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-16 14:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-16 14:56 -------
We are crashing because we are looking at a SSA_NAME which is in the free list:
<ssa_name 0x4169cccc nothrow var <var_decl 0x41711e88 invalid> def_stmt <ssa_name
0x4169cca8>
version 16 in-free-list>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (5 preceding siblings ...)
2004-11-16 14:56 ` pinskia at gcc dot gnu dot org
@ 2004-11-16 15:06 ` kazu at cs dot umass dot edu
2004-11-16 17:09 ` kazu at cs dot umass dot edu
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-11-16 15:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-11-16 15:06 -------
Reduced a little more:
/* ./cc1 -O1 pr18519.c */
int baz (int *);
void
foo (int *uc)
{
int *invalidp;
int invalid;
while (1)
{
invalidp = &invalid;
if (baz (uc))
invalid = 1;
invalid = 0;
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (6 preceding siblings ...)
2004-11-16 15:06 ` kazu at cs dot umass dot edu
@ 2004-11-16 17:09 ` kazu at cs dot umass dot edu
2004-11-16 17:28 ` dberlin at dberlin dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-11-16 17:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-11-16 17:08 -------
The binary search converges between 2004-10-27 17:40GMT and 2004-10-27 17:50GMT,
so this patch is likely to have caused the segfault.
2004-10-27 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/17133
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (7 preceding siblings ...)
2004-11-16 17:09 ` kazu at cs dot umass dot edu
@ 2004-11-16 17:28 ` dberlin at dberlin dot org
2004-11-16 17:28 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: dberlin at dberlin dot org @ 2004-11-16 17:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at dberlin dot org 2004-11-16 17:28 -------
Subject: Re: [4.0 Regression] ICE: Segmentation
fault with optimization
cleanup_tree_cfg can't happen before we've fixed up the def-def chains, so
i'm making it into a todo.
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-16 17:28 -------
Assigning to Danny as the problem is that we are trying to clean up the CFG before fixing up the
def_def_chains.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (8 preceding siblings ...)
2004-11-16 17:28 ` dberlin at dberlin dot org
@ 2004-11-16 17:28 ` pinskia at gcc dot gnu dot org
2004-11-17 2:02 ` cvs-commit at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-16 17:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at dberlin dot org 2004-11-16 17:28 -------
Subject: Re: [4.0 Regression] ICE: Segmentation
fault with optimization
cleanup_tree_cfg can't happen before we've fixed up the def-def chains, so
i'm making it into a todo.
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-16 17:28 -------
Assigning to Danny as the problem is that we are trying to clean up the CFG before fixing up the
def_def_chains.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dberlin at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (9 preceding siblings ...)
2004-11-16 17:28 ` pinskia at gcc dot gnu dot org
@ 2004-11-17 2:02 ` cvs-commit at gcc dot gnu dot org
2004-11-17 12:46 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-17 2:02 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-11-17 02:02 -------
Subject: Bug 18519
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: dberlin@gcc.gnu.org 2004-11-17 02:01:40
Modified files:
gcc : ChangeLog tree-optimize.c tree-pass.h
tree-ssa-ccp.c tree-ssa-dce.c
tree-ssa-loop-ch.c tree-ssa-loop.c
tree-ssa-phiopt.c
Log message:
2004-11-16 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/18519
* tree-optimize (execute_todo): Add case for TODO_cleanup_cfg.
* tree-pass.h: Add TODO_cleanup_cfg.
* tree-ssa-ccp.c (pass_ccp): Use TODO_cleanup_cfg.
(ccp_finalize): Remove call to cleanup_cfg.
* tree-ssa-dce.c (pass_dce): Use TODO_cleanup_cfg and TODO_dump_func.
(pass_cd_dce): Ditto.
(perform_tree_ssa_dce): Remove call to cleanup_cfg,
dump_function_to_file.
* tree-ssa-loop-ch.c (copy_loop_headers): Remove call
to cleanup_cfg.
(pass_ch): Add TODO_cleanup_cfg.
* tree-ssa-loop.c (tree_ssa_loop_done): Remove call to
cleanup_cfg.
(pass_loop_done): Add TODO_cleanup_cfg.
* tree-ssa-phiopt.c (pass_phiopt): Ditto.
(tree_ssa_phiopt): Remove call to cleanup_cfg.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6371&r2=2.6372
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-optimize.c.diff?cvsroot=gcc&r1=2.61&r2=2.62
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-pass.h.diff?cvsroot=gcc&r1=2.20&r2=2.21
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-ccp.c.diff?cvsroot=gcc&r1=2.49&r2=2.50
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-dce.c.diff?cvsroot=gcc&r1=2.26&r2=2.27
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-ch.c.diff?cvsroot=gcc&r1=2.8&r2=2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop.c.diff?cvsroot=gcc&r1=2.21&r2=2.22
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-phiopt.c.diff?cvsroot=gcc&r1=2.18&r2=2.19
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (10 preceding siblings ...)
2004-11-17 2:02 ` cvs-commit at gcc dot gnu dot org
@ 2004-11-17 12:46 ` pinskia at gcc dot gnu dot org
2004-11-22 14:18 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-17 12:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-17 12:46 -------
Fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (11 preceding siblings ...)
2004-11-17 12:46 ` pinskia at gcc dot gnu dot org
@ 2004-11-22 14:18 ` pinskia at gcc dot gnu dot org
2005-01-09 22:05 ` cvs-commit at gcc dot gnu dot org
2005-01-10 3:57 ` cvs-commit at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-22 14:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-22 14:18 -------
*** Bug 18609 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |Thomas dot Koenig at online
| |dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (12 preceding siblings ...)
2004-11-22 14:18 ` pinskia at gcc dot gnu dot org
@ 2005-01-09 22:05 ` cvs-commit at gcc dot gnu dot org
2005-01-10 3:57 ` cvs-commit at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-09 22:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-09 22:05 -------
Subject: Bug 18519
CVSROOT: /cvs/gcc
Module name: gcc
Branch: apple-ppc-branch
Changes by: dalej@gcc.gnu.org 2005-01-09 22:05:17
Modified files:
gcc : tree-cfg.c tree-dfa.c tree-flow-inline.h
tree-flow.h tree-pretty-print.c
tree-ssa-loop-im.c tree-ssa-loop-manip.c
tree-ssa-operands.c tree-ssa-operands.h
tree-vectorizer.c tree-pass.h tree-ssa-ccp.c
tree-ssa-loop-ch.c tree-ssa-loop.c
tree-ssa-phiopt.c tree-into-ssa.c
tree-optimize.c tree-ssa.c tree-ssa-dce.c
ChangeLog.apple-ppc
Log message:
2005-01-09 Dale Johannesen <dalej@apple.com>
Radar 3941146
Following patches from mainline:
2004-10-27 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/17133
* tree-cfg.c (rewrite_to_new_ssa_names_bb): Also rewrite must
def kill operand.
* tree-flow-inline.h: V_MUST_DEF_OP became V_MUST_DEF_RESULT.
(get_v_must_def_result_ptr): Modify for new structure of
v_must_defs array.
(get_v_must_def_kill_ptr): New.
(op_iter_next_use): Add support for the kill that occurs in V_MUST_DEFs.
(op_iter_next_tree): Ditto. Also V_MAY_DEF_OP became V_MAY_DEF_RESULT.
(op_iter_next_def): V_MAY_DEF_OP became V_MAY_DEF_RESULT.
(op_iter_init): Initialize new mustu members.
(op_iter_next_mustdef): New function.
(op_iter_init_mustdef): Ditto.
* tree-flow.h (rewrite_def_def_chains): New function.
* tree-into-ssa.c (mark_def_sites): Handle mustdefkill operands.
(ssa_mark_def_sites): Ditto.
(rewrite_stmt): Ditto.
(ssa_rewrite_stmt): Ditto.
(rewrite_blocks): Factor out from rewrite_into_ssa.
(mark_def_block_sites): Ditto.
(rewrite_def_def_chains): New function, just rewrites def-def
chains without phi node insertion.
* tree-pass.h (TODO_fix_def_def_chains): New todo flag.
* tree-optimize.c (execute_todo): Handle TODO_fix_def_def_chains.
* tree-pretty-print.c (dump_vops): Print out MUST_DEF's so that
they include the rhs now.
* tree-ssa-ccp.c (visit_assignment): V_MUST_DEF_OP became
V_MUST_DEF_RESULT.
* tree-ssa-dce.c (mark_operand_necessary): Add phionly argument.
Update callers.
(mark_really_necessary_kill_operand_phis): New function.
(perform_tree_ssa_dce): Call it.
(pass_dce): Add TODO_fix_def_def_chains.
(pass_cd_dce): Ditto.
* tree-ssa-loop-im.c (determine_max_movement): Look at kills as
well.
(rewrite_mem_refs): Ditto.
* tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Look at kills
as well.
* tree-ssa-operands.c (allocate_v_may_def_optype):
v_may_def_operand_type_t became v_def_use_operand_type_t.
(allocate_v_must_def_optype) Ditto.
(finalize_ssa_v_must_defs): Update for new operand type, as well
as setting the use portion as well.
(copy_virtual_operands): Copy the kill operand as well.
(create_ssa_artficial_load_stmt): V_MUST_DEF_OP became
V_MUST_DEF_RESULT.
* tree-ssa-operands.h (v_may_def_operand_type): Renamed to
v_def_use_operand_type.
(v_must_def_optype_d): Use v_def_use_operand_type.
(V_MUST_DEF_OP_*): Renamed to V_MUST_DEF_RESULT_*
(V_MUST_DEF_KILL_*): New macros.
(struct ssa_operand_iterator_d): Add num_v_mustu and v_mustu_i
members.
Rename existing must_i and num_v_must members to mustd_i and
num_v_mustd.
(SSA_OP_VMUSTDEFKILL): New flag.
(SSA_OP_VIRTUAL_KILLS): New flag.
(SSA_OP_ALL_OPERANDS): Add in SSA_OP_ALL_KILLS.
(SSA_OP_ALL_KILLS): New flag.
(FOR_EACH_SSA_MUSTDEF_OPERAND): New macro.
* tree-ssa.c (verify_ssa): Verify virtual kills as well.
* tree-vectorizer.c (vect_create_data_ref_ptr): V_MUST_DEF_OP
became V_MUST_DEF_RESULT.
(rename_variables_in_bb): Rename kill pointer as well.
* tree-dfa.c (compute_immediate_uses_for_stmt): Add kills into the
immediate uses.
2004-10-28 Daniel Berlin <dberlin@dberlin.org>
* tree-into-ssa.c (rewrite_virtual_phi_arguments): New function.
(rewrite_blocks): Modify argument, and use it to decide which
function to call.
(rewrite_def_def_chains): Call rewrite_blocks with true here.
(rewrite_into_ssa): and call it with false here.
2004-11-16 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/18519
* tree-optimize (execute_todo): Add case for TODO_cleanup_cfg.
* tree-pass.h: Add TODO_cleanup_cfg.
* tree-ssa-ccp.c (pass_ccp): Use TODO_cleanup_cfg.
(ccp_finalize): Remove call to cleanup_cfg.
* tree-ssa-dce.c (pass_dce): Use TODO_cleanup_cfg and TODO_dump_func.
(pass_cd_dce): Ditto.
(perform_tree_ssa_dce): Remove call to cleanup_cfg,
dump_function_to_file.
* tree-ssa-loop-ch.c (copy_loop_headers): Remove call
to cleanup_cfg.
(pass_ch): Add TODO_cleanup_cfg.
* tree-ssa-loop.c (tree_ssa_loop_done): Remove call to
cleanup_cfg.
(pass_loop_done): Add TODO_cleanup_cfg.
* tree-ssa-phiopt.c (pass_phiopt): Ditto.
(tree_ssa_phiopt): Remove call to cleanup_cfg.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.4.278.2.15&r2=1.1.4.278.2.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-dfa.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.4.222.2.10&r2=1.1.4.222.2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow-inline.h.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.68.2.7&r2=1.1.2.68.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow.h.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.4.197.2.15&r2=1.1.4.197.2.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-pretty-print.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.78.2.9&r2=1.1.2.78.2.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-im.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.4.9&r2=1.1.4.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-manip.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.4.12&r2=1.1.4.13
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-operands.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.17.2.13&r2=1.1.2.17.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-operands.h.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.2.6.6&r2=1.1.2.2.6.7
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-vectorizer.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.4.26&r2=1.1.4.27
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-pass.h.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.19.2.11&r2=1.1.2.19.2.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-ccp.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.148.2.5&r2=1.1.2.148.2.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-ch.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=2.3.4.5&r2=2.3.4.6
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.11.2.10&r2=1.1.2.11.2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-phiopt.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.9.2.8&r2=1.1.2.9.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-into-ssa.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.1.2.9&r2=1.1.2.1.2.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-optimize.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.4.134.2.13&r2=1.1.4.134.2.14
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.4.216.2.10&r2=1.1.4.216.2.11
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-dce.c.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.83.2.7&r2=1.1.2.83.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.apple-ppc.diff?cvsroot=gcc&only_with_tag=apple-ppc-branch&r1=1.1.2.261&r2=1.1.2.262
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/18519] [4.0 Regression] ICE: Segmentation fault with optimization
2004-11-16 11:06 [Bug tree-optimization/18519] New: ICE: Segmentation fault at -O3 micis at gmx dot de
` (13 preceding siblings ...)
2005-01-09 22:05 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-10 3:57 ` cvs-commit at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-10 3:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-01-10 03:57 -------
Subject: Bug 18519
CVSROOT: /cvs/gcc
Module name: gcc
Branch: apple-gcc_os_35-branch
Changes by: dalej@gcc.gnu.org 2005-01-10 03:57:26
Modified files:
gcc : tree-cfg.c tree-dfa.c tree-flow-inline.h
tree-flow.h tree-pretty-print.c
tree-ssa-loop-im.c tree-ssa-loop-manip.c
tree-ssa-operands.c tree-ssa-operands.h
tree-vectorizer.c tree-pass.h tree-ssa-ccp.c
tree-ssa-loop-ch.c tree-ssa-loop.c
tree-ssa-phiopt.c tree-into-ssa.c
tree-optimize.c tree-ssa.c tree-ssa-dce.c
ChangeLog.apple-ppc
Log message:
2005-01-09 Dale Johannesen <dalej@apple.com>
Radar 3941146
Following patches from mainline:
2004-10-27 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/17133
* tree-cfg.c (rewrite_to_new_ssa_names_bb): Also rewrite must
def kill operand.
* tree-flow-inline.h: V_MUST_DEF_OP became V_MUST_DEF_RESULT.
(get_v_must_def_result_ptr): Modify for new structure of
v_must_defs array.
(get_v_must_def_kill_ptr): New.
(op_iter_next_use): Add support for the kill that occurs in V_MUST_DEFs.
(op_iter_next_tree): Ditto. Also V_MAY_DEF_OP became V_MAY_DEF_RESULT.
(op_iter_next_def): V_MAY_DEF_OP became V_MAY_DEF_RESULT.
(op_iter_init): Initialize new mustu members.
(op_iter_next_mustdef): New function.
(op_iter_init_mustdef): Ditto.
* tree-flow.h (rewrite_def_def_chains): New function.
* tree-into-ssa.c (mark_def_sites): Handle mustdefkill operands.
(ssa_mark_def_sites): Ditto.
(rewrite_stmt): Ditto.
(ssa_rewrite_stmt): Ditto.
(rewrite_blocks): Factor out from rewrite_into_ssa.
(mark_def_block_sites): Ditto.
(rewrite_def_def_chains): New function, just rewrites def-def
chains without phi node insertion.
* tree-pass.h (TODO_fix_def_def_chains): New todo flag.
* tree-optimize.c (execute_todo): Handle TODO_fix_def_def_chains.
* tree-pretty-print.c (dump_vops): Print out MUST_DEF's so that
they include the rhs now.
* tree-ssa-ccp.c (visit_assignment): V_MUST_DEF_OP became
V_MUST_DEF_RESULT.
* tree-ssa-dce.c (mark_operand_necessary): Add phionly argument.
Update callers.
(mark_really_necessary_kill_operand_phis): New function.
(perform_tree_ssa_dce): Call it.
(pass_dce): Add TODO_fix_def_def_chains.
(pass_cd_dce): Ditto.
* tree-ssa-loop-im.c (determine_max_movement): Look at kills as
well.
(rewrite_mem_refs): Ditto.
* tree-ssa-loop-manip.c (find_uses_to_rename_stmt): Look at kills
as well.
* tree-ssa-operands.c (allocate_v_may_def_optype):
v_may_def_operand_type_t became v_def_use_operand_type_t.
(allocate_v_must_def_optype) Ditto.
(finalize_ssa_v_must_defs): Update for new operand type, as well
as setting the use portion as well.
(copy_virtual_operands): Copy the kill operand as well.
(create_ssa_artficial_load_stmt): V_MUST_DEF_OP became
V_MUST_DEF_RESULT.
* tree-ssa-operands.h (v_may_def_operand_type): Renamed to
v_def_use_operand_type.
(v_must_def_optype_d): Use v_def_use_operand_type.
(V_MUST_DEF_OP_*): Renamed to V_MUST_DEF_RESULT_*
(V_MUST_DEF_KILL_*): New macros.
(struct ssa_operand_iterator_d): Add num_v_mustu and v_mustu_i
members.
Rename existing must_i and num_v_must members to mustd_i and
num_v_mustd.
(SSA_OP_VMUSTDEFKILL): New flag.
(SSA_OP_VIRTUAL_KILLS): New flag.
(SSA_OP_ALL_OPERANDS): Add in SSA_OP_ALL_KILLS.
(SSA_OP_ALL_KILLS): New flag.
(FOR_EACH_SSA_MUSTDEF_OPERAND): New macro.
* tree-ssa.c (verify_ssa): Verify virtual kills as well.
* tree-vectorizer.c (vect_create_data_ref_ptr): V_MUST_DEF_OP
became V_MUST_DEF_RESULT.
(rename_variables_in_bb): Rename kill pointer as well.
* tree-dfa.c (compute_immediate_uses_for_stmt): Add kills into the
immediate uses.
2004-10-28 Daniel Berlin <dberlin@dberlin.org>
* tree-into-ssa.c (rewrite_virtual_phi_arguments): New function.
(rewrite_blocks): Modify argument, and use it to decide which
function to call.
(rewrite_def_def_chains): Call rewrite_blocks with true here.
(rewrite_into_ssa): and call it with false here.
2004-11-16 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/18519
* tree-optimize (execute_todo): Add case for TODO_cleanup_cfg.
* tree-pass.h: Add TODO_cleanup_cfg.
* tree-ssa-ccp.c (pass_ccp): Use TODO_cleanup_cfg.
(ccp_finalize): Remove call to cleanup_cfg.
* tree-ssa-dce.c (pass_dce): Use TODO_cleanup_cfg and TODO_dump_func.
(pass_cd_dce): Ditto.
(perform_tree_ssa_dce): Remove call to cleanup_cfg,
dump_function_to_file.
* tree-ssa-loop-ch.c (copy_loop_headers): Remove call
to cleanup_cfg.
(pass_ch): Add TODO_cleanup_cfg.
* tree-ssa-loop.c (tree_ssa_loop_done): Remove call to
cleanup_cfg.
(pass_loop_done): Add TODO_cleanup_cfg.
* tree-ssa-phiopt.c (pass_phiopt): Ditto.
(tree_ssa_phiopt): Remove call to cleanup_cfg.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-cfg.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.4.278.2.12&r2=1.1.4.278.2.12.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-dfa.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.4.222.2.9&r2=1.1.4.222.2.9.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow-inline.h.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.68.2.6&r2=1.1.2.68.2.6.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow.h.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.4.197.2.12&r2=1.1.4.197.2.12.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-pretty-print.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.78.2.8&r2=1.1.2.78.2.8.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-im.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.4.9&r2=1.1.4.9.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-manip.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.4.11&r2=1.1.4.11.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-operands.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.17.2.12&r2=1.1.2.17.2.12.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-operands.h.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.2.6.6&r2=1.1.2.2.6.6.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-vectorizer.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.4.22&r2=1.1.4.22.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-pass.h.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.19.2.9&r2=1.1.2.19.2.9.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-ccp.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.148.2.5&r2=1.1.2.148.2.5.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop-ch.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=2.3.4.5&r2=2.3.4.5.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-loop.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.11.2.9&r2=1.1.2.11.2.9.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-phiopt.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.9.2.7&r2=1.1.2.9.2.7.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-into-ssa.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.1.2.8&r2=1.1.2.1.2.8.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-optimize.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.4.134.2.9&r2=1.1.4.134.2.9.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.4.216.2.8&r2=1.1.4.216.2.8.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-dce.c.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.83.2.7&r2=1.1.2.83.2.7.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.apple-ppc.diff?cvsroot=gcc&only_with_tag=apple-gcc_os_35-branch&r1=1.1.2.190.2.9&r2=1.1.2.190.2.10
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18519
^ permalink raw reply [flat|nested] 16+ messages in thread