From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x429.google.com (mail-pf1-x429.google.com [IPv6:2607:f8b0:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 492D03858429 for ; Tue, 14 May 2024 12:07:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 492D03858429 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=vrull.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=vrull.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 492D03858429 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::429 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715688426; cv=none; b=CcwYvfmvTzEYSOSCLtDi9hF22NduoQnaxrPVbrJbIKr/MfeNGgw4O6a91FrBMdiOQp2Bltp7VmEbOkXK2+P3VG25pkUG5a02Gt0PO2uqbCkDEUOwQJBaRmAm1eQJmErHyAj564m8yBxPqKrGE3UnsXcW87gyHSykVORovYrdAYc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715688426; c=relaxed/simple; bh=1DK/E2lVoFN9XgXFbozJRxoB+PusV/obI2yar5bBHX0=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=RmXmTnWLNDPH1l1OrbvmR3ODvSZyDEtS0FT4qkAgN1QV3VZgnVtf3ZtwDpmbZ1Ds+X5lA+UzMnRT5Msm3+qJameA3U3Dz5Etu41nu2qThJgiTdx6xW0FOGdCtu3YlFVUOk4fsqcPyb3Oz7vQQWuE8CE3rJHjwoipQdHKrJNyQoc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x429.google.com with SMTP id d2e1a72fcca58-6f44e3fd382so4499802b3a.1 for ; Tue, 14 May 2024 05:07:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vrull.eu; s=google; t=1715688423; x=1716293223; darn=gcc.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=nc2qDxBgBWS7yG6cnSdOJtrpUQInkIPghLwxuXJGvEY=; b=n/7aboSN+RCb9NvoWlLiflvRxSlJnCv6i7179vmbsfQQoEV2wwQQgTWdcDjDSP4Dof G4L7/SYSJpkbDnyllv97FtfsHSN1LrsjcVtYYu5qEK+PUJKxYorhf9Wv77QQ7gRoVEmC NpE2an0Q32UL9G14HrLxujFwoqUTainXDbjOYE6Lp9OhpCRxay5ASM7e1X+vPhAo6cCs QVhIM2Y4gGuu7dK51tHUubzaAz2za1Z6wmXtG0nz26cOeaVp8nyMrlk4Qs7BFXwieGui NrKSCzSu7032FtUKFexQ1RHLVeug+1JauNsBv6ppCW3EYza/VB3WNWzsFfSfEoYfB/WW CkBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715688423; x=1716293223; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nc2qDxBgBWS7yG6cnSdOJtrpUQInkIPghLwxuXJGvEY=; b=n2z/ly7AFPiUeCv4Ikeat+tSOA8o7AFmTZ3ghkxMNAP7NxcjBk6yWB05jSp0/fXpK2 2Hx/l9GvVKRlGtGVbRukDc4HHdx8qugyr2aVdgoGeiiyZQNlRxEQ32y21m3dTfl1dTvB curyYc86Q5KY+3y6eAgzYpdS5F2mVFqPdzKiMw3wkI3D8/g0cANgx+lBtnsHavqZ3cY9 ROjEBS1VBKZVDL3qzEg01q3A8za8wTpjOFk3t8eyOEwZf+ftCiRRdyMv8k7RuIAKs6Hw sGnGvQmcMejvlDqJHt7Z3MC/dug0gGr4zkMsf6TBTOUAG0nTBfpxQCtN0dvzm1WSn4uc z+zw== X-Gm-Message-State: AOJu0YxLzHlQKPm24vJv5eAUZb1+YuReLI1SRATiC6ZUoKaD1dp0Huag /9Nhjs+VC1oeX0NI5zfogOJ7FzX5W6v6c31c3qJ0UsOgN/7A0khrwIYVONV/5VBQrCdD39n3Fxl VtCPx4ga0Hx49xFfmrlUcHQPz9cs1tmSTgu0IomrCS85mlnRT X-Google-Smtp-Source: AGHT+IHMkrvLO6R/gM8J1+I7BKltgSfbmMGIxWCNfaVdmxPNDb38HMtYUodf/gb7KzcxnqM4Aa4jHggmrXqApYCUQ6Q= X-Received: by 2002:a05:6a20:43a3:b0:1af:ab09:c555 with SMTP id adf61e73a8af0-1afde201c7emr14395366637.47.1715688422956; Tue, 14 May 2024 05:07:02 -0700 (PDT) MIME-Version: 1.0 References: <20240423104740.4027243-1-manolis.tsamis@vrull.eu> In-Reply-To: <20240423104740.4027243-1-manolis.tsamis@vrull.eu> From: Manolis Tsamis Date: Tue, 14 May 2024 15:06:27 +0300 Message-ID: Subject: Re: [PATCH v4 0/3] ifcvt: Allow if conversion of arithmetic in basic blocks with multiple sets To: gcc-patches@gcc.gnu.org Cc: Robin Dapp , Jiangning Liu , Philipp Tomsich , Richard Sandiford , Jakub Jelinek Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: Pinging this for GCC15. Thanks On Tue, Apr 23, 2024 at 1:47=E2=80=AFPM Manolis Tsamis wrote: > > > noce_convert_multiple_sets has been introduced and extended over time to = handle > if conversion for blocks with multiple sets. Currently this is focused on > register moves and rejects any sort of arithmetic operations. > > This series is an extension to allow more sequences to take part in if > conversion. The first patch is a required change to emit correct code and= the > second patch whitelists a larger number of operations through > bb_ok_for_noce_convert_multiple_sets. The third patch adds support to rew= ire > multiple registers in noce_convert_multiple_sets_1 and refactors the code= with > a new helper info struct. The fourth patch removes some old code that sho= uld > not be needed anymore. > > For targets that have a rich selection of conditional instructions, > like aarch64, I have seen an ~5x increase of profitable if conversions fo= r > multiple set blocks in SPEC benchmarks. Also tested with a wide variety o= f > benchmarks and I have not seen performance regressions on either x64 / aa= rch64. > > Some samples that previously resulted in a branch but now better use thes= e > instructions can be seen in the provided test cases. > > Bootstrapped and tested on AArch64 and x86-64. > > > Changes in v4: > - Remove unnecessary hardcoded list of allowed ops in > bb_ok_for_noce_convert_multiple_sets. > - Set need_cmov based on BB live_out instead of REG_DEAD notes. > - Fix preexisting issues and improve the code that sets read_comp= arison. > > Manolis Tsamis (3): > [RFC] ifcvt: handle sequences that clobber flags in > noce_convert_multiple_sets > [RFC] ifcvt: Allow more operations in multiple set if conversion > [RFC] ifcvt: Handle multiple rewired regs and refactor > noce_convert_multiple_sets > > gcc/ifcvt.cc | 383 ++++++++---------- > gcc/ifcvt.h | 16 + > .../aarch64/ifcvt_multiple_sets_arithm.c | 79 ++++ > .../aarch64/ifcvt_multiple_sets_rewire.c | 20 + > 4 files changed, 292 insertions(+), 206 deletions(-) > create mode 100644 gcc/testsuite/gcc.target/aarch64/ifcvt_multiple_sets_= arithm.c > create mode 100644 gcc/testsuite/gcc.target/aarch64/ifcvt_multiple_sets_= rewire.c > > -- > 2.34.1 >