public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35303] New: Code hoisting optimization at tree level
@ 2008-02-23 5:11 xinliangli at gmail dot com
2008-02-23 5:23 ` [Bug middle-end/35303] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: xinliangli at gmail dot com @ 2008-02-23 5:11 UTC (permalink / raw)
To: gcc-bugs
Missing code size optimization at tree level -- which is more flexible than RTL
level (allow hoisting memory operations).
int g1,g2;
int foo(int a, int b)
{
if (a)
g1 = a + b;
else if (b)
g2 = a+ b;
else
g3 = a + b
return g1 + g2;
}
With hoisting, it should be transformed into:
int g1, g2, g3;
int foo(int a, int b)
{
t = a+b;
if (a)
g1 = t;
else if (b)
g2 = t;
else
g3 = t;
return g1 + g2;
}
--
Summary: Code hoisting optimization at tree level
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: xinliangli at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35303
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug middle-end/35303] Code hoisting optimization at tree level
2008-02-23 5:11 [Bug middle-end/35303] New: Code hoisting optimization at tree level xinliangli at gmail dot com
@ 2008-02-23 5:23 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-23 5:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-02-23 05:22 -------
*** This bug has been marked as a duplicate of 23286 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35303
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-23 5:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-23 5:11 [Bug middle-end/35303] New: Code hoisting optimization at tree level xinliangli at gmail dot com
2008-02-23 5:23 ` [Bug middle-end/35303] " 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).