Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-02 Thread juzhe.zhong
We set VL/VTYPE these 2 implicit global status denpency register as fixed reg. Then CSE can do the optimization now. >> Yea. I'm wondering about when the right place to introduce these >>dependencies might be. I'm still a few months out from worrying about >>RVV, but it's not too far away. You d

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-02 Thread juzhe.zh...@rivai.ai
] CPROP: Allow cprop optimization when the function has a single block On Thu, 2 Feb 2023, juzhe.zh...@rivai.ai wrote: > Yeah, Thanks. You are right. CSE should do the job. > Now I know the reason CSE failed to optimize is I include > VL_REGNUM(66)/VTYPE_RENUM(67) hard reg > as the d

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-02 Thread Richard Biener via Gcc-patches
On Thu, 2 Feb 2023, juzhe.zh...@rivai.ai wrote: > Yeah, Thanks. You are right. CSE should do the job. > Now I know the reason CSE failed to optimize is I include > VL_REGNUM(66)/VTYPE_RENUM(67) hard reg > as the dependency of pred_broadcast: > (insn 19 18 20 4 (set (reg:VNx1DI 152) > > (

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-01 Thread juzhe.zh...@rivai.ai
uzhe.zh...@rivai.ai From: Richard Biener Date: 2023-02-01 20:51 To: juzhe.zh...@rivai.ai CC: gcc-patches; kito.cheng; richard.sandiford; jeffreyalaw; apinski Subject: Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block On Wed, 1 Feb 2023, juzhe.zh...@rivai.ai wrote:

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-01 Thread juzhe.zh...@rivai.ai
t sure whether CSE can propagate the 151 pseudo to the second pred_add ?? juzhe.zh...@rivai.ai From: Richard Biener Date: 2023-02-01 20:51 To: juzhe.zh...@rivai.ai CC: gcc-patches; kito.cheng; richard.sandiford; jeffreyalaw; apinski Subject: Re: Re: [PATCH] CPROP: Allow cprop optimization wh

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-01 Thread Richard Biener via Gcc-patches
On Wed, 1 Feb 2023, juzhe.zh...@rivai.ai wrote: > I don't known whether CSE do the job. What I saw is CPROP do the > optimization when we have more than 1 block. > > This the RTL dump before CPROP: > > (insn 19 18 20 4 (set (reg:VNx1DI 151) > (if_then_else:VNx1DI (unspec:VNx1BI [ >

Re: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block

2023-02-01 Thread juzhe.zh...@rivai.ai
I don't known whether CSE do the job. What I saw is CPROP do the optimization when we have more than 1 block. This the RTL dump before CPROP: (insn 19 18 20 4 (set (reg:VNx1DI 151) (if_then_else:VNx1DI (unspec:VNx1BI [ (const_vector:VNx1BI repeat [