On Thu, Jul 20, 2017 at 8:41 PM, Steven Bosscher <stevenb....@gmail.com> 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 >> 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 left are roughly equal to probabilities >> on the right. >> >> Patch survives bootstrap and regtesting on x64 but has some issues: >> * tests are fragile but I'm not sure how to make them better >> * I haven't done any performance measurements - would these be needed? >> I don't have access to SPEC these days, any other suggestions? >> >> Patch is jointly authored with Martin. > > Hi Yuri, > > Can you come up with test cases that don't scan the assembly output? > Ideally the test case should check a dump file that is as close as > possible to the code transformation, in this case the dump from > pass_expand.
Sure, can do (it won't help much about test fragility though). -Y