From: juzhe.zhong@rivai.ai
To: gcc-patches@gcc.gnu.org
Cc: richard.sandiford@arm.com, rguenther@suse.de,
Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Subject: [PATCH] SCCVN: Fix repeating variable name "len"
Date: Mon, 26 Jun 2023 10:32:04 +0800 [thread overview]
Message-ID: <20230626023204.1010610-1-juzhe.zhong@rivai.ai> (raw)
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;
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,
--
2.36.3
next reply other threads:[~2023-06-26 2:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-26 2:32 juzhe.zhong [this message]
2023-06-26 7:53 ` Richard Biener
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=20230626023204.1010610-1-juzhe.zhong@rivai.ai \
--to=juzhe.zhong@rivai.ai \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
--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).