public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/8387: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
@ 2003-02-11 21:56 Steven Bosscher
0 siblings, 0 replies; 6+ messages in thread
From: Steven Bosscher @ 2003-02-11 21:56 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/8387; it has been noted by GNATS.
From: Steven Bosscher <s.bosscher@student.tudelft.nl>
To: garloff@suse.de, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
pfeifer@dbai.tuwien.ac.at, dalej@apple.com, nobody@gcc.gnu.org,
gcc-prs@gcc.gnu.org
Cc: Josef Zlomek <zlomj9am@artax.karlin.mff.cuni.cz>
Subject: Re: c/8387: [3.3 regression] -finline-limit behavior changed; new
inlining flags need doc
Date: 11 Feb 2003 22:54:51 +0100
Op di 11-02-2003, om 21:14 schreef Steven Bosscher:
> This also happens on -O1 -fpic on i586-pc-linux-gnu. It disappears when
> I comment out "flag_crossjumping = 1;" in toplev.c, so this bug probably
> is somewhere in cleanup_cfg()
>
> Greetz
> Steven
>
Yup, crossjumping or cfgcleanup after crossjumping seems to be the cause
of this.
For this code for example, the problem is that a whole jump table for
one of the switch statements is wiped out
---- 8< ----
int *g;
int main (void)
{
switch (*g)
{
case 0:
{
switch (*g)
{
case 0: *g = 1; break;
case 1:
case 2: *g = 1; break;
case 3:
case 4: *g = 1; break;
}
break;
}
case 1:
{
switch (*g)
{
case 0: *g = 1; break;
case 1:
case 2: *g = 1; break;
case 3:
case 4: *g = 1; break;
}
}
}
return 0;
}
---- 8< ----
steven# gcc-3.4 -v
Reading specs from /opt/experimental/lib/gcc-lib/i586-pc-linux-gnu/3.4/specs
Configured with: ../gcc-trunk/configure --disable-nls --with-gnu-as --with-gnu-ld --prefix=/opt/experimental --program-suffix=-3.4 --enable-languages=c
Thread model: posix
gcc version 3.4 20030211 (experimental)
steven# gcc-3.4 c7887_PR.c -O -fpic -save-temps
c7887_PR.o: In function `main':
c7887_PR.o(.text+0x3b): undefined reference to `.L10'
collect2: ld returned 1 exit status
Look at a piece of the assembly diff:
.L3: .L3:
movl g@GOT(%ecx), %eax movl g@GOT(%ecx), %eax
movl (%eax), %eax movl (%eax), %eax
cmpl $4, (%eax) cmpl $4, (%eax)
ja .L2 ja .L2
movl (%eax), %eax movl (%eax), %eax
leal .L10@GOTOFF(%ecx), %edx leal .L10@GOTOFF(%ecx), %edx
jmp .L19 | movl (%edx,%eax,4), %eax
> addl %ecx, %eax
> jmp *%eax
> .section .rodata
> .align 4
> .align 4
> .L10:
> .long .L5@GOTOFF
> .long .L7@GOTOFF
> .long .L7@GOTOFF
> .long .L9@GOTOFF
> .long .L9@GOTOFF
> .text
> .L5:
> movl g@GOT(%ecx), %eax
> movl (%eax), %eax
> movl $1, (%eax)
> jmp .L2
> .L7:
> movl g@GOT(%ecx), %eax
> movl (%eax), %eax
> movl $1, (%eax)
> jmp .L2
> .L9:
> movl g@GOT(%ecx), %eax
> movl (%eax), %eax
> movl $1, (%eax)
> jmp .L2
.L11: .L11:
movl g@GOT(%ecx), %eax movl g@GOT(%ecx), %eax
movl (%eax), %eax movl (%eax), %eax
cmpl $4, (%eax) cmpl $4, (%eax)
ja .L2 ja .L2
movl (%eax), %eax movl (%eax), %eax
leal .L18@GOTOFF(%ecx), %edx leal .L18@GOTOFF(%ecx), %edx
.L19: <
movl (%edx,%eax,4), %eax movl (%edx,%eax,4), %eax
The label that's missing refers to the jump table, but it's gone...
This is for the first select block with five cases. The second block
results in a jumptable to 5 identical labels with crossjumping enabled.
To me this is black magic :-) Hope it helps somebody to fix this bug.
Greetz
Steven
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c/8387: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
@ 2003-03-11 5:01 drow
0 siblings, 0 replies; 6+ messages in thread
From: drow @ 2003-03-11 5:01 UTC (permalink / raw)
To: dalej, dalej, garloff, gcc-bugs, gcc-prs, nobody, pfeifer
Synopsis: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
Responsible-Changed-From-To: unassigned->dalej
Responsible-Changed-By: drow
Responsible-Changed-When: Tue Mar 11 05:01:45 2003
Responsible-Changed-Why:
Dale et al. saw this through
State-Changed-From-To: analyzed->closed
State-Changed-By: drow
State-Changed-When: Tue Mar 11 05:01:45 2003
State-Changed-Why:
Patch committed to HEAD and 3.3
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8387
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c/8387: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
@ 2003-03-11 2:46 Dale Johannesen
0 siblings, 0 replies; 6+ messages in thread
From: Dale Johannesen @ 2003-03-11 2:46 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/8387; it has been noted by GNATS.
From: Dale Johannesen <dalej@apple.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Dale Johannesen <dalej@apple.com>, pfeifer@dbai.tuwien.ac.at,
gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, garloff@suse.de
Subject: Re: c/8387: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
Date: Mon, 10 Mar 2003 18:36:11 -0800
On Monday, March 10, 2003, at 06:24 PM, Daniel Jacobowitz wrote:
> The patch for this has been committed to the 3.3 branch and HEAD now,
> right?
> By this patch:
>
> 2003-03-06 Kurt Garloff <garloff@suse.de>
> Geoffrey Keating <geoffk@apple.com>
> Dale Johannesen <dalej@apple.com>
Yes. The ChangeLog entry in HEAD lists only Garloff,
but it's the same patch.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c/8387: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
@ 2003-03-11 2:26 Daniel Jacobowitz
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Jacobowitz @ 2003-03-11 2:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/8387; it has been noted by GNATS.
From: Daniel Jacobowitz <drow@mvista.com>
To: pfeifer@dbai.tuwien.ac.at, gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org,
garloff@suse.de, dalej@apple.com
Cc:
Subject: Re: c/8387: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
Date: Mon, 10 Mar 2003 21:24:01 -0500
The patch for this has been committed to the 3.3 branch and HEAD now, right?
By this patch:
2003-03-06 Kurt Garloff <garloff@suse.de>
Geoffrey Keating <geoffk@apple.com>
Dale Johannesen <dalej@apple.com>
* params.def: Introduce parameter max-inline-insns-rtl for
a separate limit for the RTL inliner.
* params.h: Likewise.
* integrate.c (function_cannot_inline_p): Use it.
* toplev.c (decode_f_option): Set multiple parameters
controlling inlining with -finline-limit.
* params.def: Fix orthographic and typographic errors.
* doc/invoke.texi: Document parameters controlling inlining
and the way -finline-limit sets multiple of them.
* tree.h (struct tree_decl): Introduce inlined_function_flag,
recording whether the function became eligible for inlining
by a compiler flag rather than the declaration.
Provide DID_INLINE_FUNC macro to access it.
* c-decl.c (grokdeclarator): Set DID_INLINE_FUNC.
* cp/decl.c (grokfndecl): Likewise.
* toplev.c (rest_of_compilation): Likewise.
* cp/optimize (maybe_clone_body): Copy DID_INLINE_FUNC.
* print-tree.c (print_node): Report it.
* params.def: Introduce new max-inline-insns-auto limit.
* params.h: Likewise.
* tree-inline.c (inlinable_function_p): Apply it to functions
with DID_INLINE_FUNC set.
* toplev.c (decode_f_option): Initialize it from -finline-limit
value.
* doc/invoke.texi: Document new parameter.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c/8387: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
@ 2003-02-22 21:24 ebotcazou
0 siblings, 0 replies; 6+ messages in thread
From: ebotcazou @ 2003-02-22 21:24 UTC (permalink / raw)
To: dalej, garloff, gcc-bugs, gcc-prs, nobody, pfeifer
Synopsis: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
State-Changed-From-To: open->analyzed
State-Changed-By: ebotcazou
State-Changed-When: Sat Feb 22 21:24:16 2003
State-Changed-Why:
Patch submitted for a while.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8387
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: c/8387: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc
@ 2003-02-11 20:16 Steven Bosscher
0 siblings, 0 replies; 6+ messages in thread
From: Steven Bosscher @ 2003-02-11 20:16 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/8387; it has been noted by GNATS.
From: Steven Bosscher <s.bosscher@student.tudelft.nl>
To: garloff@suse.de, gcc-bugs@gcc.gnu.org, gcc-gnats@gcc.gnu.org,
pfeifer@dbai.tuwien.ac.at, dalej@apple.com, nobody@gcc.gnu.org,
gcc-prs@gcc.gnu.org
Cc:
Subject: Re: c/8387: [3.3 regression] -finline-limit behavior changed; new
inlining flags need doc
Date: 11 Feb 2003 21:14:18 +0100
This also happens on -O1 -fpic on i586-pc-linux-gnu. It disappears when
I comment out "flag_crossjumping = 1;" in toplev.c, so this bug probably
is somewhere in cleanup_cfg()
Greetz
Steven
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-03-11 5:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-11 21:56 c/8387: [3.3 regression] -finline-limit behavior changed; new inlining flags need doc Steven Bosscher
-- strict thread matches above, loose matches on Subject: below --
2003-03-11 5:01 drow
2003-03-11 2:46 Dale Johannesen
2003-03-11 2:26 Daniel Jacobowitz
2003-02-22 21:24 ebotcazou
2003-02-11 20:16 Steven Bosscher
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).