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 tom_devr...@mentor.com 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.

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 tom_devr...@mentor.com 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)

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 tom_devr...@mentor.com 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

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 tom_devr...@mentor.com 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

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

2012-07-19 Thread Tom Tromey
Steven == Steven Bosscher stevenb@gmail.com 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

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 stevenb@gmail.com 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.

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-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,

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 tom_devr...@mentor.com 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) \ +

[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: ... bb 4: ... if (D.1993_3 == 32) goto

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 tom_devr...@mentor.com 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