Fix 2 typos

Message ID 20171208162008.GZ2353@tucnak
State New
Headers show
Series
  • Fix 2 typos
Related show

Commit Message

Jakub Jelinek Dec. 8, 2017, 4:20 p.m.
Hi!

There is no get_base_ref_and_offset function and AFAIK never has been,
my guess is these comments meant get_ref_base_and_extent.
Ok for trunk?

2017-12-08  Jakub Jelinek  <jakub@redhat.com>

	* ipa-polymorphic-call.c (noncall_stmt_may_be_vtbl_ptr_store): Fix
	a comment typo, get_base_ref_and_offset -> get_ref_base_and_extent.
	* ipa-prop.c (stmt_may_be_vtbl_ptr_store): Likewise.


	Jakub

Comments

Martin Jambor Dec. 8, 2017, 4:41 p.m. | #1
Hi,

On Fri, Dec 08 2017, Jakub Jelinek wrote:
> Hi!

>

> There is no get_base_ref_and_offset function and AFAIK never has been,

> my guess is these comments meant get_ref_base_and_extent.


I am quite sure that is the case.

> Ok for trunk?


Well, my opinion is that it  obviously is.

Thanks,

Martin


>

> 2017-12-08  Jakub Jelinek  <jakub@redhat.com>

>

> 	* ipa-polymorphic-call.c (noncall_stmt_may_be_vtbl_ptr_store): Fix

> 	a comment typo, get_base_ref_and_offset -> get_ref_base_and_extent.

> 	* ipa-prop.c (stmt_may_be_vtbl_ptr_store): Likewise.

>

> --- gcc/ipa-polymorphic-call.c.jj	2017-10-10 22:04:02.000000000 +0200

> +++ gcc/ipa-polymorphic-call.c	2017-12-08 15:49:00.883187008 +0100

> @@ -1149,7 +1149,7 @@ noncall_stmt_may_be_vtbl_ptr_store (gimp

>  	  if (TREE_CODE (lhs) == COMPONENT_REF

>  	      && !DECL_VIRTUAL_P (TREE_OPERAND (lhs, 1)))

>  	    return false;

> -	  /* In the future we might want to use get_base_ref_and_offset to find

> +	  /* In the future we might want to use get_ref_base_and_extent to find

>  	     if there is a field corresponding to the offset and if so, proceed

>  	     almost like if it was a component ref.  */

>  	}

> --- gcc/ipa-prop.c.jj	2017-11-28 22:19:30.000000000 +0100

> +++ gcc/ipa-prop.c	2017-12-08 15:48:43.848397515 +0100

> @@ -652,7 +652,7 @@ stmt_may_be_vtbl_ptr_store (gimple *stmt

>  	  if (TREE_CODE (lhs) == COMPONENT_REF

>  	      && !DECL_VIRTUAL_P (TREE_OPERAND (lhs, 1)))

>  	    return false;

> -	  /* In the future we might want to use get_base_ref_and_offset to find

> +	  /* In the future we might want to use get_ref_base_and_extent to find

>  	     if there is a field corresponding to the offset and if so, proceed

>  	     almost like if it was a component ref.  */

>  	}

>

> 	Jakub
Jeff Law Dec. 8, 2017, 5:07 p.m. | #2
On 12/08/2017 09:20 AM, Jakub Jelinek wrote:
> Hi!

> 

> There is no get_base_ref_and_offset function and AFAIK never has been,

> my guess is these comments meant get_ref_base_and_extent.

> Ok for trunk?

> 

> 2017-12-08  Jakub Jelinek  <jakub@redhat.com>

> 

> 	* ipa-polymorphic-call.c (noncall_stmt_may_be_vtbl_ptr_store): Fix

> 	a comment typo, get_base_ref_and_offset -> get_ref_base_and_extent.

> 	* ipa-prop.c (stmt_may_be_vtbl_ptr_store): Likewise.

OK.
jeff

Patch

--- gcc/ipa-polymorphic-call.c.jj	2017-10-10 22:04:02.000000000 +0200
+++ gcc/ipa-polymorphic-call.c	2017-12-08 15:49:00.883187008 +0100
@@ -1149,7 +1149,7 @@  noncall_stmt_may_be_vtbl_ptr_store (gimp
 	  if (TREE_CODE (lhs) == COMPONENT_REF
 	      && !DECL_VIRTUAL_P (TREE_OPERAND (lhs, 1)))
 	    return false;
-	  /* In the future we might want to use get_base_ref_and_offset to find
+	  /* In the future we might want to use get_ref_base_and_extent to find
 	     if there is a field corresponding to the offset and if so, proceed
 	     almost like if it was a component ref.  */
 	}
--- gcc/ipa-prop.c.jj	2017-11-28 22:19:30.000000000 +0100
+++ gcc/ipa-prop.c	2017-12-08 15:48:43.848397515 +0100
@@ -652,7 +652,7 @@  stmt_may_be_vtbl_ptr_store (gimple *stmt
 	  if (TREE_CODE (lhs) == COMPONENT_REF
 	      && !DECL_VIRTUAL_P (TREE_OPERAND (lhs, 1)))
 	    return false;
-	  /* In the future we might want to use get_base_ref_and_offset to find
+	  /* In the future we might want to use get_ref_base_and_extent to find
 	     if there is a field corresponding to the offset and if so, proceed
 	     almost like if it was a component ref.  */
 	}