From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24435 invoked by alias); 25 Aug 2004 15:45:53 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 24395 invoked by uid 48); 25 Aug 2004 15:45:51 -0000 Date: Wed, 25 Aug 2004 15:45:00 -0000 From: "mckinlay at redhat dot com" To: java-prs@gcc.gnu.org Message-ID: <20040825154545.17187.mckinlay@redhat.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/17187] New: Call to java.lang.Object constructor is redundant X-Bugzilla-Reason: CC X-SW-Source: 2004-q3/txt/msg00323.txt.bz2 List-Id: The constructor for java.lang.Object does nothing. Its probably a reasonable assumption that it will always do nothing, so, we should change the compiler to not generate calls to it when generating native code. This would save 1 call for every "new" operation, and also improve the number of inlining opportunities available to the compiler, as many constructor calls could now be fully inlined. One way to do this might be to extend the java "builtins" mechanism to allow us to turn other well known calls, not just Math.* calls, into inlined trees. If we see a java.lang.Object() call, check_for_builtin() would just return an empty statement tree. -- Summary: Call to java.lang.Object constructor is redundant Product: gcc Version: 3.5.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement 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=17187