public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] SCCVN: Fix repeating variable name "len"
@ 2023-06-26 20:57 Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-06-26 20:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:cee722a403bede41bde74fe9aabad82c63015cf3

commit cee722a403bede41bde74fe9aabad82c63015cf3
Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Date:   Mon Jun 26 10:32:04 2023 +0800

    SCCVN: Fix repeating variable name "len"
    
    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".

Diff:
---
 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 a99ec2ea89b..38974f3a551 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,

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] SCCVN: Fix repeating variable name "len"
@ 2023-07-14  2:49 Jeff Law
  0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2023-07-14  2:49 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:1b0e4c74200ec628fb1ceb1c7358c846a74543cc

commit 1b0e4c74200ec628fb1ceb1c7358c846a74543cc
Author: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
Date:   Mon Jun 26 10:32:04 2023 +0800

    SCCVN: Fix repeating variable name "len"
    
    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".

Diff:
---
 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 a99ec2ea89b..38974f3a551 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,

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-14  2:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 20:57 [gcc(refs/vendors/riscv/heads/gcc-13-with-riscv-opts)] SCCVN: Fix repeating variable name "len" Jeff Law
2023-07-14  2:49 Jeff Law

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).