Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-08-02 Thread Martin Liška
On 08/02/2017 12:52 PM, Yury Gribov wrote: > On Wed, Aug 2, 2017 at 11:42 AM, Martin Liška > wrote: > > On 08/02/2017 11:53 AM, Jan Hubicka wrote: > > Hello, > > sorry for not responding for a while. Martin Liska has patch to move > switch >

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-08-02 Thread Martin Liška
On 08/02/2017 11:53 AM, Jan Hubicka wrote: > Hello, > sorry for not responding for a while. Martin Liska has patch to move switch > expansion to gimple level that will likely simplify the code combinatoin. Hello. Yep, will land today to gcc-patches mailing list. > >> >>

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-08-02 Thread Jan Hubicka
Hello, sorry for not responding for a while. Martin Liska has patch to move switch expansion to gimple level that will likely simplify the code combinatoin. > > combine_predictions_for_bb calculates final probability for edges of > if-else or switch statements. > > For if-elses this is done by

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-07-20 Thread Yuri Gribov
On Thu, Jul 20, 2017 at 8:41 PM, Steven Bosscher wrote: > On Tue, Jul 18, 2017 at 9:04 AM, Yuri Gribov wrote: >> Hi all, >> >> Currently all cases in switch statement are treated as having equal >> probabilities which causes suboptimal code as demonstrated in >>

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-07-20 Thread Steven Bosscher
On Tue, Jul 18, 2017 at 9:04 AM, Yuri Gribov wrote: > Hi all, > > Currently all cases in switch statement are treated as having equal > probabilities which causes suboptimal code as demonstrated in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 . This patch > modifies expander to select

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-07-18 Thread Yuri Gribov
On Tue, Jul 18, 2017 at 8:45 AM, Jan Hubicka wrote: >> Hi all, >> >> Currently all cases in switch statement are treated as having equal >> probabilities which causes suboptimal code as demonstrated in >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 . This patch >> modifies

Re: [PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-07-18 Thread Jan Hubicka
> Hi all, > > Currently all cases in switch statement are treated as having equal > probabilities which causes suboptimal code as demonstrated in > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 . This patch > modifies expander to select pivot point for decision tree so that > probabilities

[PATCH][PR 59521] Respect probabilities when expanding switch statement

2017-07-18 Thread Yuri Gribov
Hi all, Currently all cases in switch statement are treated as having equal probabilities which causes suboptimal code as demonstrated in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 . This patch modifies expander to select pivot point for decision tree so that probabilities of cases on the