From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by sourceware.org (Postfix) with ESMTPS id 66FBE3858D3C for ; Tue, 23 Jan 2024 17:13:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 66FBE3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 66FBE3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::135 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706029996; cv=none; b=HY8SOa/lBKlU5MTbxFlWvHqysEZRWGiYJNdP3f+l1Mgh6iNtLj4UamdHoGLxt4MnYUdlSKVs89yuNmoDBOtZB6IimrPw8jv9LYMXluIXK5IQ2fHfm4edcp010Wyzz9T0Tf/VkkffwJCPHVc4WuqkKLQ/e8Wg4KzZyy6CmAsljXI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706029996; c=relaxed/simple; bh=dfO0NhmyrT32S+E5Mme9ukR37nZIvcToUXEqfsubmKc=; h=DKIM-Signature:From:Mime-Version:Subject:Date:Message-Id:To; b=uJp35MVIfuJSfNNsvqND+fcMQ3kixiggyXu/I2yOVyD05+y3nLSVLHszpJfBxSBsD6bQtxDex3EMxluyoayBPaalrSAuNmUx7oXJ7eBt2XM8MwYHiT60MM/D4jyWW/JRrEvA0t3tI60BN2+8/BTI07Anu2wNpS7+0U3qtmZGeQU= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-50ed808db11so4997598e87.2 for ; Tue, 23 Jan 2024 09:13:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706029993; x=1706634793; darn=gcc.gnu.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=oX3We71eBnHMh2NeDzR0+z60uehuoOdr9HtgkbRGn4M=; b=IEoDi9UqDJpeGLnZhihPFgbMCsq8g+TSavWeZlN30znEtnHmI95da6SW6Cmfh836Ks Zh6X4XkocWzV0GF1P7BB4XD6Vk4vvVo4CTXzifbo8/dw/+TEaaQsr0i/eEmKy9k5+7fE gwUniY2slyhfKijaB/R2ckokMajRAKbiSjrvX4IQDpTmi4RLzbJHrTl3SnCDXYkOttMe b1NZJA21Syj5Zji5gWFckCWmPlR/2hThZIlfQ6pVPXW42Kz4h+VCyngh43I9+yKtbqRV NcYHnbmLW9GvsamunoGh+Hi9ORcEi4VQeJvwM0NOT13fdlIJ3h3O1gGfZccG+k5j5n2z D/EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706029993; x=1706634793; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oX3We71eBnHMh2NeDzR0+z60uehuoOdr9HtgkbRGn4M=; b=bP8hBQ4QhApIDBeiHDgxjtM2we5EBbejM0ljSFCfX3YkuXNJo/VEg8ItpZ7t7taWiW ryW0+ugrUH3VDwJ/6FRbJdCz71I/XGHDNYvD9OtPOxq0PNjymIQ5s77w4F3zff8ZiLhF G9cC3VumguYaXxDkCEA3rMGgg3OxMWWnfH7KudrjTWfYxurI8lQcoEMy8W7QcQMoK4kT OAZCZzFHzNW4pY6p1t70hYX7K0K8B2s+p/W1rZbOQdxV6KQATLgY5cjct5LNchPGt50r El87w7YioaYkn51TYWpv8LkOJFjK2YXDjFPeOzhQKS2V9LIrRN6Qgs/mOBOfNXLce2cY dcrA== X-Gm-Message-State: AOJu0Yz3TQrYJ68FegzZ5qJzHETdTOyMer5v9TsjdCl9BKG88XCmQ82W fUm4uJqDr4GHjDb/k9ZDkq1R16k6QlRI2lPjniPwZgYZcRoU7c1F X-Google-Smtp-Source: AGHT+IHcSeuLTKOsp7meZDGaxCSXFBDZyh8xjTAUsovxQOfzoYpe1ghodxymq3w8vDic8mi/8LADWQ== X-Received: by 2002:a05:6512:3ba9:b0:50e:3d6f:6e20 with SMTP id g41-20020a0565123ba900b0050e3d6f6e20mr3189564lfv.84.1706029992303; Tue, 23 Jan 2024 09:13:12 -0800 (PST) Received: from smtpclient.apple (dynamic-077-007-057-250.77.7.pool.telefonica.de. [77.7.57.250]) by smtp.gmail.com with ESMTPSA id r5-20020aa7cb85000000b0055974a2a2d4sm10261311edt.39.2024.01.23.09.13.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Jan 2024 09:13:11 -0800 (PST) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Richard Biener Mime-Version: 1.0 (1.0) Subject: Re: [PATCH]middle-end: rename main_exit_p in reduction code. Date: Tue, 23 Jan 2024 18:13:00 +0100 Message-Id: <0AF6764B-3D24-4C00-ADCA-560B5B57057F@gmail.com> References: Cc: gcc-patches@gcc.gnu.org, nd@arm.com, rguenther@suse.de, jlaw@ventanamicro.com In-Reply-To: To: Tamar Christina X-Mailer: iPhone Mail (21C66) X-Spam-Status: No, score=-10.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,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: > Am 23.01.2024 um 17:04 schrieb Tamar Christina : >=20 > =EF=BB=BFHi All, >=20 > This renamed main_exit_p to last_val_reduc_p to more accurately > reflect what the value is calculating. >=20 > Ok for master if bootstrap passes? Incremental build shows it's fine. Ok > Thanks, > Tamar >=20 > gcc/ChangeLog: >=20 > * tree-vect-loop.cc (vect_get_vect_def, > vect_create_epilog_for_reduction): Rename main_exit_p to > last_val_reduc_p. >=20 > --- inline copy of patch -- > diff --git a/gcc/tree-vect-loop.cc b/gcc/tree-vect-loop.cc > index 4da1421c8f09746ef4b293573e4f861b642349e1..21a997599f397ba6c2cd15c3b9= c8b04513bc0c83 100644 > --- a/gcc/tree-vect-loop.cc > +++ b/gcc/tree-vect-loop.cc > @@ -5892,25 +5892,26 @@ vect_create_partial_epilog (tree vec_def, tree vec= type, code_helper code, > } >=20 > /* Retrieves the definining statement to be used for a reduction. > - For MAIN_EXIT_P we use the current VEC_STMTs and otherwise we look at > - the reduction definitions. */ > + For LAST_VAL_REDUC_P we use the current VEC_STMTs which correspond to t= he > + final value after vectorization and otherwise we look at the reduction= > + definitions to get the first. */ >=20 > tree > vect_get_vect_def (stmt_vec_info reduc_info, slp_tree slp_node, > - slp_instance slp_node_instance, bool main_exit_p, unsigned i, > - vec &vec_stmts) > + slp_instance slp_node_instance, bool last_val_reduc_p, > + unsigned i, vec &vec_stmts) > { > tree def; >=20 > if (slp_node) > { > - if (!main_exit_p) > + if (!last_val_reduc_p) > slp_node =3D slp_node_instance->reduc_phis; > def =3D vect_get_slp_vect_def (slp_node, i); > } > else > { > - if (!main_exit_p) > + if (!last_val_reduc_p) > reduc_info =3D STMT_VINFO_REDUC_DEF (vect_orig_stmt (reduc_info)); > vec_stmts =3D STMT_VINFO_VEC_STMTS (reduc_info); > def =3D gimple_get_lhs (vec_stmts[0]); > @@ -5982,8 +5983,8 @@ vect_create_epilog_for_reduction (loop_vec_info loop= _vinfo, > loop-closed PHI of the inner loop which we remember as > def for the reduction PHI generation. */ > bool double_reduc =3D false; > - bool main_exit_p =3D LOOP_VINFO_IV_EXIT (loop_vinfo) =3D=3D loop_exit > - && !LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo); > + bool last_val_reduc_p =3D LOOP_VINFO_IV_EXIT (loop_vinfo) =3D=3D loop_e= xit > + && !LOOP_VINFO_EARLY_BREAKS_VECT_PEELED (loop_vinfo); > stmt_vec_info rdef_info =3D stmt_info; > if (STMT_VINFO_DEF_TYPE (stmt_info) =3D=3D vect_double_reduction_def) > { > @@ -6233,7 +6234,7 @@ vect_create_epilog_for_reduction (loop_vec_info loop= _vinfo, > { > gimple_seq stmts =3D NULL; > def =3D vect_get_vect_def (rdef_info, slp_node, slp_node_instance, > - main_exit_p, i, vec_stmts); > + last_val_reduc_p, i, vec_stmts); > for (j =3D 0; j < ncopies; j++) > { > tree new_def =3D copy_ssa_name (def); >=20 >=20 >=20 >=20 > -- >