public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/33546] New: [missed optimization] trivial static function not inlined.
@ 2007-09-24 18:06 pluto at agmk dot net
2007-09-24 18:08 ` [Bug tree-optimization/33546] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: pluto at agmk dot net @ 2007-09-24 18:06 UTC (permalink / raw)
To: gcc-bugs
$ cat 0.cpp
template < typename R, typename T, R ( T::* method )() >
static inline R dispatch( T& object )
{
return ( object.*method )();
}
struct X
{
virtual ~X();
virtual void f();
};
void test1( X& obj )
{
void ( *f )( X& ) = dispatch< void, X, &X::f >;
f( obj );
}
void test2( X& obj )
{
obj.f();
}
g++-4.2.2-RC1 produces unoptimal code for test1:
test1(X&):
jmp void dispatch<void, X, &(X::f())>(X&)
test2(X&):
movq (%rdi), %rax
movq 16(%rax), %r11
jmp *%r11
void dispatch<void, X, &(X::f())>(X&):
movq (%rdi), %rax
movq 16(%rax), %r11
jmp *%r11
--
Summary: [missed optimization] trivial static function not
inlined.
Product: gcc
Version: 4.2.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pluto at agmk dot net
GCC target triplet: x86_64-gnu-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33546
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/33546] [missed optimization] trivial static function not inlined.
2007-09-24 18:06 [Bug tree-optimization/33546] New: [missed optimization] trivial static function not inlined pluto at agmk dot net
@ 2007-09-24 18:08 ` pinskia at gcc dot gnu dot org
2007-09-24 18:10 ` pcarlini at suse dot de
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-24 18:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-09-24 18:07 -------
If this has already been fixed on the trunk, then what is the issue?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33546
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/33546] [missed optimization] trivial static function not inlined.
2007-09-24 18:06 [Bug tree-optimization/33546] New: [missed optimization] trivial static function not inlined pluto at agmk dot net
2007-09-24 18:08 ` [Bug tree-optimization/33546] " pinskia at gcc dot gnu dot org
@ 2007-09-24 18:10 ` pcarlini at suse dot de
2007-09-24 18:21 ` pluto at agmk dot net
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pcarlini at suse dot de @ 2007-09-24 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pcarlini at suse dot de 2007-09-24 18:10 -------
Maybe the underlying issue is tree-optimization/3713, not fixed in
less-than-trivial cases?
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pcarlini at suse dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33546
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/33546] [missed optimization] trivial static function not inlined.
2007-09-24 18:06 [Bug tree-optimization/33546] New: [missed optimization] trivial static function not inlined pluto at agmk dot net
2007-09-24 18:08 ` [Bug tree-optimization/33546] " pinskia at gcc dot gnu dot org
2007-09-24 18:10 ` pcarlini at suse dot de
@ 2007-09-24 18:21 ` pluto at agmk dot net
2007-09-24 18:24 ` pinskia at gcc dot gnu dot org
2007-09-24 20:54 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pluto at agmk dot net @ 2007-09-24 18:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pluto at agmk dot net 2007-09-24 18:21 -------
(In reply to comment #1)
> If this has already been fixed on the trunk, then what is the issue?
>
4.3 is not ready for production use.
4.2.2 is quite stable and this missed optimization
introduces a redundant branch which is not expected
in our heavy template code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33546
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/33546] [missed optimization] trivial static function not inlined.
2007-09-24 18:06 [Bug tree-optimization/33546] New: [missed optimization] trivial static function not inlined pluto at agmk dot net
` (2 preceding siblings ...)
2007-09-24 18:21 ` pluto at agmk dot net
@ 2007-09-24 18:24 ` pinskia at gcc dot gnu dot org
2007-09-24 20:54 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-24 18:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-09-24 18:24 -------
And enhancements only go for the next version and never on production code
(release branches) (like any sane product release should happen, even physicial
ones).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33546
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug tree-optimization/33546] [missed optimization] trivial static function not inlined.
2007-09-24 18:06 [Bug tree-optimization/33546] New: [missed optimization] trivial static function not inlined pluto at agmk dot net
` (3 preceding siblings ...)
2007-09-24 18:24 ` pinskia at gcc dot gnu dot org
@ 2007-09-24 20:54 ` rguenth at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-09-24 20:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2007-09-24 20:54 -------
we clearly don't do enhancements for a release branch.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33546
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-09-24 20:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-24 18:06 [Bug tree-optimization/33546] New: [missed optimization] trivial static function not inlined pluto at agmk dot net
2007-09-24 18:08 ` [Bug tree-optimization/33546] " pinskia at gcc dot gnu dot org
2007-09-24 18:10 ` pcarlini at suse dot de
2007-09-24 18:21 ` pluto at agmk dot net
2007-09-24 18:24 ` pinskia at gcc dot gnu dot org
2007-09-24 20:54 ` rguenth 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).