Re: [patch] Move switch-conversion after profiling

2012-04-20 Thread Richard Guenther
On Thu, Apr 19, 2012 at 5:16 PM, Steven Bosscher stevenb@gmail.com wrote: Hello, If we want to use profiling to expand switches in GIMPLE, we'll have to run switch-conversion after profiling. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK? That's too early still. Profile data

Re: [patch] Move switch-conversion after profiling

2012-04-20 Thread Jan Hubicka
On Thu, Apr 19, 2012 at 5:16 PM, Steven Bosscher stevenb@gmail.com wrote: Hello, If we want to use profiling to expand switches in GIMPLE, we'll have to run switch-conversion after profiling. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK? That's too early still.

Re: [patch] Move switch-conversion after profiling

2012-04-20 Thread Richard Guenther
On Fri, Apr 20, 2012 at 10:52 AM, Jan Hubicka hubi...@ucw.cz wrote: On Thu, Apr 19, 2012 at 5:16 PM, Steven Bosscher stevenb@gmail.com wrote: Hello, If we want to use profiling to expand switches in GIMPLE, we'll have to run switch-conversion after profiling. Bootstrapped and

Re: [patch] Move switch-conversion after profiling

2012-04-20 Thread Jan Hubicka
The original motivation to do switch conversion early was to get function bodies smaller (i.e. when inlining the static var don't need duplication, the switch code does) This was motivated by real world examples, i.e. mesa that inlines function converting error codes into

Re: [patch] Move switch-conversion after profiling

2012-04-20 Thread Richard Guenther
On Fri, Apr 20, 2012 at 11:24 AM, Jan Hubicka hubi...@ucw.cz wrote: The original motivation to do switch conversion early was to get function bodies smaller (i.e. when inlining the static var don't need duplication, the switch code does) This was motivated by real world examples,

[patch] Move switch-conversion after profiling

2012-04-19 Thread Steven Bosscher
Hello, If we want to use profiling to expand switches in GIMPLE, we'll have to run switch-conversion after profiling. Bootstrapped and tested on x86_64-unknown-linux-gnu. OK? Ciao! Steven * passes.c (pass_convert_switch): Move after profiling and pure_const. Index: passes.c