From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19609 invoked by alias); 21 May 2004 21:03:17 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 19581 invoked by uid 48); 21 May 2004 21:03:16 -0000 Date: Sat, 22 May 2004 19:57:00 -0000 From: "mckinlay at redhat dot com" To: gcc-bugs@gcc.gnu.org Message-ID: <20040521210313.15576.mckinlay@redhat.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/15576] New: Class initialization optimization is disabled X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg02383.txt.bz2 List-Id: 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