[Bug middle-end/59521] __builtin_expect not effective in switch

2018-09-03 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #20 from Martin Liška --- Author: marxin Date: Mon Sep 3 07:51:56 2018 New Revision: 264050 URL: https://gcc.gnu.org/viewcvs?rev=264050=gcc=rev Log: Make __builtin_expect effective in switch statements (PR middle-end/PR59521).

[Bug middle-end/59521] __builtin_expect not effective in switch

2018-09-03 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Martin Liška changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/59521] __builtin_expect not effective in switch

2018-06-22 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #19 from Martin Liška --- (In reply to Eric Gallager from comment #18) > (In reply to Martin Liška from comment #17) > > Unfortunately I decided to postpone it to GCC 9.x. > > GCC 9.x development is ongoing now. Yes, I've just

[Bug middle-end/59521] __builtin_expect not effective in switch

2018-06-21 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #18 from Eric Gallager --- (In reply to Martin Liška from comment #17) > Unfortunately I decided to postpone it to GCC 9.x. GCC 9.x development is ongoing now.

[Bug middle-end/59521] __builtin_expect not effective in switch

2018-02-19 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Martin Liška changed: What|Removed |Added Target Milestone|--- |9.0

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-12-18 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #17 from Martin Liška --- Unfortunately I decided to postpone it to GCC 9.x.

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-12-15 Thread ygribov at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Yury Gribov changed: What|Removed |Added CC||ygribov at gcc dot gnu.org --- Comment

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-12-14 Thread bugzi...@poradnik-webmastera.com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Daniel Fruzynski changed: What|Removed |Added CC|

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-18 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #14 from Yuri Gribov --- Patch posted in https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01016.html

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-17 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Yuri Gribov changed: What|Removed |Added Attachment #41737|0 |1 is obsolete|

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-14 Thread drepper.fsp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #12 from Ulrich Drepper --- On Fri, Jul 14, 2017 at 2:17 PM, marxin at gcc dot gnu.org wrote: > Maybe I miss something, but I would expect to sort all branches in > emit_case_decision_tree as either

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-14 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #11 from Martin Liška --- (In reply to Yuri Gribov from comment #10) > (In reply to Martin Liška from comment #9) > > The patch works for me for the described case, but does not for PGO, which > > should do the same based on real

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-14 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #10 from Yuri Gribov --- (In reply to Martin Liška from comment #9) > The patch works for me for the described case, but does not for PGO, which > should do the same based on real numbers: Problem here is that we optimize only

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-13 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #9 from Martin Liška --- (In reply to Yuri Gribov from comment #8) > Created attachment 41737 [details] > New draft patch > > How about this? I added edge attribute for builtin_expect and later used it > in emit_case_decision_tree

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-12 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Yuri Gribov changed: What|Removed |Added Attachment #41698|0 |1 is obsolete|

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-11 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #7 from Yuri Gribov --- (In reply to Martin Liška from comment #5) > Apart from that I added code that preserves > that probability in combine_predictions_for_bb. Yes, I did pretty much the same locally) > But still there's a

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-11 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #6 from Martin Liška --- Created attachment 41713 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41713=edit Semi-working patch

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-11 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 --- Comment #5 from Martin Liška --- Ok, your patch is definitely needed to properly propagate the builtin probability to a proper edge. Apart from that I added code that preserves that probability incombine_predictions_for_bb. Having that we're

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-10 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Martin Liška changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-06 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Yuri Gribov changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #3

[Bug middle-end/59521] __builtin_expect not effective in switch

2017-07-06 Thread tetra2005 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Yuri Gribov changed: What|Removed |Added CC||tetra2005 at gmail dot com --- Comment #2

[Bug middle-end/59521] __builtin_expect not effective in switch

2013-12-19 Thread rguenth at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Severity|normal |enhancement

[Bug middle-end/59521] __builtin_expect not effective in switch

2013-12-16 Thread mpolacek at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59521 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last