SSA ALIAS: Apply LEN_MASK_{LOAD, STORE} into SSA alias analysis

Message ID 20230623135635.4100947-1-juzhe.zhong@rivai.ai
State Accepted
Headers
Series SSA ALIAS: Apply LEN_MASK_{LOAD, STORE} into SSA alias analysis |

Checks

Context Check Description
snail/gcc-patch-check success Github commit url

Commit Message

juzhe.zhong@rivai.ai June 23, 2023, 1:56 p.m. UTC
  From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>

gcc/ChangeLog:

        * tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): Apply LEN_MASK_{LOAD,STORE}

---
 gcc/tree-ssa-alias.cc | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Jeff Law June 23, 2023, 7:20 p.m. UTC | #1
On 6/23/23 07:56, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
> 
> gcc/ChangeLog:
> 
>          * tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): Apply LEN_MASK_{LOAD,STORE}
> 
> ---
>   gcc/tree-ssa-alias.cc | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
> index e1bc04b82ba..92dc1bb9987 100644
> --- a/gcc/tree-ssa-alias.cc
> +++ b/gcc/tree-ssa-alias.cc
> @@ -2815,11 +2815,13 @@ ref_maybe_used_by_call_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
>         case IFN_SCATTER_STORE:
>         case IFN_MASK_SCATTER_STORE:
>         case IFN_LEN_STORE:
> +      case IFN_LEN_MASK_STORE:
>   	return false;
>         case IFN_MASK_STORE_LANES:
>   	goto process_args;
>         case IFN_MASK_LOAD:
>         case IFN_LEN_LOAD:
> +      case IFN_LEN_MASK_LOAD:
>         case IFN_MASK_LOAD_LANES:
>   	{
>   	  ao_ref rhs_ref;
Don't you need to adjust how you compute the size for the LEN_MASK_LOAD 
case?

jeff
  
juzhe.zhong@rivai.ai June 23, 2023, 11:21 p.m. UTC | #2
Not sure since I saw MASK_STORE/LEN_STORE didn't compute size.



juzhe.zhong@rivai.ai
 
From: Jeff Law
Date: 2023-06-24 03:20
To: juzhe.zhong; gcc-patches
CC: rguenther; richard.sandiford
Subject: Re: [PATCH] SSA ALIAS: Apply LEN_MASK_{LOAD, STORE} into SSA alias analysis
 
 
On 6/23/23 07:56, juzhe.zhong@rivai.ai wrote:
> From: Ju-Zhe Zhong <juzhe.zhong@rivai.ai>
> 
> gcc/ChangeLog:
> 
>          * tree-ssa-alias.cc (ref_maybe_used_by_call_p_1): Apply LEN_MASK_{LOAD,STORE}
> 
> ---
>   gcc/tree-ssa-alias.cc | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
> index e1bc04b82ba..92dc1bb9987 100644
> --- a/gcc/tree-ssa-alias.cc
> +++ b/gcc/tree-ssa-alias.cc
> @@ -2815,11 +2815,13 @@ ref_maybe_used_by_call_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
>         case IFN_SCATTER_STORE:
>         case IFN_MASK_SCATTER_STORE:
>         case IFN_LEN_STORE:
> +      case IFN_LEN_MASK_STORE:
>   return false;
>         case IFN_MASK_STORE_LANES:
>   goto process_args;
>         case IFN_MASK_LOAD:
>         case IFN_LEN_LOAD:
> +      case IFN_LEN_MASK_LOAD:
>         case IFN_MASK_LOAD_LANES:
>   {
>     ao_ref rhs_ref;
Don't you need to adjust how you compute the size for the LEN_MASK_LOAD 
case?
 
jeff
  
Jeff Law June 24, 2023, 2:08 p.m. UTC | #3
On 6/23/23 17:21, 钟居哲 wrote:
> Not sure since I saw MASK_STORE/LEN_STORE didn't compute size.
Yea, I think you're right.  We take the size from the LHS.  My mistake.

This is fine for the trunk.

jeff
  
Li, Pan2 via Gcc-patches June 25, 2023, 1:32 a.m. UTC | #4
Committed, thanks Jeff.

Pan

-----Original Message-----
From: Gcc-patches <gcc-patches-bounces+pan2.li=intel.com@gcc.gnu.org> On Behalf Of Jeff Law via Gcc-patches
Sent: Saturday, June 24, 2023 10:09 PM
To: 钟居哲 <juzhe.zhong@rivai.ai>; gcc-patches <gcc-patches@gcc.gnu.org>
Cc: rguenther <rguenther@suse.de>; richard.sandiford <richard.sandiford@arm.com>
Subject: Re: [PATCH] SSA ALIAS: Apply LEN_MASK_{LOAD, STORE} into SSA alias analysis



On 6/23/23 17:21, 钟居哲 wrote:
> Not sure since I saw MASK_STORE/LEN_STORE didn't compute size.
Yea, I think you're right.  We take the size from the LHS.  My mistake.

This is fine for the trunk.

jeff
  

Patch

diff --git a/gcc/tree-ssa-alias.cc b/gcc/tree-ssa-alias.cc
index e1bc04b82ba..92dc1bb9987 100644
--- a/gcc/tree-ssa-alias.cc
+++ b/gcc/tree-ssa-alias.cc
@@ -2815,11 +2815,13 @@  ref_maybe_used_by_call_p_1 (gcall *call, ao_ref *ref, bool tbaa_p)
       case IFN_SCATTER_STORE:
       case IFN_MASK_SCATTER_STORE:
       case IFN_LEN_STORE:
+      case IFN_LEN_MASK_STORE:
 	return false;
       case IFN_MASK_STORE_LANES:
 	goto process_args;
       case IFN_MASK_LOAD:
       case IFN_LEN_LOAD:
+      case IFN_LEN_MASK_LOAD:
       case IFN_MASK_LOAD_LANES:
 	{
 	  ao_ref rhs_ref;