From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3173 invoked by alias); 8 Nov 2007 03:49:28 -0000 Received: (qmail 3163 invoked by uid 22791); 8 Nov 2007 03:49:27 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 08 Nov 2007 03:49:25 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lA83nMjQ012814; Wed, 7 Nov 2007 22:49:23 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lA83nMvP006244; Wed, 7 Nov 2007 22:49:22 -0500 Received: from free.oliva.athome.lsd.ic.unicamp.br (vpn-14-51.rdu.redhat.com [10.11.14.51]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lA83nLlm021516; Wed, 7 Nov 2007 22:49:22 -0500 Received: from free.oliva.athome.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.oliva.athome.lsd.ic.unicamp.br (8.14.1/8.14.1) with ESMTP id lA83nKNW017504; Thu, 8 Nov 2007 01:49:20 -0200 Received: (from aoliva@localhost) by free.oliva.athome.lsd.ic.unicamp.br (8.14.1/8.14.1/Submit) id lA83nJvO017503; Thu, 8 Nov 2007 01:49:19 -0200 To: gcc-patches@gcc.gnu.org Subject: stabilize java assertion tables From: Alexandre Oliva Errors-To: aoliva@oliva.athome.lsd.ic.unicamp.br Date: Thu, 08 Nov 2007 03:49:00 -0000 Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg00383.txt.bz2 --=-=-= Content-length: 302 Using TYPE_UID rather than pointers to hash type_assertions shaved off another 70 -fvar-tracking-assignments (and, probably -g vs -g0) codegen differences. Now I'm down to four differences on x86_64-linux-gnu libs, yay. Ok for trunk, after retesting in it (rather than in the vta branch) completes? --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=gcc-stabilize-java-assertion-tables.patch Content-length: 1216 for gcc/ChangeLog.vta => gcc/java/ChangeLog from Alexandre Oliva * java/expr.c (type_assertion_hash): Hash type uids rather than tree pointers. Index: gcc/java/expr.c =================================================================== --- gcc/java/expr.c.orig 2007-09-08 20:11:06.000000000 -0300 +++ gcc/java/expr.c 2007-11-08 00:40:04.000000000 -0200 @@ -433,8 +433,26 @@ type_assertion_hash (const void *p) const type_assertion *k_p = p; hashval_t hash = iterative_hash (&k_p->assertion_code, sizeof k_p->assertion_code, 0); - hash = iterative_hash (&k_p->op1, sizeof k_p->op1, hash); - return iterative_hash (&k_p->op2, sizeof k_p->op2, hash); + + switch (k_p->assertion_code) { + case JV_ASSERT_TYPES_COMPATIBLE: + hash = iterative_hash (&TYPE_UID (k_p->op2), sizeof TYPE_UID (k_p->op2), + hash); + /* Fall through. */ + + case JV_ASSERT_IS_INSTANTIABLE: + hash = iterative_hash (&TYPE_UID (k_p->op1), sizeof TYPE_UID (k_p->op1), + hash); + /* Fall through. */ + + case JV_ASSERT_END_OF_TABLE: + break; + + default: + gcc_unreachable (); + } + + return hash; } /* Add an entry to the type assertion table for the given class. --=-=-= Content-length: 249 -- Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/ FSF Latin America Board Member http://www.fsfla.org/ Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org} Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org} --=-=-=--