public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base
[not found] <bug-13954-4@http.gcc.gnu.org/bugzilla/>
@ 2011-03-08 15:51 ` rguenth at gcc dot gnu.org
2011-03-15 13:39 ` rguenth at gcc dot gnu.org
2011-03-15 13:55 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-08 15:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13954
--- Comment #17 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-08 15:50:59 UTC ---
I have a patch, queued for 4.7.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base
[not found] <bug-13954-4@http.gcc.gnu.org/bugzilla/>
2011-03-08 15:51 ` [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base rguenth at gcc dot gnu.org
@ 2011-03-15 13:39 ` rguenth at gcc dot gnu.org
2011-03-15 13:55 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-15 13:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13954
--- Comment #18 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-15 13:37:42 UTC ---
Author: rguenth
Date: Tue Mar 15 13:37:23 2011
New Revision: 170994
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170994
Log:
2011-03-15 Richard Guenther <rguenther@suse.de>
PR tree-optimization/13954
* tree-ssa-sccvn.c (vn_reference_lookup_3): Look through memcpy
and friends.
* g++.dg/tree-ssa/pr13954.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/tree-ssa/pr13954.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-sccvn.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base
[not found] <bug-13954-4@http.gcc.gnu.org/bugzilla/>
2011-03-08 15:51 ` [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base rguenth at gcc dot gnu.org
2011-03-15 13:39 ` rguenth at gcc dot gnu.org
@ 2011-03-15 13:55 ` rguenth at gcc dot gnu.org
2 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-15 13:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13954
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #19 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-15 13:41:43 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base
[not found] <bug-13954-1008@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2009-09-26 15:30 ` rguenth at gcc dot gnu dot org
@ 2010-08-11 12:34 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-08-11 12:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from rguenth at gcc dot gnu dot org 2010-08-11 12:33 -------
We can also expand
__builtin_memcpy (&local, ¶m, 9);
to multiple copies based on src/dest alignment and size (similar to
store_by_pieces)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13954
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base
[not found] <bug-13954-1008@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2006-10-24 18:31 ` dberlin at gcc dot gnu dot org
@ 2009-09-26 15:30 ` rguenth at gcc dot gnu dot org
2010-08-11 12:34 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-09-26 15:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2009-09-26 15:30 -------
On trunk we get
<bb 2>:
# .MEM_3 = VDEF <.MEM_2(D)>
param.f1 = 0;
# .MEM_4 = VDEF <.MEM_3>
memcpy (&local, ¶m, 9);
# VUSE <.MEM_4>
D.1743_1 = local.f1;
if (D.1743_1 != 0)
goto <bb 3>;
else
goto <bb 4>;
<bb 3>:
# .MEM_5 = VDEF <.MEM_4>
link_error ();
<bb 4>:
return;
which shows this is an issue of value-numbering not looking through
memcpy. SRA obviously does not work here because both vars have their
address taken. The issue in the summary should have been fixed by the
SRA rewrite.
I'm looking at the VN issue.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2006-10-24 12:34:46 |2009-09-26 15:30:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13954
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base
[not found] <bug-13954-1008@http.gcc.gnu.org/bugzilla/>
2006-03-06 14:42 ` rguenth at gcc dot gnu dot org
2006-10-24 12:34 ` rguenth at gcc dot gnu dot org
@ 2006-10-24 18:31 ` dberlin at gcc dot gnu dot org
2009-09-26 15:30 ` rguenth at gcc dot gnu dot org
2010-08-11 12:34 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 8+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2006-10-24 18:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from dberlin at gcc dot gnu dot org 2006-10-24 18:31 -------
(In reply to comment #13)
> We now get
>
> <bb 2>:
> # param_2 = V_MAY_DEF <param_1>;
> param.f1 = 0;
> # param_6 = V_MAY_DEF <param_2>;
> # SFT.0_7 = V_MAY_DEF <SFT.0_3>;
> # NONLOCAL.6_8 = V_MAY_DEF <NONLOCAL.6_5>;
> # NONLOCAL.12_13 = V_MAY_DEF <NONLOCAL.12_12>;
> # NONLOCAL.18_16 = V_MAY_DEF <NONLOCAL.18_15>;
> # NONLOCAL.24_19 = V_MAY_DEF <NONLOCAL.24_18>;
> # NONLOCAL.30_22 = V_MAY_DEF <NONLOCAL.30_21>;
> # NONLOCAL.36_25 = V_MAY_DEF <NONLOCAL.36_24>;
> __builtin_memcpy (&local, ¶m, 9);
> # VUSE <SFT.0_7>;
> D.2668_4 = local.f1;
> if (D.2668_4 != 0) goto <L0>; else goto <L1>;
>
> <L0>:;
> # param_9 = V_MAY_DEF <param_6>;
> # SFT.0_10 = V_MAY_DEF <SFT.0_7>;
> # NONLOCAL.6_11 = V_MAY_DEF <NONLOCAL.6_8>;
> # NONLOCAL.12_14 = V_MAY_DEF <NONLOCAL.12_13>;
> # NONLOCAL.18_17 = V_MAY_DEF <NONLOCAL.18_16>;
> # NONLOCAL.24_20 = V_MAY_DEF <NONLOCAL.24_19>;
> # NONLOCAL.30_23 = V_MAY_DEF <NONLOCAL.30_22>;
> # NONLOCAL.36_26 = V_MAY_DEF <NONLOCAL.36_25>;
> link_error ();
>
> <L1>:;
> return;
>
Uh, there should only ever be one non-local var per function, and referenced
vars should be reset at the end of each function so why do you have multiple
NONLOCAL's here?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13954
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base
[not found] <bug-13954-1008@http.gcc.gnu.org/bugzilla/>
2006-03-06 14:42 ` rguenth at gcc dot gnu dot org
@ 2006-10-24 12:34 ` rguenth at gcc dot gnu dot org
2006-10-24 18:31 ` dberlin at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-10-24 12:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2006-10-24 12:34 -------
We now get
<bb 2>:
# param_2 = V_MAY_DEF <param_1>;
param.f1 = 0;
# param_6 = V_MAY_DEF <param_2>;
# SFT.0_7 = V_MAY_DEF <SFT.0_3>;
# NONLOCAL.6_8 = V_MAY_DEF <NONLOCAL.6_5>;
# NONLOCAL.12_13 = V_MAY_DEF <NONLOCAL.12_12>;
# NONLOCAL.18_16 = V_MAY_DEF <NONLOCAL.18_15>;
# NONLOCAL.24_19 = V_MAY_DEF <NONLOCAL.24_18>;
# NONLOCAL.30_22 = V_MAY_DEF <NONLOCAL.30_21>;
# NONLOCAL.36_25 = V_MAY_DEF <NONLOCAL.36_24>;
__builtin_memcpy (&local, ¶m, 9);
# VUSE <SFT.0_7>;
D.2668_4 = local.f1;
if (D.2668_4 != 0) goto <L0>; else goto <L1>;
<L0>:;
# param_9 = V_MAY_DEF <param_6>;
# SFT.0_10 = V_MAY_DEF <SFT.0_7>;
# NONLOCAL.6_11 = V_MAY_DEF <NONLOCAL.6_8>;
# NONLOCAL.12_14 = V_MAY_DEF <NONLOCAL.12_13>;
# NONLOCAL.18_17 = V_MAY_DEF <NONLOCAL.18_16>;
# NONLOCAL.24_20 = V_MAY_DEF <NONLOCAL.24_19>;
# NONLOCAL.30_23 = V_MAY_DEF <NONLOCAL.30_22>;
# NONLOCAL.36_26 = V_MAY_DEF <NONLOCAL.36_25>;
link_error ();
<L1>:;
return;
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2005-12-09 04:36:34 |2006-10-24 12:34:46
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13954
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base
[not found] <bug-13954-1008@http.gcc.gnu.org/bugzilla/>
@ 2006-03-06 14:42 ` rguenth at gcc dot gnu dot org
2006-10-24 12:34 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-03-06 14:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2006-03-06 14:41 -------
In principle this blocks optimization of tramp3d domain operations (if it were
not structure-aliasing fixing most of the problems).
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |22501
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13954
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-03-15 13:42 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-13954-4@http.gcc.gnu.org/bugzilla/>
2011-03-08 15:51 ` [Bug c++/13954] [tree-ssa] SRA does not work for classes that use inheritance with an empty base rguenth at gcc dot gnu.org
2011-03-15 13:39 ` rguenth at gcc dot gnu.org
2011-03-15 13:55 ` rguenth at gcc dot gnu.org
[not found] <bug-13954-1008@http.gcc.gnu.org/bugzilla/>
2006-03-06 14:42 ` rguenth at gcc dot gnu dot org
2006-10-24 12:34 ` rguenth at gcc dot gnu dot org
2006-10-24 18:31 ` dberlin at gcc dot gnu dot org
2009-09-26 15:30 ` rguenth at gcc dot gnu dot org
2010-08-11 12:34 ` rguenth 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).