From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by sourceware.org (Postfix) with ESMTPS id 2C7E33860C36 for ; Fri, 11 Sep 2020 11:09:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2C7E33860C36 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=botcazou@adacore.com Received: by mail-wr1-x430.google.com with SMTP id g4so11084865wrs.5 for ; Fri, 11 Sep 2020 04:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9QY85tIcTFrHuuOeQB3BIaB0uHipzt2hfcBKlsaPdk4=; b=Iq/GHQKE/gaTn/xhTVmjLC7v7AtIgUDpIlQ2Mug/NLPoC0AbgFet0oVph0zYRjGjDN YCAyvBiq8VQZzyLZWduEU3WjFtgLEs695rmkF6OP0q7OlAVvHMnuaViOpuWo9gaPhho5 q+VGrEj5o9HGnuAtgGK3AQlNSOAwQlmeBiCYxrr3HaxlIja8qVjumGJA7Z7QQn7Ky0LX zxNh5xsl/sQkRL4DJQAG2kBmFbnxmSZa8a6RvwTpo59xIByBc5OL/gwDrR2tpH1tnIqH tzlQdk6KOIx4eGdyP7z7b/K/dZYWv66G9Zt7+Vorm+PjTpj4pXPUL/OGrOhmpMGLrNYe EaEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9QY85tIcTFrHuuOeQB3BIaB0uHipzt2hfcBKlsaPdk4=; b=rBdM5y865JKRwaWQO+k/KFzfhX6qz4SaEjyn5YD82NoVLj652kFUXZVF2bZ+o6s0qs 0ouWUrnNLxLwcbWoAlJdd+ley59FnYsjXBwzeQfcH8KiMEjZSGNwPbAkRQLtl9r8ry6n /AdeEYFaLkXCQxWTpDHP9SaaGdytiDlQOgHyWUMBnxtMz4xOEKXuqE5qau5hZhisB8V1 yjlt69+XgVXyDUpc+T3S0viJeo77mmdv+7S2Gu7oYsbWZQAT2v1B4d8U/LlvuFbPohRZ KGF3B+V73IhQzpDG4dgZkpMPBztF4rfH9Y9L4x88XLHOXPNK16WnUlFS17PjhVF2lFKT OVWw== X-Gm-Message-State: AOAM530nYl3Mguz3NkFGwBX+e8Qwxw1xj3Qlt/fAiQrJhX5DQsgkgK+t JPvDJiFLQ93nKgDJ5xKhkddykA== X-Google-Smtp-Source: ABdhPJxRAr67mt/o7m5DkFRIJISNleBewfVXOrxKfrPCW8OY3xcRj2pkmxHj7VI1GBxzKld3zjs3Qg== X-Received: by 2002:a5d:4486:: with SMTP id j6mr1482015wrq.278.1599822590170; Fri, 11 Sep 2020 04:09:50 -0700 (PDT) Received: from fomalhaut.localnet ([2a01:e0a:41b:9230:7f82:53f4:769e:54b6]) by smtp.gmail.com with ESMTPSA id o4sm3833691wrv.86.2020.09.11.04.09.49 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Sep 2020 04:09:49 -0700 (PDT) From: Eric Botcazou X-Google-Original-From: Eric Botcazou To: Hans-Peter Nilsson Cc: gcc-patches@gcc.gnu.org Subject: Re: reorg.c (fill_slots_from_thread): Improve for TARGET_FLAGS_REGNUM targets Date: Fri, 11 Sep 2020 13:09:48 +0200 Message-ID: <2479570.Ksvo8Q1nxZ@fomalhaut> In-Reply-To: <202008140527.07E5RrHL029246@ignucius.se.axis.com> References: <202008140527.07E5RrHL029246@ignucius.se.axis.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 11:09:52 -0000 > @@ -2618,6 +2643,16 @@ fill_slots_from_thread (rtx_jump_insn *insn, rtx > condition, lose = 1; > mark_set_resources (trial, &set, 0, MARK_SRC_DEST_CALL); > mark_referenced_resources (trial, &needed, true); > + if (filter_flags) > + { > + mark_set_resources (trial, &fset, 0, MARK_SRC_DEST_CALL); > + > + /* Groups of flags-register setters with users should not > + affect opportunities to move flags-register-setting insns > + (clobbers) into the delay-slot. */ > + CLEAR_HARD_REG_BIT (needed.regs, targetm.flags_regnum); > + CLEAR_HARD_REG_BIT (fset.regs, targetm.flags_regnum); > + } Don't you need to put the new block before mark_referenced_resources (as I did in fill_simple_delay_slots) in case the needed insn reads the flags register? -- Eric Botcazou