public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/22555] array in struct disables salias subvars for other fields
[not found] <bug-22555-10053@http.gcc.gnu.org/bugzilla/>
@ 2006-01-05 15:30 ` rguenth at gcc dot gnu dot org
2006-01-05 15:32 ` rguenth at gcc dot gnu dot org
2006-01-14 14:30 ` rguenth at gcc dot gnu dot org
2 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-01-05 15:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2006-01-05 15:30 -------
Subject: Bug 22555
Author: rguenth
Date: Thu Jan 5 15:30:44 2006
New Revision: 109381
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109381
Log:
2006-01-05 Richard Guenther <rguenther@suse.de>
PR tree-optimization/22555
* tree-ssa-alias.c (create_overlap_variables_for): Do not give up,
if one structure field is an array.
* tree-ssa-operands.c (get_expr_operands): Continue scanning
operands even if we found a subvar, but ignore VOPs in this
case.
* tree-ssa-loop-ivopts.c (rewrite_use): Mark new vars in stmt
for renaming.
* tree-ssa-loop.c (pass_iv_optimize): Schedule TODO_update_ssa.
* gcc.dg/tree-ssa/alias-3.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-3.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-alias.c
trunk/gcc/tree-ssa-loop-ivopts.c
trunk/gcc/tree-ssa-loop.c
trunk/gcc/tree-ssa-operands.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22555
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/22555] array in struct disables salias subvars for other fields
[not found] <bug-22555-10053@http.gcc.gnu.org/bugzilla/>
2006-01-05 15:30 ` [Bug tree-optimization/22555] array in struct disables salias subvars for other fields rguenth at gcc dot gnu dot org
@ 2006-01-05 15:32 ` rguenth at gcc dot gnu dot org
2006-01-14 14:30 ` rguenth at gcc dot gnu dot org
2 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-01-05 15:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2006-01-05 15:32 -------
Fixed on the mainline.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22555
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/22555] array in struct disables salias subvars for other fields
[not found] <bug-22555-10053@http.gcc.gnu.org/bugzilla/>
2006-01-05 15:30 ` [Bug tree-optimization/22555] array in struct disables salias subvars for other fields rguenth at gcc dot gnu dot org
2006-01-05 15:32 ` rguenth at gcc dot gnu dot org
@ 2006-01-14 14:30 ` rguenth at gcc dot gnu dot org
2 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-01-14 14:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2006-01-14 14:30 -------
Subject: Bug 22555
Author: rguenth
Date: Sat Jan 14 14:30:33 2006
New Revision: 109703
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=109703
Log:
2006-01-14 Richard Guenther <rguenther@suse.de>
PR tree-optimization/22548
PR tree-optimization/22555
PR tree-optimization/22501
* Makefile.in (tree-ssa-structalias.o): Depend on $(PARAMS_H).
* params.def (salias-max-array-elements): New parameter.
* params.h (SALIAS_MAX_ARRAY_ELEMENTS): Define.
* doc/invoke.texi (salias-max-array-elements): Document.
* tree-flow-inline.h (var_can_have_subvars): We also handle
arrays now.
* tree-ssa-alias.c (find_used_portions): Handle ARRAY_REF like
COMPONENT_REF.
* tree-ssa-structalias.c (params.h): Include.
(push_fields_onto_fieldstack): Handle ARRAY_TYPE.
(find_func_aliases): Handle multiple constraints from ARRAY_REF.
(get_constraint_for): For ADDR_EXPR operating on something
containing an ARRAY_REF, add all subvars to the solution.
(handle_ptr_arith): Handle ARRAY_TYPE like RECORD_TYPE types.
* tree-ssa-operands.c (parse_ssa_operands): Handle ARRAY_REF
for creating MUST_DEFs.
(get_expr_operands): Treat ARRAY_REF like COMPONENT_REF wrt subvars.
* gcc.dg/tree-ssa/alias-4.c: New testcase.
* gcc.dg/tree-ssa/alias-5.c: Likewise.
* gcc.dg/tree-ssa/alias-6.c: Likewise.
* gcc.dg/tree-ssa/alias-7.c: Likewise.
* gcc.dg/tree-ssa/alias-8.c: Likewise.
* gcc.dg/tree-ssa/alias-9.c: Likewise.
* gcc.dg/tree-ssa/alias-10.c: Likewise.
* gcc.dg/tree-ssa/alias-11.c: Likewise.
* gcc.dg/tree-ssa/alias-12.c: Likewise.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-10.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-11.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-12.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-4.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-5.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-6.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-7.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-8.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/alias-9.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/Makefile.in
trunk/gcc/doc/invoke.texi
trunk/gcc/params.def
trunk/gcc/params.h
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-flow-inline.h
trunk/gcc/tree-ssa-alias.c
trunk/gcc/tree-ssa-operands.c
trunk/gcc/tree-ssa-structalias.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22555
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug tree-optimization/22555] New: array in struct disables salias subvars for other fields
@ 2005-07-19 8:58 rguenth at gcc dot gnu dot org
2005-07-19 9:00 ` [Bug tree-optimization/22555] " rguenth at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-07-19 8:58 UTC (permalink / raw)
To: gcc-bugs
struct {
int i;
int j;
int x[2];
} a;
int foo(void)
{
a.i = 1;
a.j = 0;
a.x[0] = 5;
return a.i + a.j;
}
does not get optimized, because salias disables subvars for a
because it contains an array. I have a simple patch in testing.
--
Summary: array in struct disables salias subvars for other fields
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: missed-optimization, alias
Severity: enhancement
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22555
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2006-01-14 14:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-22555-10053@http.gcc.gnu.org/bugzilla/>
2006-01-05 15:30 ` [Bug tree-optimization/22555] array in struct disables salias subvars for other fields rguenth at gcc dot gnu dot org
2006-01-05 15:32 ` rguenth at gcc dot gnu dot org
2006-01-14 14:30 ` rguenth at gcc dot gnu dot org
2005-07-19 8:58 [Bug tree-optimization/22555] New: " rguenth at gcc dot gnu dot org
2005-07-19 9:00 ` [Bug tree-optimization/22555] " rguenth at gcc dot gnu dot org
2005-07-22 18:22 ` pinskia at gcc dot gnu dot org
2005-08-11 13:39 ` rguenth at gcc dot gnu dot org
2005-09-07 15:25 ` cvs-commit at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).