<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#c3">Comment # 3</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:mattst88@gmail.com" title="Matt Turner <mattst88@gmail.com>"> <span class="fn">Matt Turner</span></a>
</span></b>
        <pre>I've come back to this recently.

The first problem appears to be in the do_copy_propagation() pass.
visit_leave(ir_assignment *) calls kill(), and kill() does a linked-list walk
across many thousands of elements in the "ACP". visit_leave() executes for each
assignment. Printing the list length in kill() shows it to continually
increase, so I'm not sure if replacing the ACP with a different data structure
is sufficient or if there is another bug...

Replacing the ACP with a hash table, for instance, isn't completely
straightforward, because we need to be able to look up entries by "lhs", of
which there only may be one, and "rhs", of which there may be many (or none).

do_copy_propagation_elements() suffers from the same problem.

But neither of these would be a problem if we didn't call
brw_do_channel_expressions(). It makes a huge mess of the program, massively
increasing the number of assignments.

Removing it has been something we want to do for a long time, but we aren't
there yet because it actually hurts programs in our shader-db if we remove it.</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>