From patchwork Tue Mar 26 05:10:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 1065157 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-498418-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="dPN/X9cK"; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="jBgAsqYo"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44SzjL0g7Bz9sSR for ; Tue, 26 Mar 2019 16:10:23 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=v4bK4cJDPMfvohXSaSo1RBYjDNIv4mYvXXDFRAUmWc2NAHqTLW B3ODxc9r8um1IVnIYd8Gf8KQnvA/VTYiH58CI6KHPjxcL2gmC6RTGU/QBj4k95KU GKLI66m9FDk5NAQNnBeYsmZzdoVMwCD+eZwj5jZxLEGvjvZ7d/WE4sAf8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=gze4/dwp+h/Gh0WvUsLB4wVTeR4=; b=dPN/X9cKlcXvo2BjnBpa /sf2qs5mJ3zyKxEjmoqTBQ2VV3dub7HJcnGMGtP6d2WnJ2HSqD2cuGbvKBJFuu7V LaNfrmelU0r7Bb78aZmWhn5cJFs/7/k60GRBQEqr+0h/mIZB0QhFbB0CL8c8vBE6 G2Wc/hg99ndWJ6RmqIBmv0o= Received: (qmail 26324 invoked by alias); 26 Mar 2019 05:10:14 -0000 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 Received: (qmail 26309 invoked by uid 89); 26 Mar 2019 05:10:14 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:1683, HX-Spam-Relays-External:sk:mail-pg, HX-HELO:sk:mail-pg X-HELO: mail-pg1-f178.google.com Received: from mail-pg1-f178.google.com (HELO mail-pg1-f178.google.com) (209.85.215.178) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 26 Mar 2019 05:10:12 +0000 Received: by mail-pg1-f178.google.com with SMTP id z9so1393575pgu.10 for ; Mon, 25 Mar 2019 22:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=cZz45vb95Wy7Uu7qjhYY8LcUCUjIHHnGb8nbERIdQ/g=; b=jBgAsqYo9rt04lqo17mjkh+FJnV6wOxMKZTkBkgQAJb3fq1kUVOXfheOU9QoQieZp7 hfJ2z52eZXqjnE+UcgHUTwobiv8f8V9HkQG+LrDUtDKeku25V6wK/JQKbNk54kdM9C7z QTrHWtPsWhsrbJPGedlvpAZUGM//rcd41alryJslh1wMasHUBHFIR+/ZuLwj0Jf7h9+i 9Uv0hH4wrdVUDBxio1bz/d5JibxdaIXKpChvP5dvmznqmqhkepNhcU1d95XFscVtbV3Q BHofd79NWQ6qn0jFdbpjRmA2D5CLPWN2MLaXCqWpx2sj7cCgLzOQy3eqUv0U15wOBzix IPeg== Received: from bubble.grove.modra.org ([58.175.241.133]) by smtp.gmail.com with ESMTPSA id e22sm23615988pfi.126.2019.03.25.22.10.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Mar 2019 22:10:09 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id A8F15804D6; Tue, 26 Mar 2019 15:40:05 +1030 (ACDT) Date: Tue, 26 Mar 2019 15:40:05 +1030 From: Alan Modra To: gcc-patches@gcc.gnu.org Cc: Segher Boessenkool Subject: [RS6000] Don't rely on rs6000_hard_regno_mode_ok being zero Message-ID: <20190326051005.GA13871@bubble.grove.modra.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.4 (2018-02-28) X-IsSubscribed: yes rs6000_hard_regno_mode_ok_uncached result depends on target flags, and nowadays it is possible that TARGET_OPTION_OVERRIDE be called not just at the start of compilation but per-function by the action of function attributes or "#pragma GCC target". At the start of compilation rs6000_hard_regno_mode_ok_p[][] is a clean slate, but not so later on. Bootstrapped etc. powerpc64le-linux. If gcc wasn't in stage 4 I'd apply this as obvious, but I doubt it is a regression, and the patch is just a tiny bit more than a doc fix. So, OK now or wait for stage 1? * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Always assign rs6000_hard_regno_mode_ok_p[m][r]. Formatting. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 06ce2892bf9..f132c3a27c8 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -3463,13 +3463,13 @@ rs6000_init_hard_regno_mode_ok (bool global_init_p) for (r = 0; HARD_REGISTER_NUM_P (r); ++r) for (m = 0; m < NUM_MACHINE_MODES; ++m) rs6000_hard_regno_nregs[m][r] - = rs6000_hard_regno_nregs_internal (r, (machine_mode)m); + = rs6000_hard_regno_nregs_internal (r, (machine_mode) m); /* Precalculate TARGET_HARD_REGNO_MODE_OK. */ for (r = 0; HARD_REGISTER_NUM_P (r); ++r) for (m = 0; m < NUM_MACHINE_MODES; ++m) - if (rs6000_hard_regno_mode_ok_uncached (r, (machine_mode)m)) - rs6000_hard_regno_mode_ok_p[m][r] = true; + rs6000_hard_regno_mode_ok_p[m][r] + = rs6000_hard_regno_mode_ok_uncached (r, (machine_mode) m); /* Precalculate CLASS_MAX_NREGS sizes. */ for (c = 0; c < LIM_REG_CLASSES; ++c)