This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug java/15576] New: Class initialization optimization is disabled


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]