From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by sourceware.org (Postfix) with ESMTPS id 58C7A3858C62 for ; Thu, 8 Jun 2023 09:51:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 58C7A3858C62 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-50c079eb705so100222a12.1 for ; Thu, 08 Jun 2023 02:51:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1686217891; x=1688809891; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=seVPmAirXqtFUSJhKCaxQNfLmxm5SPKOEmzHoqXTuL4=; b=PiE/a1f43dMfQFjD4FxtjxeKKWT3XqPCmz2WFTxnebX4IMAC9QA3eZHAI8D4yHFPMA 766oiMH8iDv0hfSLrRp39amEQixNxUhDBPfegqUYIBzXmEnNZ0iBD7qxcutwSoQLyCgK adtUIC6LYDnlyKzbxZ3j82jNJ6msWI+6T0rS4k+MJJMSbiowI6l0dFsZllgWFxcY5kuj VROSLV/yib6nAwkwIeezhT4HnmFOg8mUeW+FJUz+bQjyftXHuCSMREmKg0WOMJeJXUKX 7RcraKgD8uYOcAkZhS4eKc7nmpP1nozF0LEdSyI6o8ZtSqiBLzM8MCNgV//FiE+liirj DyOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686217891; x=1688809891; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=seVPmAirXqtFUSJhKCaxQNfLmxm5SPKOEmzHoqXTuL4=; b=eRu8qhcUyG2oDHrIW2SKOe5kMZs9JS5s3Ary24IaTNtDLEnFNSLj77ZKKeGDc6Bwhr IfONs/eX+xHsR/uw2jDsJfk8cONDwndYAICrd/khrlJfqY/zWJGHVWGCSdBUxFh5tQie JwprVL8vVQRO84Vkfpai+TOJFSb1/RyKDoa9Z4cA7ZqnGtPXHd6pagQnYAk65Mu6JH38 vVIh9kVEmSrTwKNHINaG42fsE4jHl/1bmjRpRFpWf3qmTpgqIkDJAJDBAaCiuo3hDu/w TI/G5SBp6VJFc4/kCikxwUUsaIcMlVPkCuZaH+DAI3sgfktp96N58MUYNzY3gW7F7Wlh EYww== X-Gm-Message-State: AC+VfDzFQQTapnZC0xnhbIVCKGp72Fsubfwxyba20YUCrKHL7k8AzVH9 FbSVkQ3dUkfiDIxM+4oYFFaL X-Google-Smtp-Source: ACHHUZ5tJO51d0sPhtTaHbcaPLiOykoKEog0y1ryj6g6Jk3jLMj9ea2sPl3axfj3Xls0zGUmHjkqGA== X-Received: by 2002:a05:6402:26c7:b0:50b:c57f:d464 with SMTP id x7-20020a05640226c700b0050bc57fd464mr7817155edd.1.1686217891038; Thu, 08 Jun 2023 02:51:31 -0700 (PDT) Received: from smtpclient.apple ([2a00:cc47:21fb:f100:5c7:9e40:49bd:38e7]) by smtp.gmail.com with ESMTPSA id p4-20020a05640210c400b005158563be4asm346351edu.33.2023.06.08.02.51.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jun 2023 02:51:30 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.500.231\)) Subject: Re: [PATCH] Handle FMA friendly in reassoc pass From: Maxim Kuvyrkov In-Reply-To: <20230524233005.3284950-1-lili.cui@intel.com> Date: Thu, 8 Jun 2023 13:51:18 +0400 Cc: gcc-patches , Richard Guenther , linkw@linux.ibm.com Content-Transfer-Encoding: quoted-printable Message-Id: References: <20230524233005.3284950-1-lili.cui@intel.com> To: "Cui, Lili" X-Mailer: Apple Mail (2.3731.500.231) X-Spam-Status: No, score=-5.7 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,T_SCC_BODY_TEXT_LINE 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 May 25, 2023, at 03:30, Cui, Lili via Gcc-patches = wrote: >=20 > From: Lili Cui >=20 > Make some changes in reassoc pass to make it more friendly to fma pass = later. > Using FMA instead of mult + add reduces register pressure and = insruction > retired. >=20 > There are mainly two changes > 1. Put no-mult ops and mult ops alternately at the end of the queue, = which is > conducive to generating more fma and reducing the loss of FMA when = breaking > the chain. > 2. Rewrite the rewrite_expr_tree_parallel function to try to build = parallel > chains according to the given correlation width, keeping the FMA = chance as > much as possible. >=20 > With the patch applied >=20 > On ICX: > 507.cactuBSSN_r: Improved by 1.7% for multi-copy . > 503.bwaves_r : Improved by 0.60% for single copy . > 507.cactuBSSN_r: Improved by 1.10% for single copy . > 519.lbm_r : Improved by 2.21% for single copy . > no measurable changes for other benchmarks. >=20 > On aarch64 > 507.cactuBSSN_r: Improved by 1.7% for multi-copy. > 503.bwaves_r : Improved by 6.00% for single-copy. > no measurable changes for other benchmarks. Hi Cui, I'm seeing a 4% slowdown on 436.cactusADM from SPEC CPU2006 on = aarch64-linux-gnu (Cortex-A57) when compiling with "-O2 -flto". All = other benchmarks seem neutral to this patch, and I didn't observe the = slow down with plain -O2 no-LTO or with -O3. Is this something interesting to investigate? I'll be happy to assist. Kind regards, -- Maxim Kuvyrkov https://www.linaro.org