From: Richard Biener <rguenther@suse.de>
To: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Cc: gcc-patches@gcc.gnu.org, richard.sandiford@arm.com
Subject: Re: [PATCH] SCCVN: Fix repeating variable name "len"
Date: Mon, 26 Jun 2023 07:53:11 +0000 (UTC) [thread overview]
Message-ID: <nycvar.YFH.7.77.849.2306260753070.4723@jbgna.fhfr.qr> (raw)
In-Reply-To: <20230626023204.1010610-1-juzhe.zhong@rivai.ai>
On Mon, 26 Jun 2023, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
>
> Line 3292: has variable name "len": tree mask = NULL_TREE, len = NULL_TREE, bias = NULL_TREE;
> Line 3349: has variable name "len": HOST_WIDE_INT start = 0, len = 0;
>
> Since they are never used simultaneously, such issue is not recognized for now.
> However, I want to add LEN_MASK_{LOAD,STORE} which will need these 2 variables, so fix naming in this path.
>
> Change HOST_WIDE_INT start = 0, len = 0; into HOST_WIDE_INT start = 0, length = 0;
OK.
> gcc/ChangeLog:
>
> * tree-ssa-sccvn.cc (vn_reference_lookup_3): Change name "len" into "length".
>
> ---
> gcc/tree-ssa-sccvn.cc | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc
> index 27c84e78fcf..11061a374a2 100644
> --- a/gcc/tree-ssa-sccvn.cc
> +++ b/gcc/tree-ssa-sccvn.cc
> @@ -3346,17 +3346,17 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_,
> = tree_to_uhwi (TYPE_SIZE (TREE_TYPE (vectype)));
> if (mask)
> {
> - HOST_WIDE_INT start = 0, len = 0;
> + HOST_WIDE_INT start = 0, length = 0;
> unsigned mask_idx = 0;
> do
> {
> if (integer_zerop (VECTOR_CST_ELT (mask, mask_idx)))
> {
> - if (len != 0)
> + if (length != 0)
> {
> pd.rhs_off = start;
> pd.offset = offset2i + start;
> - pd.size = len;
> + pd.size = length;
> if (ranges_known_overlap_p
> (offset, maxsize, pd.offset, pd.size))
> {
> @@ -3367,18 +3367,18 @@ vn_reference_lookup_3 (ao_ref *ref, tree vuse, void *data_,
> }
> }
> start = (mask_idx + 1) * elsz;
> - len = 0;
> + length = 0;
> }
> else
> - len += elsz;
> + length += elsz;
> mask_idx++;
> }
> while (known_lt (mask_idx, TYPE_VECTOR_SUBPARTS (vectype)));
> - if (len != 0)
> + if (length != 0)
> {
> pd.rhs_off = start;
> pd.offset = offset2i + start;
> - pd.size = len;
> + pd.size = length;
> if (ranges_known_overlap_p (offset, maxsize,
> pd.offset, pd.size))
> return data->push_partial_def (pd, set, set,
>
--
Richard Biener <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg,
Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman;
HRB 36809 (AG Nuernberg)
next prev parent reply other threads:[~2023-06-26 7:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 2:32 juzhe.zhong
2023-06-26 7:53 ` Richard Biener [this message]
2023-06-26 9:36 ` Li, Pan2
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=nycvar.YFH.7.77.849.2306260753070.4723@jbgna.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=juzhe.zhong@rivai.ai \
--cc=richard.sandiford@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).