This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/17106] Opportunity to eliminate loads from TOC.
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Aug 2004 15:21:34 -0000
- Subject: [Bug tree-optimization/17106] Opportunity to eliminate loads from TOC.
- References: <20040819145911.17106.steinmtz@us.ibm.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-08-19 15:21 -------
Confirmed, what needs to happen here is that GCC needs to put these variables in a struct like so:
static struct {int s1, s2, s3; }t;
void no_common_toc1 ()
{
t.s1 = 1;
t.s2 = 2;
t.s3 = 3;
}
Which will produce the optimial code. This also helps powerpc-apple-darwin.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|other |tree-optimization
Ever Confirmed| |1
Keywords| |missed-optimization
Last reconfirmed|0000-00-00 00:00:00 |2004-08-19 15:21:33
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17106