From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 032823858D32 for ; Mon, 14 Nov 2022 16:11:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 032823858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668442292; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lbU5fg3oNUSSDETYn52QA50L/d3H6VoceAW4sSjEF3Y=; b=QihXhkZP6+wOvlWm4ZbE38Y9Ar4jd4GSaqxTdWAjOz4Hcf8yzRh4B6fEBRj7mA1F0TrA5E qdTbSpCoJoNxvfjjyNZhVzSqthfWeQlC8/aFz8cM1ReONYD3JSPg8buY93yLmiKQ26iwJj mWAupGuxiFofV12I1OrZAVGxRV/SVPY= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-287-r-fhPjdCNdyxJYMj9jfmJQ-1; Mon, 14 Nov 2022 11:11:29 -0500 X-MC-Unique: r-fhPjdCNdyxJYMj9jfmJQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id ADF013C0ED53; Mon, 14 Nov 2022 16:11:21 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.38]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63C9B4E63D; Mon, 14 Nov 2022 16:11:21 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 2AEGBF6F2854992 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 14 Nov 2022 17:11:16 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 2AEGBEUE2854991; Mon, 14 Nov 2022 17:11:14 +0100 Date: Mon, 14 Nov 2022 17:11:14 +0100 From: Jakub Jelinek To: Jeff Law Cc: Philipp Tomsich , gcc-patches@gcc.gnu.org, Palmer Dabbelt , Vineet Gupta , Jeff Law , Kito Cheng , Christoph Muellner Subject: Re: [PATCH v2 2/2] RISC-V: Add instruction fusion (for ventana-vt1) Message-ID: Reply-To: Jakub Jelinek References: <20221113204824.4062042-1-philipp.tomsich@vrull.eu> <20221113204824.4062042-3-philipp.tomsich@vrull.eu> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=WINDOWS-1252 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Nov 14, 2022 at 09:06:10AM -0700, Jeff Law via Gcc-patches wrote: > > On 11/13/22 13:48, Philipp Tomsich wrote: > > The Ventana VT1 core supports quad-issue and instruction fusion. > > This implemented TARGET_SCHED_MACRO_FUSION_P to keep fusible sequences > > together and adds idiom matcheing for the supported fusion cases. > > > > gcc/ChangeLog: > > > > * config/riscv/riscv.cc (enum riscv_fusion_pairs): Add symbolic > > constants to identify supported fusion patterns. > > (struct riscv_tune_param): Add fusible_op field. > > (riscv_macro_fusion_p): Implement. > > (riscv_fusion_enabled_p): Implement. > > (riscv_macro_fusion_pair_p): Implement and recoginze fusible s/recoginze/recognize/ > > idioms for Ventana VT1. > > (TARGET_SCHED_MACRO_FUSION_P): Point to riscv_macro_fusion_p. > > (TARGET_SCHED_MACRO_FUSION_PAIR_P): Point to riscv_macro_fusion_pair_p. > > You know the fusion rules for VT1 better than I...  I'm happy to largely > defer to you on this. > > I do wonder if going forward hand matching RTL like this is going to be an > unmaintainable mess and whether or not we would be better served using insn > attributes to describe instruction fusion. Jakub