public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/19616] New: [4.0 regression] missed tail call
@ 2005-01-24 22:54 steven at gcc dot gnu dot org
  2005-01-24 22:59 ` [Bug target/19616] " steven at gcc dot gnu dot org
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-24 22:54 UTC (permalink / raw)
  To: gcc-bugs

The following code: 
 
--------------------------------------------- 
extern void bar (double); 
void foo (void) { bar (0.0); } 
--------------------------------------------- 
 
used to produce a tail call with GCC 3.3.3 (SuSE Linux): 
 
--------------------------------------------- 
        .text 
        .p2align 4,,15 
.globl foo 
        .type   foo, @function 
foo: 
.LFB3: 
        xorpd   %xmm0, %xmm0 
        jmp     bar 
.LFE3: 
        .size   foo, .-foo 
--------------------------------------------- 
 
GCC 4.0 20050124 produces a real call instead: 
--------------------------------------------- 
        .text 
        .p2align 4,,15 
.globl foo 
        .type   foo, @function 
foo: 
.LFB2: 
        xorpd   %xmm0, %xmm0 
        subq    $8, %rsp 
.LCFI0: 
        call    bar 
        addq    $8, %rsp 
        ret 
.LFE2: 
        .size   foo, .-foo 
--------------------------------------------- 
 
The problem appears to be in expanding from trees to RTL because the 
call is properly marked as being in a tail position: 
 
;; Function foo (foo) 
 
Analyzing Edge Insertions. 
foo () 
{ 
<bb 0>: 
  bar (0.0) [tail call]; 
  return; 
 
} 
 
This happens for less trivial functions also, and can be a pretty 
severe code pessimization.

-- 
           Summary: [4.0 regression] missed tail call
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P1
         Component: target
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: steven at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,hubicka at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
@ 2005-01-24 22:59 ` steven at gcc dot gnu dot org
  2005-01-24 23:21 ` steven at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-24 22:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-24 22:59 -------
This is on x86-64 of course.  i686 passes the double on the stack 
so it can't do the tail call. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-01-24 22:59:10
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
  2005-01-24 22:59 ` [Bug target/19616] " steven at gcc dot gnu dot org
@ 2005-01-24 23:21 ` steven at gcc dot gnu dot org
  2005-01-24 23:44 ` steven at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-24 23:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-24 23:21 -------
For amd64 we have the following .expand dump for the call (you can 
get it with -fdump-rtl-expand-details): 
 
;; Function foo (foo) 
 
 
;; Generating RTL for tree basic block 0 
 
;; bar (0.0) [tail call] 
(insn 14 9 15 (set (reg:DF 21 xmm0) 
        (float_extend:DF (mem/u/i:SF (symbol_ref/u:DI ("*.LC0") [flags 0x2]) 
[3 S4 A32]))) -1 (nil) 
    (expr_list:REG_EQUAL (const_double:DF 0.0 [0x0.0p+0]) 
        (nil))) 
 
(call_insn 15 14 0 (call (mem:QI (symbol_ref:DI ("bar") [flags 0x41] 
<function_decl 0x2a959879c0 bar>) [0 S1 A8]) 
        (const_int 0 [0x0])) -1 (nil) 
    (nil) 
    (expr_list:REG_DEP_TRUE (use (reg:DF 21 xmm0)) 
        (nil))) 
 
The SIBLING_CALL_P flag is not set on the call_insn. 
 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
  2005-01-24 22:59 ` [Bug target/19616] " steven at gcc dot gnu dot org
  2005-01-24 23:21 ` steven at gcc dot gnu dot org
@ 2005-01-24 23:44 ` steven at gcc dot gnu dot org
  2005-01-25  0:08 ` steven at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-24 23:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-24 23:44 -------
check_sibcall_argument_overlap_1 returns 1 for 
 
(insn 11 0 0 (set (reg:DF 21 xmm0) 
        (float_extend:DF (mem/u/i:SF (symbol_ref/u:DI ("*.LC0") [flags 0x2]) 
[3 S4 A32]))) -1 (nil) 
    (expr_list:REG_EQUAL (const_double:DF 0.0 [0x0.0p+0]) 
        (nil))) 
 
but it returns 0 for: 
 
(insn 12 11 0 (set (reg:DF 21 xmm0) 
        (reg:DF 58)) -1 (nil) 
    (nil)) 
 
and indeed the above gives a tail call: 
 
extern void bar (double); 
void foo (void) { bar (2.0); } 
 
--> 
;; Function foo (foo) 
 
 
;; Generating RTL for tree basic block 0 
 
;; bar (2.0e+0) [tail call] 
(insn 11 9 12 0 (set (reg:DF 58) 
        (float_extend:DF (mem/u/i:SF (symbol_ref/u:DI ("*.LC0") [flags 0x2]) 
[3 S4 A32]))) -1 (nil) 
    (expr_list:REG_EQUAL (const_double:DF 2.0e+0 [0x0.8p+2]) 
        (nil))) 
 
(insn 12 11 13 0 (set (reg:DF 21 xmm0) 
        (reg:DF 58)) -1 (nil) 
    (nil)) 
 
(call_insn/j 13 12 14 0 (call (mem:QI (symbol_ref:DI ("bar") [flags 0x41] 
<function_decl 0x2a959879c0 bar>) [0 S1 
A8]) 
        (const_int 0 [0x0])) -1 (nil) 
    (nil) 
    (expr_list:REG_DEP_TRUE (use (reg:DF 21 xmm0)) 
        (nil))) 
 
(barrier 14 13 0) 
 
--> 
        .text 
        .p2align 4,,15 
.globl foo 
        .type   foo, @function 
foo: 
.LFB2: 
        movlpd  .LC1(%rip), %xmm0 
        jmp     bar 
.LFE2: 
        .size   foo, .-foo 
        .section        .eh_frame,"a",@progbits 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug target/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-01-24 23:44 ` steven at gcc dot gnu dot org
@ 2005-01-25  0:08 ` steven at gcc dot gnu dot org
  2005-01-25  0:22 ` [Bug middle-end/19616] " pinskia at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25  0:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-25 00:08 -------
Testing a patch: 
 
Index: calls.c 
=================================================================== 
RCS file: /cvs/gcc/gcc/gcc/calls.c,v 
retrieving revision 1.377 
diff -u -3 -p -r1.377 calls.c 
--- calls.c     18 Jan 2005 23:06:55 -0000      1.377 
+++ calls.c     25 Jan 2005 00:05:31 -0000 
@@ -1716,11 +1716,9 @@ check_sibcall_argument_overlap (rtx insn 
   int low, high; 
 
   if (insn == NULL_RTX) 
-    insn = get_insns (); 
-  else 
-    insn = NEXT_INSN (insn); 
+    return 0; 
 
-  for (; insn; insn = NEXT_INSN (insn)) 
+  for (insn = NEXT_INSN (insn); insn; insn = NEXT_INSN (insn)) 
     if (INSN_P (insn) 
        && check_sibcall_argument_overlap_1 (PATTERN (insn))) 
       break; 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-01-24 22:59:10         |2005-01-25 00:08:18
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-01-25  0:08 ` steven at gcc dot gnu dot org
@ 2005-01-25  0:22 ` pinskia at gcc dot gnu dot org
  2005-01-25  2:42 ` steven at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-25  0:22 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |middle-end
 GCC target triplet|                            |x86_64-*-*
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-01-25  0:22 ` [Bug middle-end/19616] " pinskia at gcc dot gnu dot org
@ 2005-01-25  2:42 ` steven at gcc dot gnu dot org
  2005-01-25 12:38 ` steven at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25  2:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-25 02:42 -------
D'oh!  Of course this affects i686 too, just need to set up the stack, e.g. 
 
void bar (double); 
void foo (double a) { bar (0.0); } 
 
Without patch: 
foo: 
        pushl   %ebp 
        movl    %esp, %ebp 
        subl    $8, %esp 
        movl    $0, (%esp) 
        movl    $0, 4(%esp) 
        call    bar 
        leave 
        ret 
 
With patch: 
foo: 
        pushl   %ebp 
        movl    %esp, %ebp 
        movl    $0, 8(%ebp) 
        movl    $0, 12(%ebp) 
        leave 
        jmp     bar 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
 GCC target triplet|x86_64-*-*                  |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-01-25  2:42 ` steven at gcc dot gnu dot org
@ 2005-01-25 12:38 ` steven at gcc dot gnu dot org
  2005-01-25 14:22 ` steven at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25 12:38 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-25 12:37 -------
The patch is of course wrong :-( 
GCC 3.3 and GCC 3.4 can both do the tail call, so this is a new problem 
for GCC 4.0.  I'm going to do a better investigation this time. 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-01-25 12:38 ` steven at gcc dot gnu dot org
@ 2005-01-25 14:22 ` steven at gcc dot gnu dot org
  2005-01-25 15:13 ` steven at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25 14:22 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-25 14:21 -------
It worked with a tail call until this patch got applied: 
 
+2004-07-10  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz> 
+ 
+       * calls.c (check_sibcall_argument_overlap_1): Handle pointers 
+       to incoming args space correctly. 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-01-25 14:22 ` steven at gcc dot gnu dot org
@ 2005-01-25 15:13 ` steven at gcc dot gnu dot org
  2005-01-25 16:07 ` steven at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25 15:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-25 15:13 -------
The test case for PR15387 does not fail with mainline  
if Zdenek's patch is reverted. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rakdver at gcc dot gnu dot
                   |                            |org
  BugsThisDependsOn|                            |15387


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-01-25 15:13 ` steven at gcc dot gnu dot org
@ 2005-01-25 16:07 ` steven at gcc dot gnu dot org
  2005-01-25 18:16 ` steven at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25 16:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-25 16:07 -------
With "-O2" at the time the patch for PR15387 was applied, we had the 
following .optimized tree for sister: 
 
;; Function sister (sister) 
 
sister (f, b) 
{ 
  int * tmp; 
  int T.2; 
  int T.1; 
  int * f.0; 
 
<bb 0>: 
  f.0 = (int *)&f; 
  brother (*(f.0 + 4B) == b, b) [tail call]; 
  return; 
 
} 
 
 
That resulted in this RTL: 
 
(insn 3 8 4 0 (set (reg/v:SI 59 [ b ]) 
        (mem/i:SI (plus:SI (reg/f:SI 53 virtual-incoming-args) 
                (const_int 12 [0xc])) [2 b+0 S4 A32])) -1 (nil) 
    (expr_list:REG_EQUIV (mem/i:SI (plus:SI (reg/f:SI 53 
virtual-incoming-args) 
                (const_int 12 [0xc])) [2 b+0 S4 A32]) 
        (nil))) 
 
(insn 11 9 13 1 (set (reg:SI 58 [ f.0 ]) 
        (reg/f:SI 53 virtual-incoming-args)) -1 (nil) 
    (nil)) 
 
(insn 15 14 16 1 (set (mem/i:SI (plus:SI (reg/f:SI 53 virtual-incoming-args) 
                (const_int 4 [0x4])) [0 S4 A32]) 
        (reg/v:SI 59 [ b ])) -1 (nil) 
    (nil)) 
 
(insn 16 15 17 1 (set (reg:SI 61) 
        (mem:SI (plus:SI (reg:SI 58 [ f.0 ]) 
                (const_int 4 [0x4])) [2 S4 A32])) -1 (nil) 
    (nil)) 
 
So reg 61 gets set to the value of 'b' that just got stored in *(f.0 + 4). 
 
CVS today generates this tree dump and RTL: 
;; Function sister (sister) 
 
Analyzing Edge Insertions. 
sister (f, b) 
{ 
  int f$c; 
  int f$a; 
  int f$b; 
  int * tmp; 
  int D.1134; 
  int D.1133; 
 
<bb 0>: 
  brother (b == f.b, b) [tail call]; 
  return; 
 
} 
 
 
(insn 3 6 4 0 (set (reg/v:SI 58 [ b ]) 
        (mem/i:SI (plus:SI (reg/f:SI 53 virtual-incoming-args) 
                (const_int 12 [0xc])) [3 b+0 S4 A32])) -1 (nil) 
    (expr_list:REG_EQUIV (mem/i:SI (plus:SI (reg/f:SI 53 
virtual-incoming-args) 
                (const_int 12 [0xc])) [3 b+0 S4 A32]) 
        (nil))) 
 
(insn 17 7 18 1 (set (mem:SI (plus:SI (reg/f:SI 56 virtual-outgoing-args) 
                (const_int 4 [0x4])) [0 S4 A32]) 
        (reg/v:SI 58 [ b ])) -1 (nil) 
    (nil)) 
 
(insn 18 17 19 1 (set (reg:SI 63) 
        (mem/s:SI (plus:SI (reg/f:SI 53 virtual-incoming-args) 
                (const_int 4 [0x4])) [3 f.b+0 S4 A32])) -1 (nil) 
    (nil)) 
 
 
Note how b is now stored to virtual-*outgoing*-args. 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2005-01-25 16:07 ` steven at gcc dot gnu dot org
@ 2005-01-25 18:16 ` steven at gcc dot gnu dot org
  2005-01-25 23:52 ` steven at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25 18:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-25 18:16 -------
rth suggested not TERing into function arguments of a tail call, which 
seems like a good idea that I will give a try. 
 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2005-01-25 18:16 ` steven at gcc dot gnu dot org
@ 2005-01-25 23:52 ` steven at gcc dot gnu dot org
  2005-01-26  0:18 ` steven at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-25 23:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-25 23:52 -------
The proposed patch may or may not be right.  Probably it is not but  
problems are not exposed at this point because of PR19633.  
  
Alright then, the conservative fix is to disallow sibcalls for functions  
that have addressable arguments.  Revisit for GCC 4.1 after that.  
  
Re-re-doing a patch...  

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2005-01-25 23:52 ` steven at gcc dot gnu dot org
@ 2005-01-26  0:18 ` steven at gcc dot gnu dot org
  2005-01-26 15:09 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-26  0:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-26 00:18 -------
Another attempt is here: 
http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01857.html 

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] [4.0 regression] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2005-01-26  0:18 ` steven at gcc dot gnu dot org
@ 2005-01-26 15:09 ` cvs-commit at gcc dot gnu dot org
  2005-01-26 15:12 ` [Bug middle-end/19616] " steven at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-01-26 15:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-01-26 15:08 -------
Subject: Bug 19616

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	steven@gcc.gnu.org	2005-01-26 15:08:51

Modified files:
	gcc            : ChangeLog calls.c tree-tailcall.c tree.h 

Log message:
	PR middle-end/19616
	* tree.h (CALL_EXPR_TAILCALL): Add comment.
	* calls.c (check_sibcall_argument_overlap_1): Revert the change
	to this function from 2004-07-10.
	* tree-tailcall.c (suitable_for_tail_opt_p): Do not consider the
	the current function for tail call optimizations if the address
	of one of it its arguments is taken.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7284&r2=2.7285
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/calls.c.diff?cvsroot=gcc&r1=1.377&r2=1.378
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-tailcall.c.diff?cvsroot=gcc&r1=2.34&r2=2.35
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree.h.diff?cvsroot=gcc&r1=1.679&r2=1.680



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2005-01-26 15:09 ` cvs-commit at gcc dot gnu dot org
@ 2005-01-26 15:12 ` steven at gcc dot gnu dot org
  2005-06-13 13:47 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-01-26 15:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-01-26 15:12 -------
No longer a regression.  Probably when PR19633 is fixed we can look into 
doing even more tail calls.  But that's just an enhancement. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|steven at gcc dot gnu dot   |unassigned at gcc dot gnu
                   |org                         |dot org
           Severity|normal                      |enhancement
             Status|ASSIGNED                    |NEW
           Priority|P1                          |P2
            Summary|[4.0 regression] missed tail|missed tail call
                   |call                        |
   Target Milestone|4.0.0                       |---


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (14 preceding siblings ...)
  2005-01-26 15:12 ` [Bug middle-end/19616] " steven at gcc dot gnu dot org
@ 2005-06-13 13:47 ` pinskia at gcc dot gnu dot org
  2005-06-15 21:14 ` steven at gcc dot gnu dot org
  2005-07-26 22:10 ` steven at gcc dot gnu dot org
  17 siblings, 0 replies; 19+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-13 13:47 UTC (permalink / raw)
  To: gcc-bugs



-- 
Bug 19616 depends on bug 19633, which changed state.

Bug 19633 Summary: local address incorrectly thought to escape
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19633

           What    |Old Value                   |New Value
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |FIXED

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (15 preceding siblings ...)
  2005-06-13 13:47 ` pinskia at gcc dot gnu dot org
@ 2005-06-15 21:14 ` steven at gcc dot gnu dot org
  2005-07-26 22:10 ` steven at gcc dot gnu dot org
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-06-15 21:14 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |steven at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-04-27 00:44:33         |2005-06-15 21:13:54
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Bug middle-end/19616] missed tail call
  2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
                   ` (16 preceding siblings ...)
  2005-06-15 21:14 ` steven at gcc dot gnu dot org
@ 2005-07-26 22:10 ` steven at gcc dot gnu dot org
  17 siblings, 0 replies; 19+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-07-26 22:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-07-26 22:09 -------
Doing more turns out to be more trouble than it's worth. 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19616


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2005-07-26 22:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-24 22:54 [Bug target/19616] New: [4.0 regression] missed tail call steven at gcc dot gnu dot org
2005-01-24 22:59 ` [Bug target/19616] " steven at gcc dot gnu dot org
2005-01-24 23:21 ` steven at gcc dot gnu dot org
2005-01-24 23:44 ` steven at gcc dot gnu dot org
2005-01-25  0:08 ` steven at gcc dot gnu dot org
2005-01-25  0:22 ` [Bug middle-end/19616] " pinskia at gcc dot gnu dot org
2005-01-25  2:42 ` steven at gcc dot gnu dot org
2005-01-25 12:38 ` steven at gcc dot gnu dot org
2005-01-25 14:22 ` steven at gcc dot gnu dot org
2005-01-25 15:13 ` steven at gcc dot gnu dot org
2005-01-25 16:07 ` steven at gcc dot gnu dot org
2005-01-25 18:16 ` steven at gcc dot gnu dot org
2005-01-25 23:52 ` steven at gcc dot gnu dot org
2005-01-26  0:18 ` steven at gcc dot gnu dot org
2005-01-26 15:09 ` cvs-commit at gcc dot gnu dot org
2005-01-26 15:12 ` [Bug middle-end/19616] " steven at gcc dot gnu dot org
2005-06-13 13:47 ` pinskia at gcc dot gnu dot org
2005-06-15 21:14 ` steven at gcc dot gnu dot org
2005-07-26 22:10 ` 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).