* [PATCH] SCCVN: Fix repeating variable name "len"
@ 2023-06-26 2:32 juzhe.zhong
2023-06-26 7:53 ` Richard Biener
0 siblings, 1 reply; 3+ messages in thread
From: juzhe.zhong @ 2023-06-26 2:32 UTC (permalink / raw)
To: gcc-patches; +Cc: richard.sandiford, rguenther, Ju-Zhe Zhong
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] SCCVN: Fix repeating variable name "len"
2023-06-26 2:32 [PATCH] SCCVN: Fix repeating variable name "len" juzhe.zhong
@ 2023-06-26 7:53 ` Richard Biener
2023-06-26 9:36 ` Li, Pan2
0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2023-06-26 7:53 UTC (permalink / raw)
To: Ju-Zhe Zhong; +Cc: gcc-patches, richard.sandiford
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] SCCVN: Fix repeating variable name "len"
2023-06-26 7:53 ` Richard Biener
@ 2023-06-26 9:36 ` Li, Pan2
0 siblings, 0 replies; 3+ messages in thread
From: Li, Pan2 @ 2023-06-26 9:36 UTC (permalink / raw)
To: Richard Biener, Ju-Zhe Zhong; +Cc: gcc-patches, richard.sandiford
Committed, thanks Richard.
Pan
-----Original Message-----
From: Gcc-patches <gcc-patches-bounces+pan2.li=intel.com@gcc.gnu.org> On Behalf Of Richard Biener via Gcc-patches
Sent: Monday, June 26, 2023 3:53 PM
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"
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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-06-26 9:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 2:32 [PATCH] SCCVN: Fix repeating variable name "len" juzhe.zhong
2023-06-26 7:53 ` Richard Biener
2023-06-26 9:36 ` Li, Pan2
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).