This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/15576] New: Class initialization optimization is disabled
- From: "mckinlay at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 May 2004 21:03:16 -0000
- Subject: [Bug java/15576] New: Class initialization optimization is disabled
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcj used to perform an optimization which eliminated redundant class
initialization calls. For example, given the following example,
_Jv_InitClass(Foo) is called twice from Init.a() when it is only needed once:
class Foo
{
static int a;
static int b;
}
public class Init
{
int a()
{
return Foo.a + Foo.b;
}
}
This was done in expr.c build_class_init(), look for
LOCAL_CLASS_INITIALIZATION_FLAG. The optimization was turned off in tree-ssa
branch and needs to be updated to work with the gimplifier.
--
Summary: Class initialization optimization is disabled
Product: gcc
Version: unknown
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mckinlay at redhat dot com
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15576