From patchwork Sat Jul 10 14:10:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 58484 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 3E19DB6EFE for ; Sun, 11 Jul 2010 00:10:58 +1000 (EST) Received: (qmail 28957 invoked by alias); 10 Jul 2010 14:10:56 -0000 Received: (qmail 28947 invoked by uid 22791); 10 Jul 2010 14:10:55 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM X-Spam-Check-By: sourceware.org Received: from mail-wy0-f175.google.com (HELO mail-wy0-f175.google.com) (74.125.82.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Jul 2010 14:10:51 +0000 Received: by wye20 with SMTP id 20so2732353wye.20 for ; Sat, 10 Jul 2010 07:10:48 -0700 (PDT) Received: by 10.227.135.66 with SMTP id m2mr10050037wbt.187.1278771048655; Sat, 10 Jul 2010 07:10:48 -0700 (PDT) Received: from localhost (rsandifo.gotadsl.co.uk [82.133.89.107]) by mx.google.com with ESMTPS id a1sm15169234wbb.20.2010.07.10.07.10.46 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 10 Jul 2010 07:10:47 -0700 (PDT) From: Richard Sandiford To: Richard Henderson Mail-Followup-To: Richard Henderson , gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Cc: gcc-patches@gcc.gnu.org Subject: Re: [27/27] Use *_target_globals for MIPS References: <87d3v2oqyt.fsf@firetop.home> <87tyobq7z0.fsf@firetop.home> <4C3502B7.4020407@redhat.com> Date: Sat, 10 Jul 2010 15:10:45 +0100 In-Reply-To: <4C3502B7.4020407@redhat.com> (Richard Henderson's message of "Wed, 07 Jul 2010 15:41:59 -0700") Message-ID: <87fwzrjul6.fsf@firetop.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Richard Henderson writes: > Overall I think this series is good. I pointed out two > problems with the conversion. With those fixed, I think > the series could go in. Thanks. I've fixed the problems you found and also updated the patches for changes that have happened since last weekend. Rather than post them all again, I thought it'd be better to post the delta. I've left out the Makefile.in changes because there was a lot of churn in the dependency list. I was originally going to wait until Vlad's IRA changes had gone in, but he kindly offered to let me go first. Thanks Vlad, and sorry for the clash. Retested on x86_64-linux-gnu and mipsisa64-elfoabi. OK to install? Richard --- gcc.old/expmed.c 2010-07-10 14:47:00.000000000 +0100 +++ gcc/expmed.c 2010-07-10 14:48:32.000000000 +0100 @@ -42,7 +42,7 @@ along with GCC; see the file COPYING3. struct target_expmed default_target_expmed; #if SWITCHABLE_TARGET -struct target_expmed *this_target_expmed; +struct target_expmed *this_target_expmed = &default_target_expmed; #endif static void store_fixed_bit_field (rtx, unsigned HOST_WIDE_INT, --- gcc.old/gcse.h 2010-07-10 14:46:13.000000000 +0100 +++ gcc/gcse.h 2010-07-10 14:48:32.000000000 +0100 @@ -27,7 +27,7 @@ struct target_gcse { /* Nonzero for each mode that supports (set (reg) (reg)). This is trivially true for integer and floating point values. It may or may not be true for condition codes. */ - int x_can_copy[(int) NUM_MACHINE_MODES]; + char x_can_copy[(int) NUM_MACHINE_MODES]; /* True if the previous field has been initialized. */ bool x_can_copy_init_p; --- gcc.old/hard-reg-set.h 2010-07-10 14:47:47.000000000 +0100 +++ gcc/hard-reg-set.h 2010-07-10 14:48:31.000000000 +0100 @@ -575,10 +575,6 @@ hard_reg_set_iter_next (hard_reg_set_ite /* Define some standard sets of registers. */ -/* For each reg class, a boolean saying whether the class contains only - fixed registers. */ -extern bool class_only_fixed_regs[N_REG_CLASSES]; - /* Indexed by hard register number, contains 1 for registers that are being used for global register decls. These must be exempt from ordinary flow analysis @@ -634,6 +630,10 @@ struct target_hard_regs { /* For each reg class, a HARD_REG_SET saying which registers are in it. */ HARD_REG_SET x_reg_class_contents[N_REG_CLASSES]; + /* For each reg class, a boolean saying whether the class contains only + fixed registers. */ + bool x_class_only_fixed_regs[N_REG_CLASSES]; + /* For each reg class, number of regs it contains. */ unsigned int x_reg_class_size[N_REG_CLASSES]; @@ -681,6 +681,8 @@ extern struct target_hard_regs *this_tar (this_target_hard_regs->x_inv_reg_alloc_order) #define reg_class_contents \ (this_target_hard_regs->x_reg_class_contents) +#define class_only_fixed_regs \ + (this_target_hard_regs->x_class_only_fixed_regs) #define reg_class_size \ (this_target_hard_regs->x_reg_class_size) #define reg_class_subclasses \ --- gcc.old/ira.c 2010-07-10 14:47:00.000000000 +0100 +++ gcc/ira.c 2010-07-10 14:48:32.000000000 +0100 @@ -328,8 +328,8 @@ along with GCC; see the file COPYING3. struct target_ira default_target_ira; struct target_ira_int default_target_ira_int; #if SWITCHABLE_TARGET -struct target_ira *this_target_ira; -struct target_ira_int *this_target_ira_int; +struct target_ira *this_target_ira = &default_target_ira; +struct target_ira_int *this_target_ira_int = &default_target_ira_int; #endif /* A modified value of flag `-fira-verbose' used internally. */ --- gcc.old/optabs.c 2010-07-10 14:47:00.000000000 +0100 +++ gcc/optabs.c 2010-07-10 14:48:31.000000000 +0100 @@ -48,8 +48,8 @@ along with GCC; see the file COPYING3. struct target_optabs default_target_optabs; struct target_libfuncs default_target_libfuncs; #if SWITCHABLE_TARGET -struct target_optabs *this_target_optabs; -struct target_libfuncs *this_target_libfuncs; +struct target_optabs *this_target_optabs = &default_target_optabs; +struct target_libfuncs *this_target_libfuncs = &default_target_libfuncs; #endif #define libfunc_hash \ --- gcc.old/reginfo.c 2010-07-10 14:47:00.000000000 +0100 +++ gcc/reginfo.c 2010-07-10 14:48:32.000000000 +0100 @@ -101,10 +101,6 @@ static bitmap_obstack persistent_obstack static int initial_reg_alloc_order[FIRST_PSEUDO_REGISTER] = REG_ALLOC_ORDER; #endif -/* For each reg class, a boolean saying whether the class contains only - fixed registers. */ -bool class_only_fixed_regs[N_REG_CLASSES]; - /* The same information, but as an array of unsigned ints. We copy from these unsigned ints to the table above. We do this so the tm.h files do not have to be aware of the wordsize for machines with <= 64 regs.