6155N/APatch status: Solaris-specific; not suitable for upstream
6155N/A@@ -976,8 +976,15 @@ int flush;
6155N/A- state->lens[state->have++] = (unsigned short)len;
6155N/A+ // state->lens[state->have++] = (unsigned short)len;
6155N/A+ unsigned state_have=state->have; // Make local copy of state->have to eliminate RAW
6155N/A+ // Change from while to for loop and make local copy of "copy" so it can be unrolled:
6155N/A+ for (unsigned copy_copy=copy; copy_copy>0; copy_copy--, (state_have)++) {
6155N/A+ state->lens[state_have] = (unsigned short)len;
6155N/A+ state->have = state_have; // Copy back value
6155N/A /* replicate for those indices with low len bits equal to huff */
6155N/A+ // KPG: Create local variables so the compiler won't access via a pointer
6155N/A min = fill; /* save offset to next table */
6155N/A- next[(huff >> drop) + fill] = here;
6155N/A+ //next[(huff >> drop) + fill] = here; // RAW read
6155N/A+ // Instead of the above, storing individual elements eliminates RAW:
6155N/A+ next[(huff >> drop) + fill].op = op_copy;
6155N/A+ next[(huff >> drop) + fill].bits = bits_copy;
6155N/A+ next[(huff >> drop) + fill].val = val_copy;
6155N/A /* backwards increment the len-bit code huff */