public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/16538] New: Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it)
@ 2004-07-14 13:57 steven at gcc dot gnu dot org
2004-07-14 15:28 ` [Bug tree-optimization/16538] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-07-14 13:57 UTC (permalink / raw)
To: gcc-bugs
We are missing a few jump threading opportunities
of the following form in SPEC and in GCC itself:
------------------------------------------------
struct foo
{
int field1;
int field2;
};
struct foo glob;
void
bar (void)
{
struct foo *g1, *g2;
g1 = g2 = &glob;
int i;
if (!g1->field1)
g1->field2 = g1->field1;
if (!g2->field1)
g2->field2 = g2->field1;
}
------------------------------------------------
The .optimized dump looks like this:
;; Function bar (bar)
bar ()
{
int i;
struct foo * g2;
struct foo * g1;
int T.1;
int T.0;
<bb 0>:
if (glob.field1 == 0) goto <L0>; else goto <L1>;
<L0>:;
glob.field2 = 0;
<L1>:;
if (glob.field1 == 0) goto <L2>; else goto <L3>;
<L2>:;
glob.field2 = 0;
<L3>:;
return;
}
We eventually end up threading this jump on RTL.
--
Summary: Missed jump threading opportunity with struct fields
(but RTL thread_jumps does catch it)
Product: gcc
Version: 3.5.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: steven at gcc dot gnu dot org
CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16538
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/16538] Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it)
2004-07-14 13:57 [Bug tree-optimization/16538] New: Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it) steven at gcc dot gnu dot org
@ 2004-07-14 15:28 ` pinskia at gcc dot gnu dot org
2005-02-14 23:41 ` law at redhat dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-14 15:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-07-14 15:28 -------
Confirmed, this is basically PR 13761 really.
--
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |13761
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |alias, TREE
Last reconfirmed|0000-00-00 00:00:00 |2004-07-14 15:28:58
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16538
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/16538] Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it)
2004-07-14 13:57 [Bug tree-optimization/16538] New: Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it) steven at gcc dot gnu dot org
2004-07-14 15:28 ` [Bug tree-optimization/16538] " pinskia at gcc dot gnu dot org
@ 2005-02-14 23:41 ` law at redhat dot com
2005-04-23 0:58 ` law at redhat dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: law at redhat dot com @ 2005-02-14 23:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From law at redhat dot com 2005-02-14 20:06 -------
This is not a jump threading issue. This is an aliasing issue. If the aliasing
code is fixed, then the new jump thread selection code will handle this correctly.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16538
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/16538] Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it)
2004-07-14 13:57 [Bug tree-optimization/16538] New: Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it) steven at gcc dot gnu dot org
2004-07-14 15:28 ` [Bug tree-optimization/16538] " pinskia at gcc dot gnu dot org
2005-02-14 23:41 ` law at redhat dot com
@ 2005-04-23 0:58 ` law at redhat dot com
2005-04-23 16:47 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: law at redhat dot com @ 2005-04-23 0:58 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From law at redhat dot com 2005-04-23 00:57 -------
This appears to be fixed now (probably the combination of Dan's aliasing
work and the jump threading changes).
Can a bugmaster please close this :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16538
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/16538] Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it)
2004-07-14 13:57 [Bug tree-optimization/16538] New: Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it) steven at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-04-23 0:58 ` law at redhat dot com
@ 2005-04-23 16:47 ` steven at gcc dot gnu dot org
2005-06-05 7:43 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-04-23 16:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2005-04-23 16:47 -------
This was fixed by just Dan's alias patches.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16538
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/16538] Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it)
2004-07-14 13:57 [Bug tree-optimization/16538] New: Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it) steven at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-04-23 16:47 ` steven at gcc dot gnu dot org
@ 2005-06-05 7:43 ` pinskia at gcc dot gnu dot org
2005-07-25 15:31 ` steven at gcc dot gnu dot org
2005-07-25 15:34 ` steven at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-05 7:43 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16538
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/16538] Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it)
2004-07-14 13:57 [Bug tree-optimization/16538] New: Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it) steven at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-06-05 7:43 ` pinskia at gcc dot gnu dot org
@ 2005-07-25 15:31 ` steven at gcc dot gnu dot org
2005-07-25 15:34 ` steven at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-07-25 15:31 UTC (permalink / raw)
To: gcc-bugs
--
Bug 16538 depends on bug 13761, which changed state.
Bug 13761 Summary: [tree-ssa] component refs to the same struct should not alias
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13761
What |Old Value |New Value
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16538
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/16538] Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it)
2004-07-14 13:57 [Bug tree-optimization/16538] New: Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it) steven at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-07-25 15:31 ` steven at gcc dot gnu dot org
@ 2005-07-25 15:34 ` steven at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-07-25 15:34 UTC (permalink / raw)
To: gcc-bugs
--
Bug 16538 depends on bug 13761, which changed state.
Bug 13761 Summary: [tree-ssa] component refs to the same struct should not alias
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13761
What |Old Value |New Value
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16538
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-07-25 15:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-14 13:57 [Bug tree-optimization/16538] New: Missed jump threading opportunity with struct fields (but RTL thread_jumps does catch it) steven at gcc dot gnu dot org
2004-07-14 15:28 ` [Bug tree-optimization/16538] " pinskia at gcc dot gnu dot org
2005-02-14 23:41 ` law at redhat dot com
2005-04-23 0:58 ` law at redhat dot com
2005-04-23 16:47 ` steven at gcc dot gnu dot org
2005-06-05 7:43 ` pinskia at gcc dot gnu dot org
2005-07-25 15:31 ` steven at gcc dot gnu dot org
2005-07-25 15:34 ` steven 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).