https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117091

Andi Kleen <andi-gcc at firstfloor dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andi-gcc at firstfloor dot org

--- Comment #6 from Andi Kleen <andi-gcc at firstfloor dot org> ---
There are multiple issues (should probably rename the subject)

Apart from the inefficient bit test, the jump_table clustering is also very
inefficient because it tries every possible cluster combination

  unsigned l = clusters.length ();
...
  for (unsigned i = 1; i <= l; i++)
    {
     ...

      for (unsigned j = 0; j < i; j++)

There must be a better algorithm for this? Perhaps it needs dynamic
programming?

Also in addition the function that creates the tree is recursive and can have
quite deep recursion (should probably fix that one too)

>I wouldn't start with disabling this at -O0 and -O1 ;)

Even with a better algorithm that's imho the right thing to do.

Reply via email to