<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Too many temporary expressions in shader freeze glLinkProgram"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94477#c9">Comment # 9</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Too many temporary expressions in shader freeze glLinkProgram"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94477">bug 94477</a>
              from <span class="vcard"><a class="email" href="mailto:lemody@gmail.com" title="Tapani Pälli <lemody@gmail.com>"> <span class="fn">Tapani Pälli</span></a>
</span></b>
        <pre>(In reply to Matt Turner from <a href="show_bug.cgi?id=94477#c8">comment #8</a>)
<span class="quote">> (In reply to Tapani Pälli from <a href="show_bug.cgi?id=94477#c6">comment #6</a>)
> > Created <span class=""><a href="attachment.cgi?id=126170" name="attach_126170" title="fix">attachment 126170</a> <a href="attachment.cgi?id=126170&action=edit" title="fix">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=94477&attachment=126170'>[review]</a> [review] [review]
> > fix
> > 
> > This should result in same effect as the first experimentation, I will run
> > testing on this and if it works fine then I'll send it to mesa-dev mailing
> > list.

> That's pretty clever, but unfortunately it cannot work. Cases of dividing by
> zero, inf, nan, etc cannot be handled. We don't do this optimization in
> opt_algebraic for exactly that reason.</span >

right .. I knew there to be something missing as it was too good to be true :)

<span class="quote">> On top of that, the purpose of the test is to check whether you can compile
> a huge expression, and the one it uses is hilariously unrepresentative and
> prone to abuse by hacks like this one :)

> The test has uncovered real flaws in our compiler: GLSL IR's copy
> propagation runs in O(n^2), and the channel_expressions pass creates a huge
> number of expressions.

> Ken and I have spent time recently trying to handle the shader-db
> regressions by disabling channel_expressions. It's slow going and other
> tasks keep taking priority.

> The most direct way forward then, is to improve copy propagate's run time
> like I described in <a href="show_bug.cgi?id=94477#c3">comment 3</a>. Maybe you want to take a stab at replacing
> the linked lists in the pass with hash tables? I spent some time on it...
> maybe you'll have better luck. :)</span >

I made a wrapper class for 'acp' that internally uses hash table but provides
some methods of exec_list (just to easily experiment with this). I'm seeing
some performance gains but not nearly as big as with my hack. I'll try to do
the same for 'propagation_elements' and see if total effect would be big enough
to continue with this exercise.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>