Re: [PATCH] early outs for functions in rs6000.cc

2023-10-11 Thread Jiufu Guo
Hi, David Edelsohn writes: > > On Tue, Oct 10, 2023 at 9:29 PM Jiufu Guo wrote: > > Hi, > > There are some piece of code like below in rs6000.cc: > > ... > if (xx) > return x; > else if (yy) > return y; > ... //else if chain > else > return d; > > Using early outs w

Re: [PATCH] early outs for functions in rs6000.cc

2023-10-11 Thread David Edelsohn
On Tue, Oct 10, 2023 at 9:29 PM Jiufu Guo wrote: > Hi, > > There are some piece of code like below in rs6000.cc: > > ... > if (xx) >return x; > else if (yy) >return y; > ... //else if chain > else >return d; > > Using early outs would be more preferable for this kind of code. >

[PATCH] early outs for functions in rs6000.cc

2023-10-10 Thread Jiufu Guo
Hi, There are some piece of code like below in rs6000.cc: ... if (xx) return x; else if (yy) return y; ... //else if chain else return d; Using early outs would be more preferable for this kind of code. The whole function rs6000_emit_set_long_const and num_insns_constant_gpr are r