public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end)
@ 2004-02-13 4:42 pinskia at gcc dot gnu dot org
2004-02-13 4:43 ` [Bug optimization/14135] " pinskia at gcc dot gnu dot org
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-13 4:42 UTC (permalink / raw)
To: gcc-bugs
The function, f, should just have a sibcalling to t and should be the same as function, g.
This is derived from the java front-end (java_tree_inlining_walk_subtrees, case BLOCK).
int t(int);
int f(int i)
{
int result;
result = t(i);
if (result)
return result;
return 0;
}
int g(int i)
{
return t(i);
}
--
Summary: No sibcalling for some obvious places (happens in java's
front-end)
Product: gcc
Version: tree-ssa
Status: UNCONFIRMED
Keywords: pessimizes-code
Severity: normal
Priority: P2
Component: optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
@ 2004-02-13 4:43 ` pinskia at gcc dot gnu dot org
2004-02-13 16:40 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-13 4:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-13 04:43 -------
This should be able done on the tree-ssa.
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |tree-ssa 3.4.0 3.5.0
Target Milestone|--- |tree-ssa
Version|tree-ssa |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
2004-02-13 4:43 ` [Bug optimization/14135] " pinskia at gcc dot gnu dot org
@ 2004-02-13 16:40 ` pinskia at gcc dot gnu dot org
2004-02-29 6:40 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-13 16:40 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
2004-02-13 4:43 ` [Bug optimization/14135] " pinskia at gcc dot gnu dot org
2004-02-13 16:40 ` pinskia at gcc dot gnu dot org
@ 2004-02-29 6:40 ` pinskia at gcc dot gnu dot org
2004-03-04 7:17 ` pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-29 6:40 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-02-29 06:40 -------
The main issue is that the two returns are not merged at the tree level.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2004-02-29 6:40 ` pinskia at gcc dot gnu dot org
@ 2004-03-04 7:17 ` pinskia at gcc dot gnu dot org
2004-03-04 8:54 ` kazu at cs dot umass dot edu
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-04 7:17 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|tree-ssa 3.4.0 3.5.0 |tree-ssa 3.4.0 3.5.0 2.95.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2004-03-04 7:17 ` pinskia at gcc dot gnu dot org
@ 2004-03-04 8:54 ` kazu at cs dot umass dot edu
2004-03-04 18:01 ` pinskia at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: kazu at cs dot umass dot edu @ 2004-03-04 8:54 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |kazu at cs dot umass dot edu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2004-03-04 8:54 ` kazu at cs dot umass dot edu
@ 2004-03-04 18:01 ` pinskia at gcc dot gnu dot org
2004-03-04 18:22 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-04 18:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-04 18:01 -------
Mine, I am working on this.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-03-04 18:01:44
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2004-03-04 18:01 ` pinskia at gcc dot gnu dot org
@ 2004-03-04 18:22 ` pinskia at gcc dot gnu dot org
2004-03-05 5:25 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-04 18:22 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-04 18:22 -------
I should mention when the return statements are combined, there is another optimization
which needs to happen (which I already have a patch for):
bb0:
if (a != b) goto bb2; else goto bb1;
bb1:
bb2:
x = PHI (a (bb1), b (bb0))
We can rewrite that as:
bb0:
bb1:
bb2:
x = b;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (6 preceding siblings ...)
2004-03-04 18:22 ` pinskia at gcc dot gnu dot org
@ 2004-03-05 5:25 ` pinskia at gcc dot gnu dot org
2004-03-07 3:03 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-05 5:25 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-05 05:25 -------
I have a fix now, I will be committing the two patches to the lno branch which the lno
branch gets another merge from the tree-ssa branch.
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2004-03-04 18:01:44 |2004-03-05 05:25:17
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (7 preceding siblings ...)
2004-03-05 5:25 ` pinskia at gcc dot gnu dot org
@ 2004-03-07 3:03 ` pinskia at gcc dot gnu dot org
2004-03-12 7:17 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-07 3:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-07 03:03 -------
With my two patches, GCC produces (on powerpc-apple-darwin without -mdynamic-no-
pic which is why the pic register is saved:( ):
_java_tree_inlining_walk_subtrees:
00000fc4 lwz r2,_java_handle_option(r3)
00000fc8 or r4,r5,r5
00000fcc stw r31,0xfffc(r1)
00000fd0 or r5,r6,r6
00000fd4 cmpwi cr7,r2,_java_handle_option
00000fd8 or r6,r7,r7
00000fdc li r3,_java_handle_option
00000fe0 beq cr7,0xffc
00000fe4 lbz r0,0xc(r2)
00000fe8 cmpwi cr7,r0,0x4
00000fec bne cr7,0xffc
00000ff0 lwz r31,0xfffc(r1)
00000ff4 addi r3,r2,0x18
00000ff8 b 0x32dc ; symbol stub for: _walk_tree
00000ffc lwz r31,0xfffc(r1)
00001000 blr
--
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2004-03-05 05:25:17 |2004-03-07 03:03:12
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (8 preceding siblings ...)
2004-03-07 3:03 ` pinskia at gcc dot gnu dot org
@ 2004-03-12 7:17 ` pinskia at gcc dot gnu dot org
2004-03-12 7:17 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-03-12 7:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-12 07:17 -------
Suspending as this is fixed on the lno branch.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |SUSPENDED
Target Milestone|tree-ssa |lno
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (9 preceding siblings ...)
2004-03-12 7:17 ` pinskia at gcc dot gnu dot org
@ 2004-03-12 7:17 ` cvs-commit at gcc dot gnu dot org
2004-06-07 18:18 ` [Bug rtl-optimization/14135] " pinskia at gcc dot gnu dot org
2004-06-07 18:20 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-12 7:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2004-03-12 07:17 -------
Subject: Bug 14135
CVSROOT: /cvs/gcc
Module name: gcc
Branch: lno-branch
Changes by: pinskia@gcc.gnu.org 2004-03-12 07:17:16
Modified files:
gcc : ChangeLog.lno Makefile.in timevar.def
tree-optimize.c
gcc/testsuite : ChangeLog.lno
gcc/testsuite/gcc.dg/tree-ssa: 20040308-2.c
Added files:
gcc : tree-ssa-return.c
Log message:
ChangeLog:
PR optimization/14135
* tree-ssa-return.c: New file.
* Makefile.in (tree-ssa-return.o): Add.
* tree-optimize.c (init_tree_optimization_passes): Add
pass_return.
* timevar.def (TV_TREE_RETURN): New.
testsuite/ChangeLog:
PR optimization/14135
* gcc.dg/tree-ssa/20040308-2.c: UnXFAIL.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-return.c.diff?cvsroot=gcc&only_with_tag=lno-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.lno.diff?cvsroot=gcc&only_with_tag=lno-branch&r1=1.1.2.82&r2=1.1.2.83
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/Makefile.in.diff?cvsroot=gcc&only_with_tag=lno-branch&r1=1.903.2.158.2.20&r2=1.903.2.158.2.21
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/timevar.def.diff?cvsroot=gcc&only_with_tag=lno-branch&r1=1.14.2.28.2.9&r2=1.14.2.28.2.10
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-optimize.c.diff?cvsroot=gcc&only_with_tag=lno-branch&r1=1.1.4.98.2.15&r2=1.1.4.98.2.16
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.lno.diff?cvsroot=gcc&only_with_tag=lno-branch&r1=1.1.2.11&r2=1.1.2.12
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/20040308-2.c.diff?cvsroot=gcc&only_with_tag=lno-branch&r1=1.1.2.2&r2=1.1.2.3
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (10 preceding siblings ...)
2004-03-12 7:17 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-07 18:18 ` pinskia at gcc dot gnu dot org
2004-06-07 18:20 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-07 18:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-07 18:18 -------
Fixed on the mainline by:
2004-06-07 Richard Henderson <rth@redhat.com>
* gimple-low.c (struct lower_data): Add the_return_label and
one_return_stmt.
(lower_function_body): Initialize and use them.
(lower_return_expr): New.
(lower_stmt): Call it.
* gimplify.c (gimplify_return_expr): Force the argument to be either
null or a result_decl.
* tree-gimple.c: Update gimple grammer to match.
* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Deny
coalescing of result_decls.
--
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|lno |3.5.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug rtl-optimization/14135] No sibcalling for some obvious places (happens in java's front-end)
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
` (11 preceding siblings ...)
2004-06-07 18:18 ` [Bug rtl-optimization/14135] " pinskia at gcc dot gnu dot org
@ 2004-06-07 18:20 ` pinskia at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-07 18:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-07 18:20 -------
Fixed I said, fixed.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|SUSPENDED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14135
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2004-06-07 18:20 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-13 4:42 [Bug optimization/14135] New: No sibcalling for some obvious places (happens in java's front-end) pinskia at gcc dot gnu dot org
2004-02-13 4:43 ` [Bug optimization/14135] " pinskia at gcc dot gnu dot org
2004-02-13 16:40 ` pinskia at gcc dot gnu dot org
2004-02-29 6:40 ` pinskia at gcc dot gnu dot org
2004-03-04 7:17 ` pinskia at gcc dot gnu dot org
2004-03-04 8:54 ` kazu at cs dot umass dot edu
2004-03-04 18:01 ` pinskia at gcc dot gnu dot org
2004-03-04 18:22 ` pinskia at gcc dot gnu dot org
2004-03-05 5:25 ` pinskia at gcc dot gnu dot org
2004-03-07 3:03 ` pinskia at gcc dot gnu dot org
2004-03-12 7:17 ` pinskia at gcc dot gnu dot org
2004-03-12 7:17 ` cvs-commit at gcc dot gnu dot org
2004-06-07 18:18 ` [Bug rtl-optimization/14135] " pinskia at gcc dot gnu dot org
2004-06-07 18:20 ` 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).