Re: [PATCH 1/2] if-to-switch conversion pass

2013-01-24 Thread Tom de Vries
Steven, On 19/07/12 16:43, Steven Bosscher wrote: > On Thu, Jul 19, 2012 at 3:43 PM, Tom de Vries wrote: >>> I think you should compare your method to the one described in the >>> paper, and at least reference the paper if it's somehow similar -- >> >> Interesting, thanks. Will do. > Done. > B

Re: [PATCH 1/2] if-to-switch conversion pass

2012-07-19 Thread Joseph S. Myers
On Thu, 19 Jul 2012, Tom Tromey wrote: > > "Steven" == Steven Bosscher writes: > > Steven> Makefile.in is a mess. One of these days, someone (hi, Tromey) will > Steven> hopefully get annoyed enough with this again to finish some tool to > Steven> auto-generate the dependences list. Until tha

Re: [PATCH 1/2] if-to-switch conversion pass

2012-07-19 Thread Tom Tromey
> "Steven" == Steven Bosscher writes: Steven> Makefile.in is a mess. One of these days, someone (hi, Tromey) will Steven> hopefully get annoyed enough with this again to finish some tool to Steven> auto-generate the dependences list. Until that time, let's try to Steven> avoid proliferating t

Re: [PATCH 1/2] if-to-switch conversion pass

2012-07-19 Thread Steven Bosscher
On Thu, Jul 19, 2012 at 3:43 PM, Tom de Vries wrote: >> I think you should compare your method to the one described in the >> paper, and at least reference the paper if it's somehow similar -- > > Interesting, thanks. Will do. BTW, I have the value profiling bits for this in my implementation of

Re: [PATCH 1/2] if-to-switch conversion pass

2012-07-19 Thread Tom de Vries
On 17/07/12 14:57, Steven Bosscher wrote: > On Tue, Jul 17, 2012 at 1:21 PM, Tom de Vries wrote: >> Richard, >> >> attached patch implements an if-to-switch conversion tree pass >> pass_if_to_switch. > > Nice. I've been working on something similar, using the paper > "Efficient and Effective Bran

Re: [PATCH 1/2] if-to-switch conversion pass

2012-07-19 Thread Tom de Vries
On 18/07/12 23:47, Steven Bosscher wrote: > On Wed, Jul 18, 2012 at 11:30 PM, Tom de Vries wrote: +tree-if-switch-conversion.o : tree-if-switch-conversion.c $(CONFIG_H) \ +$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) \ +$(TREE_INLINE_H) $(TIMEVAR_H) $(TM_H)

Re: [PATCH 1/2] if-to-switch conversion pass

2012-07-18 Thread Steven Bosscher
On Wed, Jul 18, 2012 at 11:30 PM, Tom de Vries wrote: >>> +tree-if-switch-conversion.o : tree-if-switch-conversion.c $(CONFIG_H) \ >>> +$(SYSTEM_H) $(TREE_H) $(TM_P_H) $(TREE_FLOW_H) $(DIAGNOSTIC_H) \ >>> +$(TREE_INLINE_H) $(TIMEVAR_H) $(TM_H) coretypes.h $(TREE_DUMP_H) \ >>> +$(GIMPLE

Re: [PATCH 1/2] if-to-switch conversion pass

2012-07-18 Thread Tom de Vries
Bernhard, thanks for the review. On 18/07/12 19:32, Bernhard Reutner-Fischer wrote: > On Tue, Jul 17, 2012 at 01:21:00PM +0200, Tom de Vries wrote: > >> /* The root of the compilation pass tree, once constructed. */ >> extern struct opt_pass *all_passes, *all_small_ipa_passes, >> *all_lowering

Re: [PATCH 1/2] if-to-switch conversion pass

2012-07-18 Thread Bernhard Reutner-Fischer
On Tue, Jul 17, 2012 at 01:21:00PM +0200, Tom de Vries wrote: > /* The root of the compilation pass tree, once constructed. */ > extern struct opt_pass *all_passes, *all_small_ipa_passes, > *all_lowering_passes, >Index: gcc/tree-if-switch-conversion.c >===

Re: [PATCH 1/2] if-to-switch conversion pass

2012-07-17 Thread Steven Bosscher
On Tue, Jul 17, 2012 at 1:21 PM, Tom de Vries wrote: > Richard, > > attached patch implements an if-to-switch conversion tree pass > pass_if_to_switch. Nice. I've been working on something similar, using the paper "Efficient and Effective Branch Reordering Using Profile Data" (Mingui Yang et. al.

[PATCH 1/2] if-to-switch conversion pass

2012-07-17 Thread Tom de Vries
Richard, attached patch implements an if-to-switch conversion tree pass pass_if_to_switch. I will follow up this email with an infrastructure patch that provides double_int_popcount and popcount_hwi. The pass detects chains of ifs like this: ... : ... if (D.1993_3 == 32) goto ; e