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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ 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; 11+ 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] 11+ messages in thread
* [Bug tree-optimization/14705] [tree-ssa] more alias analysis needed!?
[not found] <bug-14705-5009@http.gcc.gnu.org/bugzilla/>
@ 2006-02-16 21:17 ` pinskia at gcc dot gnu dot org
2006-02-16 21:17 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-16 21:17 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/14705] [tree-ssa] more alias analysis needed!?
[not found] <bug-14705-5009@http.gcc.gnu.org/bugzilla/>
2006-02-16 21:17 ` pinskia at gcc dot gnu dot org
@ 2006-02-16 21:17 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-16 21:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pinskia at gcc dot gnu dot org 2006-02-16 21:17 -------
Comment #0 and #2 are fixed now by:
2006-02-16 Daniel Berlin <dberlin@dberlin.org>
* tree-ssa-operands.c (access_can_touch_variable): Fix typo in
previous change.
2006-02-15 Daniel Berlin <dberlin@dberlin.org>
* tree.c (init_ttree): Add STRUCT_FIELD_TAG handling.
(tree_code_size): Ditto.
* tree.h (struct tree_memory_tag): Remove parent_var.
(struct tree_struct_field_tag): New.
(SFT_OFFSET): New.
(SFT_SIZE): New.
(union tree_node): Add sft member.
* tree-ssa-alias.c (get_tmt_for): Don't handle TYPE_READONLY
specially here.
(create_sft): Add size and offset argument, set SFT_OFFSET and
SFT_SIZE.
(create_overlap_variables_for): Update for SFT_OFFSET/SFT_SIZE.
* treestruct.def: Add TS_STRUCT_FIELD_TAG.
* tree-flow-inline.h (get_subvar_at): Update for
SFT_OFFSET/SFT_SIZE.
(var_can_have_subvars): Ditto.
(overlap_subvar): Ditto.
* print-tree.c (print_node): Print out interesting things for
SFT's.
* tree-flow.h (struct subvar): Remove offset and size members.
* tree-ssa-operands.c (get_expr_operands): Update for
get_indirect_ref_operands changes.
(get_indirect_ref_operands): Call add_virtual_operand instead of
add_stmt_operand. Only recurse on base var if requested.
(access_can_touch_variable): New function.
(add_stmt_operand): Split virtual operand handling into ...
(add_virtual_operand): Here. Add offset, size, and for_clobber
arguments. Prune alias sets.
(add_call_clobber_ops): Call add_virtual_operand.
Comment #3 as mentioned it PR 13761.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug tree-optimization/14705] [tree-ssa] more alias analysis needed!?
[not found] <20040324034437.14705.kazu@gcc.gnu.org>
@ 2005-09-07 18:35 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-09-07 18:35 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |alias
Last reconfirmed|2005-07-04 21:36:12 |2005-09-07 18:35:18
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14705
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-02-16 21:17 UTC | newest]
Thread overview: 11+ 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
[not found] <20040324034437.14705.kazu@gcc.gnu.org>
2005-09-07 18:35 ` pinskia at gcc dot gnu dot org
[not found] <bug-14705-5009@http.gcc.gnu.org/bugzilla/>
2006-02-16 21:17 ` pinskia at gcc dot gnu dot org
2006-02-16 21:17 ` pinskia 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).