OSDN Git Service

nir: Do opt_algebraic in reverse order.
authorMatt Turner <mattst88@gmail.com>
Thu, 4 Feb 2016 20:04:42 +0000 (12:04 -0800)
committerMatt Turner <mattst88@gmail.com>
Tue, 9 Feb 2016 04:38:17 +0000 (20:38 -0800)
commit7be8d07732295bd546130d9c8c8fb8ff64490686
treee3177f7085e621cecc079b9c9699a06ef1525e32
parenta8f0960816e868783d56edac1851a6d218e09c5a
nir: Do opt_algebraic in reverse order.

Walking the SSA definitions in order means that we consider the smallest
algebraic optimizations before larger optimizations. So if a smaller
rule is part of a larger rule, the smaller one will happen first,
preventing the larger one from happening.

instructions in affected programs: 32721 -> 32611 (-0.34%)
helped: 106

In programs whose nir_optimize loop count changes (129 of them):

   before:  1164 optimization loops
   after:   1071 optimization loops

Of the 129 affected, 16 programs' optimization loop counts increased.

Prevents regressions and annoyances in the next commits.

Reviewed-by: Eduardo Lima Mitev <elima@igalia.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/compiler/nir/nir_algebraic.py