From patchwork Mon Sep 9 16:02:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 1159850 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-508677-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="RiVNEhi7"; 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 46RtHK6jf1z9s00 for ; Tue, 10 Sep 2019 02:03:09 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=default; b=maPh043087j0Rzof5p59FVH7Jix76 viRHr6dEmkcz8VaKd3kFskU83aQ7bhxrerT6xozIrv8OLo8gCZTkDVlVwWIjoCoA +z47A0t9UYZKdZqP4ZUGyUgGfQ03LpChsvElN/WK7NS4F7rXiq9kZxWsiWEkTY/D m6F65gxKSkV9yA= 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:from :to:subject:references:date:in-reply-to:message-id:mime-version :content-type; s=default; bh=7ZHLT2g5GiD8h6CIv+FQpUgdQi0=; b=RiV NEhi7flY5Xn41bO+wqwe7Q1xh6/TH49bVyMLvK4UT1AaP+8hvodgTOhbA6Du9qtA zhyhrtoLxbLS4xwq8FJ78B5jVYaGoGoKz83G6hsBrLqMxskNbc5pmItztfVG2/b4 V3giTZRNd1pPLsQLKOCn+tjAibN4bI1GuMS8XNDo= Received: (qmail 61388 invoked by alias); 9 Sep 2019 16:03:02 -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 61274 invoked by uid 89); 9 Sep 2019 16:03:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 09 Sep 2019 16:03:00 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6AF6A169E for ; Mon, 9 Sep 2019 09:02:59 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.99.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 112313F59C for ; Mon, 9 Sep 2019 09:02:58 -0700 (PDT) From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: [9/9] Tweak interface to ira-build.c:ior_hard_reg_conflicts References: Date: Mon, 09 Sep 2019 17:02:57 +0100 In-Reply-To: (Richard Sandiford's message of "Mon, 09 Sep 2019 16:52:04 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 X-IsSubscribed: yes This patch makes ior_hard_reg_conflicts take a const_hard_reg_set rather than a pointer, so that it can be passed a temporary object in later patches. 2019-09-09 Richard Sandiford gcc/ * ira-int.h (ior_hard_reg_conflicts): Take a const_hard_reg_set instead of a HARD_REG_SET *. * ira-build.c (ior_hard_reg_conflicts): Likewise. (ira_build): Update call accordingly. * ira-emit.c (add_range_and_copies_from_move_list): Likewise. Index: gcc/ira-int.h =================================================================== --- gcc/ira-int.h 2019-09-09 17:02:41.677375853 +0100 +++ gcc/ira-int.h 2019-09-09 17:02:41.669375909 +0100 @@ -998,7 +998,7 @@ extern void ira_set_allocno_class (ira_a extern bool ira_conflict_vector_profitable_p (ira_object_t, int); extern void ira_allocate_conflict_vec (ira_object_t, int); extern void ira_allocate_object_conflicts (ira_object_t, int); -extern void ior_hard_reg_conflicts (ira_allocno_t, HARD_REG_SET *); +extern void ior_hard_reg_conflicts (ira_allocno_t, const_hard_reg_set); extern void ira_print_expanded_allocno (ira_allocno_t); extern void ira_add_live_range_to_object (ira_object_t, int, int); extern live_range_t ira_create_live_range (ira_object_t, int, int, Index: gcc/ira-build.c =================================================================== --- gcc/ira-build.c 2019-09-09 17:02:41.677375853 +0100 +++ gcc/ira-build.c 2019-09-09 17:02:41.669375909 +0100 @@ -614,15 +614,15 @@ merge_hard_reg_conflicts (ira_allocno_t /* Update hard register conflict information for all objects associated with A to include the regs in SET. */ void -ior_hard_reg_conflicts (ira_allocno_t a, HARD_REG_SET *set) +ior_hard_reg_conflicts (ira_allocno_t a, const_hard_reg_set set) { ira_allocno_object_iterator i; ira_object_t obj; FOR_EACH_ALLOCNO_OBJECT (a, obj, i) { - OBJECT_CONFLICT_HARD_REGS (obj) |= *set; - OBJECT_TOTAL_CONFLICT_HARD_REGS (obj) |= *set; + OBJECT_CONFLICT_HARD_REGS (obj) |= set; + OBJECT_TOTAL_CONFLICT_HARD_REGS (obj) |= set; } } @@ -3462,7 +3462,7 @@ ira_build (void) allocno crossing calls. */ FOR_EACH_ALLOCNO (a, ai) if (ALLOCNO_CALLS_CROSSED_NUM (a) != 0) - ior_hard_reg_conflicts (a, &call_used_reg_set); + ior_hard_reg_conflicts (a, call_used_reg_set); } if (internal_flag_ira_verbose > 2 && ira_dump_file != NULL) print_copies (ira_dump_file); Index: gcc/ira-emit.c =================================================================== --- gcc/ira-emit.c 2019-09-09 17:02:41.677375853 +0100 +++ gcc/ira-emit.c 2019-09-09 17:02:41.669375909 +0100 @@ -1122,8 +1122,8 @@ add_range_and_copies_from_move_list (mov ira_allocate_object_conflicts (to_obj, n); } } - ior_hard_reg_conflicts (from, &hard_regs_live); - ior_hard_reg_conflicts (to, &hard_regs_live); + ior_hard_reg_conflicts (from, hard_regs_live); + ior_hard_reg_conflicts (to, hard_regs_live); update_costs (from, true, freq); update_costs (to, false, freq);