From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9000 invoked by alias); 10 Jan 2012 17:22:24 -0000 Received: (qmail 8964 invoked by uid 22791); 10 Jan 2012 17:22:23 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GC X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 10 Jan 2012 17:22:12 +0000 From: "tromey at gcc dot gnu.org" To: java-prs@gcc.gnu.org Subject: [Bug java/21855] array bounds checking elimination Date: Tue, 10 Jan 2012 17:22:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: java X-Bugzilla-Keywords: alias, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: tromey at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dnovillo at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org X-SW-Source: 2012-q1/txt/msg00016.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21855 --- Comment #24 from Tom Tromey 2012-01-10 17:21:02 UTC --- I found my code and it turns out I never finished it. (I did write a java-specific devirtualization pass.) Here is an introductory comment that explains my plans: /* This pass implements a few simple gcj-specific optimizations related to handling of invariants. In Java, certain fields of some objects are known to be invariant after the object has been created. For instance, the vtable pointer of an object cannot change; neither can the length of an array. Also, this pass knows that 'new Type[n]' sets the length of an array to 'n'. Ideally GCC would recognize these cases and optimize for us. However, currently there is no way to express these properties to the optimizers. */