public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!?
@ 2004-03-24 3:44 kazu at cs dot umass dot edu
2004-03-24 4:35 ` [Bug optimization/14705] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-24 3:44 UTC (permalink / raw)
To: gcc-bugs
The second "if" statement is not optimized away until CSE.
/* Reduced from reload_combine() in postreload.c. */
struct s {
int c;
struct s *next;
};
int global;
extern void bar (void);
void
foo (struct s *p)
{
for (; p; p = p->next)
{
if (p->c != 0)
continue;
global++;
if (p->c == 0)
bar ();
}
}
To give you sense of where this comes from,
think of the first "if" as !INSN_P and
think of the second one as INSN_P with bar() being single_set_2.
--
Summary: [tree-ssa] more alias analysis needed!?
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kazu at cs dot umass dot edu
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14705] [tree-ssa] more alias analysis needed!?
2004-03-24 3:44 [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!? kazu at cs dot umass dot edu
@ 2004-03-24 4:35 ` pinskia at gcc dot gnu dot org
2004-03-24 17:30 ` kazu at cs dot umass dot edu
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-24 4:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-24 04:34 -------
Confirmed,
Variable: p, UID 1, type memory tag: TMT.3, default def: p_5
Variable: TMT.3, UID 5, is global, call clobbered, may aliases: { global }
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |pessimizes-code
Last reconfirmed|0000-00-00 00:00:00 |2004-03-24 04:34:59
date| |
Target Milestone|--- |tree-ssa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14705] [tree-ssa] more alias analysis needed!?
2004-03-24 3:44 [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!? kazu at cs dot umass dot edu
2004-03-24 4:35 ` [Bug optimization/14705] " pinskia at gcc dot gnu dot org
@ 2004-03-24 17:30 ` kazu at cs dot umass dot edu
2004-03-24 17:32 ` kazu at cs dot umass dot edu
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-24 17:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-03-24 17:30 -------
Reduced to:
struct s {
int c;
struct s *next;
};
int global;
extern void bar (void);
void
foo (struct s *p)
{
if (p->c != 0)
return;
global++;
if (p->c == 0)
bar ();
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14705] [tree-ssa] more alias analysis needed!?
2004-03-24 3:44 [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!? kazu at cs dot umass dot edu
2004-03-24 4:35 ` [Bug optimization/14705] " pinskia at gcc dot gnu dot org
2004-03-24 17:30 ` kazu at cs dot umass dot edu
@ 2004-03-24 17:32 ` kazu at cs dot umass dot edu
2004-03-24 17:36 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-24 17:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2004-03-24 17:32 -------
Another similar testcase reduced from web.c.
extern void abort (void) __attribute__ ((__noreturn__));
struct s {
int a;
int b;
};
void
bar (struct s *p)
{
if (p->a)
abort ();
p->b = 0;
if (p->a)
abort ();
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug optimization/14705] [tree-ssa] more alias analysis needed!?
2004-03-24 3:44 [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!? kazu at cs dot umass dot edu
` (2 preceding siblings ...)
2004-03-24 17:32 ` kazu at cs dot umass dot edu
@ 2004-03-24 17:36 ` pinskia at gcc dot gnu dot org
2004-05-24 17:46 ` [Bug tree-optimization/14705] " pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-24 17:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-24 17:36 -------
The reduced case from web.c is also PR 13761.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14705] [tree-ssa] more alias analysis needed!?
2004-03-24 3:44 [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!? kazu at cs dot umass dot edu
` (3 preceding siblings ...)
2004-03-24 17:36 ` pinskia at gcc dot gnu dot org
@ 2004-05-24 17:46 ` pinskia at gcc dot gnu dot org
2004-12-30 14:05 ` steven at gcc dot gnu dot org
2005-05-07 15:03 ` kazu at cs dot umass dot edu
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-24 17:46 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|3.5.0 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14705] [tree-ssa] more alias analysis needed!?
2004-03-24 3:44 [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!? kazu at cs dot umass dot edu
` (4 preceding siblings ...)
2004-05-24 17:46 ` [Bug tree-optimization/14705] " pinskia at gcc dot gnu dot org
@ 2004-12-30 14:05 ` steven at gcc dot gnu dot org
2005-05-07 15:03 ` kazu at cs dot umass dot edu
6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2004-12-30 14:05 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From steven at gcc dot gnu dot org 2004-12-30 14:05 -------
Looks like food for DannyB.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |dberlin at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/14705] [tree-ssa] more alias analysis needed!?
2004-03-24 3:44 [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!? kazu at cs dot umass dot edu
` (5 preceding siblings ...)
2004-12-30 14:05 ` steven at gcc dot gnu dot org
@ 2005-05-07 15:03 ` kazu at cs dot umass dot edu
6 siblings, 0 replies; 8+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-05-07 15:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From kazu at cs dot umass dot edu 2005-05-07 15:03 -------
FWIW, here is the last SSA form I get with vops.
foo (p)
{
int D.1241;
int global.0;
int D.1239;
<bb 0>:
# VUSE <global_3>;
D.1239_2 = p_1->c;
if (D.1239_2 != 0) goto <L2>; else goto <L0>;
<L0>:;
# VUSE <global_3>;
global.0_4 = global;
D.1241_5 = global.0_4 + 1;
# global_6 = V_MUST_DEF <global_3>;
global = D.1241_5;
# VUSE <global_6>;
D.1239_7 = p_1->c;
if (D.1239_7 == 0) goto <L1>; else goto <L2>;
<L1>:;
# global_8 = V_MAY_DEF <global_6>;
bar () [tail call];
<L2>:;
return;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-05-07 15:03 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-24 3:44 [Bug optimization/14705] New: [tree-ssa] more alias analysis needed!? kazu at cs dot umass dot edu
2004-03-24 4:35 ` [Bug optimization/14705] " pinskia at gcc dot gnu dot org
2004-03-24 17:30 ` kazu at cs dot umass dot edu
2004-03-24 17:32 ` kazu at cs dot umass dot edu
2004-03-24 17:36 ` pinskia at gcc dot gnu dot org
2004-05-24 17:46 ` [Bug tree-optimization/14705] " pinskia at gcc dot gnu dot org
2004-12-30 14:05 ` steven at gcc dot gnu dot org
2005-05-07 15:03 ` kazu at cs dot umass dot edu
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).