Yes. It does sufficient. Send a patch:
https://gcc.gnu.org/pipermail/gcc-patches/2024-January/642216.html 




juzhe.zh...@rivai.ai
 
From: Robin Dapp
Date: 2024-01-09 00:45
To: 钟居哲; gcc-patches
CC: rdapp.gcc; kito.cheng; kito.cheng; Jeff Law
Subject: Re: [PATCH] RISC-V: Teach liveness computation loop invariant shift 
amount[Dynamic LMUL]
>     > +  if (is_gimple_min_invariant (op))
>     > +    return true;
>     > +  if (SSA_NAME_IS_DEFAULT_DEF (op)
>     > +      || !flow_bb_inside_loop_p (loop, gimple_bb (SSA_NAME_DEF_STMT 
> (op))))
>     > +    return true;
>     > +  return gimple_uid (SSA_NAME_DEF_STMT (op)) & 1;
>     > +}
>     > +
 
Does gimple_uid ever return something useful for us here?
In tree-ssa-loop-ch it is being populated
before and then used but I don't think we populate it properly?
 
So my question would be, isn't is_gimple_constant and
flow_bb_inside_loop_p sufficient for our purpose?
 
Regards
Robin
 

Reply via email to