Re: [PATCH] libiberty: d-demangle: use switch instead of if-else

2021-10-04 Thread Luís Ferreira
On Sun, 2021-10-03 at 15:55 -0600, Jeff Law wrote: > > > On 9/29/2021 7:08 PM, Luís Ferreira wrote: > > This patch allows the compiler to efficiently generate jump tables > > instead of > > using if-else-if. > > > > Signed-off-by: Luís Ferreira > I'm not sure this is terribly useful. 

Re: [PATCH] libiberty: d-demangle: use switch instead of if-else

2021-10-04 Thread ibuclaw--- via Gcc-patches
> On 03/10/2021 23:55 Jeff Law via Gcc-patches wrote: > > > On 9/29/2021 7:08 PM, Luís Ferreira wrote: > > This patch allows the compiler to efficiently generate jump tables instead > > of > > using if-else-if. > > > > Signed-off-by: Luís Ferreira > I'm not sure this is terribly useful. 

Re: [PATCH] libiberty: d-demangle: use switch instead of if-else

2021-10-03 Thread Jeff Law via Gcc-patches
On 9/29/2021 7:08 PM, Luís Ferreira wrote: This patch allows the compiler to efficiently generate jump tables instead of using if-else-if. Signed-off-by: Luís Ferreira I'm not sure this is terribly useful.  Compilers have the ability to analyze the underlying code and make sensible

[PATCH] libiberty: d-demangle: use switch instead of if-else

2021-09-29 Thread Luís Ferreira
This patch allows the compiler to efficiently generate jump tables instead of using if-else-if. Signed-off-by: Luís Ferreira --- libiberty/d-demangle.c | 44 +++--- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/libiberty/d-demangle.c