From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 96FD93858D20 for ; Fri, 4 Feb 2022 01:34:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 96FD93858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 2141VvoV028922; Thu, 3 Feb 2022 19:31:57 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 2141VvZg028921; Thu, 3 Feb 2022 19:31:57 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 3 Feb 2022 19:31:56 -0600 From: Segher Boessenkool To: Reshabh K Sharma Cc: Jeff Law , gcc-help@gcc.gnu.org Subject: Re: Describe instructions with same reg in def and use or mutiple defs and attach write latency Message-ID: <20220204013156.GD614@gate.crashing.org> References: <3b7e6310-1376-91a0-fe50-a6b7e5dd125b@gmail.com> <20220128182105.GF614@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2022 01:34:04 -0000 Hi! On Thu, Feb 03, 2022 at 05:06:23PM -0800, Reshabh K Sharma wrote: > On Fri, Jan 28, 2022 at 10:23 AM Segher Boessenkool < > segher@kernel.crashing.org> wrote: > > You can use TARGET_SCHED_ADJUST_COST? > > Thank you so much! I think target_sched_adjust_cost will do. > Given two rtx_insn, > x = exp_load addr offset and > y = add addr z, > these two instructions are the input arguments to target_sched_adjust_cost, > > how do I check that given rtx_insn is exp_load? (how do we check if > rtx_insn is of type exp_load, add or any other target specific instruction?) > and how do I check if there is a read after read dependency for addr > operand and not the offset. "type" is just an insn attribute, so you would use if (get_attr_type (insn) == TYPE_EXP_LOAD) or similar. Segher