From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by sourceware.org (Postfix) with ESMTPS id A952B3851C06 for ; Fri, 6 Nov 2020 21:23:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A952B3851C06 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=mittosystems.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=jozef.l@mittosystems.com Received: by mail-wm1-x341.google.com with SMTP id v5so2792840wmh.1 for ; Fri, 06 Nov 2020 13:23:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mittosystems.com; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=MadZBoo90lfoVDfezJuqyN+3zxSef4pt465TqMtMdjg=; b=Fokq/je3Y0CRPwFb8hemjk089cM6OfbQK0g4VyhXJpXWEyt2qJLTVhNjiB9fSxa4FC wjkJTj49ut3FCyp8ci4TWF9r5Irh+7AJF5DCaJdW4kDHTizMbjAFwnxsiXlo9KahpmWo iWtWPsim38AQSjeQ/Kjhc3fZaHvZeHxvHN9lo3WRV1TMC1YOc1QyiipZm/anoZATXYUk fOBB4/cvf0RsN8l7q03JYuqMLULgI1mI39jPDPxftDjpGgodvnrXVHncGp3JG6t8nlSj nwYiixRVl5ZPrLFckC4mphtuHAothK6zHNcvPRfAhwJ0rZ79s6g390hm+Jl+2NcJ/ztw HF4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=MadZBoo90lfoVDfezJuqyN+3zxSef4pt465TqMtMdjg=; b=P+ph5ESPswUV3yC/8VxjbFzSI/pydrYNP9aB8f6X37l6v+dd15orjtJWiwx11XhPOV qXLGoC+IcBx+4gVzjaXzi7a9cUn5pC0HOBHTW8CFpEgLgNdpB3ZLaWw15v2EqquASWTi WkI7HDIXBokSNRi1SiWkvnXo3Gj+w+fHzGtqY/98ygahJkrwWqnpV7xtOXqj8eSGanp9 0jbp+d3kQX1tes8Uc62W+5HjMaBwMWQ1OvBm4EhqPGcc8ZyA28mw0g4YNabqABSeHxHQ RdAuu+6Ts+X7ZOhMxPaXMh18bYuRCBxMpYZGUBVrV2dhnLCJcCZxp6bIKvyK4wQNuriy wekg== X-Gm-Message-State: AOAM532Z2+hWXL+ZpqgpAN8SRnZtQYSemSLPtwSAo5KQ56U84VaUrFDy QsXTV8mNYnbfkH7b3W6eiMGf5w== X-Google-Smtp-Source: ABdhPJyWecdEHkQ70MDNjEjHOydMRK2Uo0k9SC1YbbN1RBzQcjmv//XN3YLIAYl3QDm0A7dugPslkw== X-Received: by 2002:a1c:56c4:: with SMTP id k187mr1561332wmb.92.1604697823762; Fri, 06 Nov 2020 13:23:43 -0800 (PST) Received: from jozef-acer-manjaro ([2a01:4b00:87fd:900:5e1d:5c99:56da:76e8]) by smtp.gmail.com with ESMTPSA id t7sm3636516wrx.42.2020.11.06.13.23.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Nov 2020 13:23:43 -0800 (PST) Date: Fri, 6 Nov 2020 21:23:41 +0000 From: Jozef Lawrynowicz To: Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: Re: ping x2 [PATCH 0/5] MSP430: Implement macros to describe relative costs of operations Message-ID: <20201106212341.orcdltocuc5mmhnv@jozef-acer-manjaro> Mail-Followup-To: Jeff Law , gcc-patches@gcc.gnu.org References: <20200723154356.63ws2xairlmdufji@jozef-acer-manjaro> <20200807110259.fgo5y6eb6a3pwvuk@jozef-acer-manjaro> <20200915203022.6lf3pkkaj5ojybmi@jozef-acer-manjaro> <9ae3290e-c76f-f756-fba6-74c59952da14@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <9ae3290e-c76f-f756-fba6-74c59952da14@redhat.com> X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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, 06 Nov 2020 21:24:04 -0000 On Fri, Nov 06, 2020 at 01:53:19PM -0700, Jeff Law via Gcc-patches wrote: > > On 9/15/20 2:30 PM, Jozef Lawrynowicz wrote: > > Ping x2 for below. > > > > On Fri, Aug 07, 2020 at 12:02:59PM +0100, Jozef Lawrynowicz wrote: > >> Pinging for this series of patches. > >> Attached all patches to this mail with the ammended patch 4 thanks to > >> Segher's review. > >> > >> Thanks, > >> Jozef > >> > >> On Thu, Jul 23, 2020 at 04:43:56PM +0100, Jozef Lawrynowicz wrote: > >>> The following series of patches for MSP430 implement some of the target > >>> macros used to determine the relative costs of operations. > >>> > >>> To give an indication of the overall effect of these changes on > >>> codesize, below are some size statistics collected from all the > >>> executable files from execute.exp that are built at -Os. > >>> There are around 1470 such tests (depending on the configuration). > >>> > >>> The percentage change (((new - old)/old) * 100) in text size is calculated > >>> for each test and the given metric is applied to that overall set of data. > >>> > >>> Configuration | Mean (%) | Median (%) | Delta < 0 (count) | Delta > 0 (count) > >>> ----------------------------------------------------------------------------- > >>> -mcpu=msp430 | -2.4 | -2.7 | 1454 | 17 > >>> -mcpu=msp430x | -2.3 | -2.4 | 1460 | 10 > >>> -mlarge | -1.7 | -1.9 | 1412 | 37 > >>> > >>> Successfully regtested on trunk for msp430-elf, ok to apply? > >>> > >>> Jozef Lawrynowicz (5): > >>> MSP430: Implement TARGET_MEMORY_MOVE_COST > >>> MSP430: Implement TARGET_RTX_COSTS > >>> MSP430: Add defaulting to the insn length attribute > >>> MSP430: Implement TARGET_INSN_COST > >>> MSP430: Skip index-1.c test > >>> > >>> gcc/config/msp430/msp430-protos.h | 5 +- > >>> gcc/config/msp430/msp430.c | 867 ++++++++++++++++-- > >>> gcc/config/msp430/msp430.h | 13 + > >>> gcc/config/msp430/msp430.md | 439 +++++++-- > >>> gcc/config/msp430/msp430.opt | 4 + > >>> gcc/config/msp430/predicates.md | 13 + > >>> gcc/testsuite/gcc.c-torture/execute/index-1.c | 2 + > >>> 7 files changed, 1206 insertions(+), 137 deletions(-) > > [ ... ] > > So it's a series of 5 patches.  They LGTM.    And if  there's minor > updates needed to address issues found once they're on the trunk, the > consider those updates pre-approved. Spooky, I pinged these patches the minute before you replied to this one. > > Note that defining LOGICAL_OP_NON_SHORT_CIRCUIT and BRANCH_COST impact > gimple code generation.  I'm a bit surprised there wasn't more fallout > in the existing tests. IIRC, when I tried messing with LOGICAL_OP_NON_SHORT_CIRCUIT and BRANCH_COST before the full costs were implemented, they never had any effect. I'm going to hand wave here and say that whatever behavior these macros were affecting before the costs were implemented, was actually behaving as it should. Then with the full costs implemented, I had to tweak them to get back to that optimal state. Also, the only conditional instructions available for MSP430 are cbranch, i.e. there is never a choice between a cbranch and a cstore. I was surprised BRANCH_COST had any effect, but after looking at output assembly, it appeared that it did affect the number of cbranch insns emitted, vs just other insns to move data about. The changes did fix these optimization tests: gcc.dg/tree-ssa/reassoc-33.c scan-tree-dump-times reassoc1 "Optimizing range tests" 3 gcc.dg/tree-ssa/reassoc-34.c scan-tree-dump-times reassoc1 "Optimizing range tests" 1 gcc.dg/tree-ssa/reassoc-35.c scan-tree-dump-times reassoc1 "Optimizing range tests" 1 gcc.dg/tree-ssa/reassoc-36.c scan-tree-dump-times reassoc1 "Optimizing range tests" 1 Thanks for the review, I'll watch for fallout after installing on trunk. Jozef > > jeff > >