1. 27 Jul, 2021 7 commits
  2. 23 Jul, 2021 2 commits
    • Jason Ekstrand's avatar
      nir/lower_tex: Rework invalid implicit LOD lowering · 74ec2b12
      Jason Ekstrand authored
      Only fragment and some compute shaders support implicit derivatives.
      They're totally meaningless without helper invocations and some
      understanding of the dispatch pattern.  We've got code to lower
      nir_texop_tex in these shader stages to use an explicit derivative of 0
      but it was pretty badly broken:
      
       1. It only handled nir_texop_tex, not nir_texop_txb or nir_texop_lod.
      
       2. It didn't take min_lod into account
      
       3. It was conflated with adding a missing LOD parameter to opcodes
          which expect one such as nir_texop_txf.  While not really a bug,
          this does make it way harder to reason about the code.
      
       4. Unless you set a flag (which most drivers don't), it left the
          opcode nir_texop_tex instead of nir_texop_txl which it should have
          been.
      
      This reworks it to go through roughly the same path as other LOD
      lowering only with a constant lod of 0 instead of calling out to
      nir_texop_lod.  We also get rid of the lower_tex_without_implicit_lod
      flag because most drivers set it and those that don't are probably
      subtly broken.  If someone really wants to get nir_texop_tex in their
      vertex shaders, they can write a new patch to add the flag back in.
      
      Fixes: e382890e "nir: set default lod to texture opcodes that..."
      Fixes: d5ac5d6e
      
       "nir: Add option to lower tex to txl when..."
      Reviewed-by: Connor Abbott's avatarConnor Abbott <cwabbott0@gmail.com>
      Part-of: <mesa/mesa!11775>
      74ec2b12
    • Jason Ekstrand's avatar
      panfrost: Don't handle nir_texop_txf_ms_mcs · cdde108a
      Jason Ekstrand authored
      
      
      It's an intel-specific opcode and will never be seen on panfrost
      
      Reviewed-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Reviewed-by: Connor Abbott's avatarConnor Abbott <cwabbott0@gmail.com>
      Part-of: <mesa/mesa!11775>
      cdde108a
  3. 22 Jul, 2021 3 commits
  4. 18 Jul, 2021 7 commits
  5. 13 Jul, 2021 1 commit
    • Icecream95's avatar
      pan/bi: Create a nop clause when the shader starts with ATEST · 4531de48
      Icecream95 authored
      Otherwise there would be no clause with the dependencies needed for
      ATEST set, so the GPU would get stuck.
      
      Not needed on v7, as there shader_wait_dependency in the RSD will wait
      for the dependencies before the shader starts.
      
      Explicitly create a NOP instruction, as it is assumed that clauses
      have a non-zero count of instructions in various places.
      
      Fixes GPU timeouts in many applications, such as SuperTuxKart and
      GZDoom.
      
      Part-of: <mesa/mesa!11842>
      4531de48
  6. 12 Jul, 2021 9 commits
    • Alyssa Rosenzweig's avatar
      pan/bi: Add a bundling heuristic · ab2cd532
      Alyssa Rosenzweig authored
      
      
      Pick instructions locally that are likely to minimize nop's globally.
      Note the obvious greedy solution is ineffective. Instead the principle
      is to choose instructions which will increase _future_ scheduler
      freedom, on the assumption that means fewer nop's overall will be
      needed.
      
      There is no concern about register pressure and little concern about
      message timing, since this is post-RA and message ordering was fixed.
      
      total tuples in shared programs: 125304 -> 123770 (-1.22%)
      tuples in affected programs: 88301 -> 86767 (-1.74%)
      helped: 548
      HURT: 198
      helped stats (abs) min: 1.0 max: 31.0 x̄: 3.43 x̃: 2
      helped stats (rel) min: 0.33% max: 16.67% x̄: 3.09% x̃: 2.44%
      HURT stats (abs)   min: 1.0 max: 12.0 x̄: 1.73 x̃: 1
      HURT stats (rel)   min: 0.27% max: 11.11% x̄: 2.82% x̃: 2.35%
      95% mean confidence interval for tuples value: -2.39 -1.72
      95% mean confidence interval for tuples %-change: -1.77% -1.27%
      Tuples are helped.
      
      total clauses in shared programs: 26059 -> 25655 (-1.55%)
      clauses in affected programs: 10821 -> 10417 (-3.73%)
      helped: 311
      HURT: 42
      helped stats (abs) min: 1.0 max: 6.0 x̄: 1.44 x̃: 1
      helped stats (rel) min: 0.48% max: 16.00% x̄: 5.26% x̃: 5.00%
      HURT stats (abs)   min: 1.0 max: 2.0 x̄: 1.05 x̃: 1
      HURT stats (rel)   min: 2.13% max: 33.33% x̄: 7.49% x̃: 6.25%
      95% mean confidence interval for clauses value: -1.26 -1.02
      95% mean confidence interval for clauses %-change: -4.28% -3.21%
      Clauses are helped.
      
      total cycles in shared programs: 12154.79 -> 12114.83 (-0.33%)
      cycles in affected programs: 1907.63 -> 1867.67 (-2.09%)
      helped: 227
      HURT: 99
      helped stats (abs) min: 0.041665999999999315 max: 1.2083360000000027 x̄: 0.22 x̃: 0
      helped stats (rel) min: 0.36% max: 20.00% x̄: 4.14% x̃: 3.85%
      HURT stats (abs)   min: 0.041665999999999315 max: 0.5 x̄: 0.09 x̃: 0
      HURT stats (rel)   min: 0.28% max: 9.09% x̄: 2.75% x̃: 2.63%
      95% mean confidence interval for cycles value: -0.15 -0.09
      95% mean confidence interval for cycles %-change: -2.51% -1.59%
      Cycles are helped.
      
      total arith in shared programs: 4658.13 -> 4603.42 (-1.17%)
      arith in affected programs: 3449.83 -> 3395.12 (-1.59%)
      helped: 509
      HURT: 249
      helped stats (abs) min: 0.041665999999999315 max: 1.2083360000000027 x̄: 0.14 x̃: 0
      helped stats (rel) min: 0.36% max: 20.00% x̄: 3.56% x̃: 2.63%
      HURT stats (abs)   min: 0.041665999999999315 max: 0.5 x̄: 0.07 x̃: 0
      HURT stats (rel)   min: 0.28% max: 25.00% x̄: 3.32% x̃: 2.27%
      95% mean confidence interval for arith value: -0.09 -0.06
      95% mean confidence interval for arith %-change: -1.64% -0.97%
      Arith are helped.
      
      total quadwords in shared programs: 111394 -> 110114 (-1.15%)
      quadwords in affected programs: 78074 -> 76794 (-1.64%)
      helped: 503
      HURT: 204
      helped stats (abs) min: 1.0 max: 43.0 x̄: 3.33 x̃: 2
      helped stats (rel) min: 0.41% max: 13.79% x̄: 3.02% x̃: 2.44%
      HURT stats (abs)   min: 1.0 max: 26.0 x̄: 1.94 x̃: 1
      HURT stats (rel)   min: 0.48% max: 7.55% x̄: 2.44% x̃: 2.22%
      95% mean confidence interval for quadwords value: -2.16 -1.46
      95% mean confidence interval for quadwords %-change: -1.67% -1.21%
      Quadwords are helped.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
      Part-of: <mesa/mesa!10961>
      ab2cd532
    • Alyssa Rosenzweig's avatar
      pan/bi: Calculate dependency graph when bundling · 59966220
      Alyssa Rosenzweig authored
      
      
      Code is ported from Midgard, modified to be scalar, post-RA, and to put
      the arrays on the worklist instead of the instruction to save memory.
      This enables out-of-order scheduling.
      
      total tuples in shared programs: 128691 -> 125304 (-2.63%)
      tuples in affected programs: 114091 -> 110704 (-2.97%)
      helped: 844
      HURT: 377
      helped stats (abs) min: 1.0 max: 150.0 x̄: 4.88 x̃: 3
      helped stats (rel) min: 0.30% max: 26.42% x̄: 5.56% x̃: 4.35%
      HURT stats (abs)   min: 1.0 max: 8.0 x̄: 1.94 x̃: 1
      HURT stats (rel)   min: 0.20% max: 33.33% x̄: 6.84% x̃: 3.23%
      95% mean confidence interval for tuples value: -3.16 -2.38
      95% mean confidence interval for tuples %-change: -2.19% -1.27%
      Tuples are helped.
      
      total clauses in shared programs: 27579 -> 26059 (-5.51%)
      clauses in affected programs: 20606 -> 19086 (-7.38%)
      helped: 941
      HURT: 39
      helped stats (abs) min: 1.0 max: 21.0 x̄: 1.66 x̃: 1
      helped stats (rel) min: 0.69% max: 44.44% x̄: 10.48% x̃: 9.09%
      HURT stats (abs)   min: 1.0 max: 2.0 x̄: 1.15 x̃: 1
      HURT stats (rel)   min: 1.89% max: 10.00% x̄: 4.73% x̃: 4.55%
      95% mean confidence interval for clauses value: -1.63 -1.47
      95% mean confidence interval for clauses %-change: -10.27% -9.48%
      Clauses are helped.
      
      total cycles in shared programs: 12262.54 -> 12154.79 (-0.88%)
      cycles in affected programs: 2210.54 -> 2102.79 (-4.87%)
      helped: 374
      HURT: 56
      helped stats (abs) min: 0.041665999999999315 max: 6.25 x̄: 0.30 x̃: 0
      helped stats (rel) min: 0.42% max: 26.00% x̄: 6.90% x̃: 7.14%
      HURT stats (abs)   min: 0.041665999999999315 max: 0.5833319999999986 x̄: 0.11 x̃: 0
      HURT stats (rel)   min: 0.16% max: 100.00% x̄: 55.17% x̃: 50.00%
      95% mean confidence interval for cycles value: -0.29 -0.21
      95% mean confidence interval for cycles %-change: -1.37% 3.73%
      Inconclusive result (%-change mean confidence interval includes 0).
      
      total arith in shared programs: 4852.29 -> 4658.13 (-4.00%)
      arith in affected programs: 4525.17 -> 4331 (-4.29%)
      helped: 1112
      HURT: 166
      helped stats (abs) min: 0.041665999999999315 max: 6.25 x̄: 0.19 x̃: 0
      helped stats (rel) min: 0.42% max: 33.33% x̄: 6.59% x̃: 5.36%
      HURT stats (abs)   min: 0.041665999999999315 max: 0.5833319999999986 x̄: 0.07 x̃: 0
      HURT stats (rel)   min: 0.16% max: 100.00% x̄: 25.05% x̃: 2.40%
      95% mean confidence interval for arith value: -0.17 -0.14
      95% mean confidence interval for arith %-change: -3.44% -1.51%
      Arith are helped.
      
      total quadwords in shared programs: 117141 -> 111394 (-4.91%)
      quadwords in affected programs: 104390 -> 98643 (-5.51%)
      helped: 1245
      HURT: 76
      helped stats (abs) min: 1.0 max: 69.0 x̄: 4.74 x̃: 4
      helped stats (rel) min: 0.28% max: 35.00% x̄: 7.88% x̃: 6.45%
      HURT stats (abs)   min: 1.0 max: 8.0 x̄: 2.01 x̃: 1
      HURT stats (rel)   min: 0.20% max: 10.00% x̄: 3.52% x̃: 4.25%
      95% mean confidence interval for quadwords value: -4.61 -4.09
      95% mean confidence interval for quadwords %-change: -7.56% -6.88%
      Quadwords are helped.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
      Part-of: <mesa/mesa!10961>
      59966220
    • Alyssa Rosenzweig's avatar
      pan/bi: Handle 4-src instructions in scheduler · e46ec44a
      Alyssa Rosenzweig authored
      
      
      Spill to a move. This allows us to emit SHADDX and general CSEL.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!10961>
      e46ec44a
    • Alyssa Rosenzweig's avatar
      pan/bi: Add bi_before_tuple convenience method · 20e11cbb
      Alyssa Rosenzweig authored
      
      
      For constructing instructions during scheduling.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!10961>
      20e11cbb
    • Alyssa Rosenzweig's avatar
      pan/bi: Handle multiple destinations in scheduler · c53f3777
      Alyssa Rosenzweig authored
      
      
      Needed for correct handling of pseudo ops like SHADDX and CUBEFACE
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!10961>
      c53f3777
    • Alyssa Rosenzweig's avatar
      pan/bi: Do helper termination analysis on clauses · 6bf8e960
      Alyssa Rosenzweig authored
      
      
      Unlike the dependency analysis for the skip bits which is a function of
      the data flow graph, the thread termination analysis is dependent on the
      actual sequence of instructions. As such, it must be done after
      scheduling to be correct in the presence of out-of-order scheduling.
      
      Furthermore it's specified in terms of clauses, not instructions.
      Reflecting this in our code gets a nice simplification. As a side effect
      this puts extra td flags on subsequent clauses, which matches the DDK's
      behaviour. (Maybe td is just a hint?)
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!10961>
      6bf8e960
    • Alyssa Rosenzweig's avatar
      pan/bi: Update ins->link after scheduling · 0515c6a3
      Alyssa Rosenzweig authored
      
      
      Otherwise foreach_instr and friends will be subtly wrong. None of our
      current passes rely on this but it's a footgun.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!10961>
      0515c6a3
    • Alyssa Rosenzweig's avatar
      522020e6
    • Alyssa Rosenzweig's avatar
      pan/bi: Refuse to CSE non-SSA sources · 3e9411a7
      Alyssa Rosenzweig authored
      
      
      They might have changed in between.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!10961>
      3e9411a7
  7. 09 Jul, 2021 11 commits
    • Alyssa Rosenzweig's avatar
      pan/bi: Don't lower fpow · 49939770
      Alyssa Rosenzweig authored
      
      
      We can fuse the intermediate multiply with the FMA_RSCALE in the
      exponent code and save an instruction. Whether this is better than
      adding a NIR op remains to be seen.
      
      total instructions in shared programs: 146614 -> 146190 (-0.29%)
      instructions in affected programs: 40724 -> 40300 (-1.04%)
      helped: 157
      HURT: 0
      helped stats (abs) min: 1.0 max: 9.0 x̄: 2.70 x̃: 2
      helped stats (rel) min: 0.22% max: 10.34% x̄: 1.37% x̃: 1.20%
      95% mean confidence interval for instructions value: -3.00 -2.40
      95% mean confidence interval for instructions %-change: -1.58% -1.15%
      Instructions are helped.
      
      total tuples in shared programs: 128116 -> 127696 (-0.33%)
      tuples in affected programs: 33421 -> 33001 (-1.26%)
      helped: 150
      HURT: 0
      helped stats (abs) min: 1.0 max: 16.0 x̄: 2.80 x̃: 2
      helped stats (rel) min: 0.28% max: 4.37% x̄: 1.36% x̃: 1.07%
      95% mean confidence interval for tuples value: -3.24 -2.36
      95% mean confidence interval for tuples %-change: -1.50% -1.21%
      Tuples are helped.
      
      total clauses in shared programs: 27531 -> 27483 (-0.17%)
      clauses in affected programs: 719 -> 671 (-6.68%)
      helped: 20
      HURT: 0
      helped stats (abs) min: 1.0 max: 8.0 x̄: 2.40 x̃: 1
      helped stats (rel) min: 1.61% max: 12.90% x̄: 6.96% x̃: 5.33%
      95% mean confidence interval for clauses value: -3.48 -1.32
      95% mean confidence interval for clauses %-change: -9.10% -4.82%
      Clauses are helped.
      
      total cycles in shared programs: 12250.81 -> 12233.69 (-0.14%)
      cycles in affected programs: 1251.50 -> 1234.38 (-1.37%)
      helped: 141
      HURT: 0
      helped stats (abs) min: 0.041665999999999315 max: 0.6666670000000003 x̄: 0.12 x̃: 0
      helped stats (rel) min: 0.29% max: 5.00% x̄: 1.48% x̃: 1.20%
      95% mean confidence interval for cycles value: -0.14 -0.10
      95% mean confidence interval for cycles %-change: -1.63% -1.32%
      Cycles are helped.
      
      total arith in shared programs: 4840.25 -> 4822.71 (-0.36%)
      arith in affected programs: 1324.08 -> 1306.54 (-1.32%)
      helped: 151
      HURT: 0
      helped stats (abs) min: 0.041665999999999315 max: 0.6666670000000003 x̄: 0.12 x̃: 0
      helped stats (rel) min: 0.29% max: 5.00% x̄: 1.43% x̃: 1.13%
      95% mean confidence interval for arith value: -0.13 -0.10
      95% mean confidence interval for arith %-change: -1.59% -1.28%
      Arith are helped.
      
      total texture in shared programs: 1666.50 -> 1666.50 (0.00%)
      texture in affected programs: 0 -> 0
      helped: 0
      HURT: 0
      
      total vary in shared programs: 639.06 -> 639.06 (0.00%)
      vary in affected programs: 0 -> 0
      helped: 0
      HURT: 0
      
      total ldst in shared programs: 9682 -> 9682 (0.00%)
      ldst in affected programs: 0 -> 0
      helped: 0
      HURT: 0
      
      total quadwords in shared programs: 116758 -> 116378 (-0.33%)
      quadwords in affected programs: 28054 -> 27674 (-1.35%)
      helped: 148
      HURT: 2
      helped stats (abs) min: 1.0 max: 16.0 x̄: 2.58 x̃: 2
      helped stats (rel) min: 0.29% max: 5.13% x̄: 1.54% x̃: 1.23%
      HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      HURT stats (rel)   min: 0.67% max: 0.85% x̄: 0.76% x̃: 0.76%
      95% mean confidence interval for quadwords value: -2.94 -2.12
      95% mean confidence interval for quadwords %-change: -1.69% -1.33%
      Quadwords are helped.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      49939770
    • Alyssa Rosenzweig's avatar
      pan/bi: Factor out exp2/log2 code · 91f130fa
      Alyssa Rosenzweig authored
      
      
      Will be reused for fpow.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      91f130fa
    • Alyssa Rosenzweig's avatar
      0991e959
    • Alyssa Rosenzweig's avatar
      pan/bi: Simplify cube map descriptor generation · 297ac6e4
      Alyssa Rosenzweig authored
      
      
      We don't need to do the bitwise manipulation ourselves, we can just use
      a bitwise MUX instead.
      
      total instructions in shared programs: 146840 -> 146614 (-0.15%)
      instructions in affected programs: 15037 -> 14811 (-1.50%)
      helped: 109
      HURT: 0
      helped stats (abs) min: 2.0 max: 4.0 x̄: 2.07 x̃: 2
      helped stats (rel) min: 0.86% max: 4.00% x̄: 1.70% x̃: 1.77%
      95% mean confidence interval for instructions value: -2.15 -2.00
      95% mean confidence interval for instructions %-change: -1.81% -1.59%
      Instructions are helped.
      
      total tuples in shared programs: 128149 -> 128116 (-0.03%)
      tuples in affected programs: 2896 -> 2863 (-1.14%)
      helped: 16
      HURT: 0
      helped stats (abs) min: 1.0 max: 5.0 x̄: 2.06 x̃: 1
      helped stats (rel) min: 0.65% max: 2.33% x̄: 1.16% x̃: 0.70%
      95% mean confidence interval for tuples value: -3.01 -1.12
      95% mean confidence interval for tuples %-change: -1.50% -0.83%
      Tuples are helped.
      
      total cycles in shared programs: 12257.10 -> 12250.81 (-0.05%)
      cycles in affected programs: 449.87 -> 443.58 (-1.40%)
      helped: 92
      HURT: 0
      helped stats (abs) min: 0.0416660000000002 max: 0.20833400000000069 x̄: 0.07 x̃: 0
      helped stats (rel) min: 0.93% max: 2.53% x̄: 1.40% x̃: 1.26%
      95% mean confidence interval for cycles value: -0.08 -0.06
      95% mean confidence interval for cycles %-change: -1.48% -1.32%
      Cycles are helped.
      
      total arith in shared programs: 4847.33 -> 4840.25 (-0.15%)
      arith in affected programs: 490.37 -> 483.29 (-1.44%)
      helped: 109
      HURT: 0
      helped stats (abs) min: 0.0416660000000002 max: 0.20833400000000069 x̄: 0.06 x̃: 0
      helped stats (rel) min: 0.93% max: 5.56% x̄: 1.51% x̃: 1.26%
      95% mean confidence interval for arith value: -0.07 -0.06
      95% mean confidence interval for arith %-change: -1.64% -1.39%
      Arith are helped.
      
      total quadwords in shared programs: 116775 -> 116758 (-0.01%)
      quadwords in affected programs: 1331 -> 1314 (-1.28%)
      helped: 7
      HURT: 0
      helped stats (abs) min: 1.0 max: 4.0 x̄: 2.43 x̃: 3
      helped stats (rel) min: 0.91% max: 2.38% x̄: 1.65% x̃: 1.39%
      95% mean confidence interval for quadwords value: -3.48 -1.38
      95% mean confidence interval for quadwords %-change: -2.27% -1.04%
      Quadwords are helped.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      297ac6e4
    • Alyssa Rosenzweig's avatar
      pan/bi: Workaround widen restrictions on +FADD.f32 · 94b9bce4
      Alyssa Rosenzweig authored
      
      
      We can use *FADD.f32 for these cases.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      94b9bce4
    • Alyssa Rosenzweig's avatar
      pan/bi: Add a constant subexpression elimination pass · 99b2ddde
      Alyssa Rosenzweig authored
      
      
      ALU only. Intended to clean up the lowerings used with complex
      texturings. Ex: if a shader reads two cube maps at the same coordinates,
      this deduplicates the cube map transformation.
      
      This needs to happen in the backend since we do the cube map
      transformation with the backend builder, rather than special NIR ops.
      This is a tradeoff.
      
      Pass based on ir3's, which in turn is inspired by NIR's.
      
      total instructions in shared programs: 148799 -> 147348 (-0.98%)
      instructions in affected programs: 20509 -> 19058 (-7.07%)
      helped: 145
      HURT: 0
      helped stats (abs) min: 4.0 max: 30.0 x̄: 10.01 x̃: 8
      helped stats (rel) min: 1.92% max: 54.55% x̄: 10.87% x̃: 7.41%
      95% mean confidence interval for instructions value: -10.73 -9.28
      95% mean confidence interval for instructions %-change: -12.81% -8.94%
      Instructions are helped.
      
      total tuples in shared programs: 129992 -> 128908 (-0.83%)
      tuples in affected programs: 17624 -> 16540 (-6.15%)
      helped: 145
      HURT: 0
      helped stats (abs) min: 2.0 max: 25.0 x̄: 7.48 x̃: 7
      helped stats (rel) min: 0.74% max: 42.86% x̄: 9.16% x̃: 7.22%
      95% mean confidence interval for tuples value: -7.96 -6.99
      95% mean confidence interval for tuples %-change: -10.52% -7.79%
      Tuples are helped.
      
      total clauses in shared programs: 27632 -> 27582 (-0.18%)
      clauses in affected programs: 1077 -> 1027 (-4.64%)
      helped: 44
      HURT: 0
      helped stats (abs) min: 1.0 max: 3.0 x̄: 1.14 x̃: 1
      helped stats (rel) min: 2.50% max: 16.67% x̄: 4.99% x̃: 4.45%
      95% mean confidence interval for clauses value: -1.26 -1.01
      95% mean confidence interval for clauses %-change: -5.70% -4.27%
      Clauses are helped.
      
      total cycles in shared programs: 12323 -> 12285.63 (-0.30%)
      cycles in affected programs: 618.25 -> 580.88 (-6.05%)
      helped: 120
      HURT: 0
      helped stats (abs) min: 0.08333299999999966 max: 0.5416680000000014 x̄: 0.31 x̃: 0
      helped stats (rel) min: 0.77% max: 66.67% x̄: 7.60% x̃: 7.37%
      95% mean confidence interval for cycles value: -0.33 -0.29
      95% mean confidence interval for cycles %-change: -8.73% -6.47%
      Cycles are helped.
      
      total arith in shared programs: 4916.75 -> 4866.88 (-1.01%)
      arith in affected programs: 677.79 -> 627.92 (-7.36%)
      helped: 145
      HURT: 0
      helped stats (abs) min: 0.08333299999999966 max: 1.0833329999999997 x̄: 0.34 x̃: 0
      helped stats (rel) min: 0.77% max: 66.67% x̄: 12.81% x̃: 7.87%
      95% mean confidence interval for arith value: -0.37 -0.32
      95% mean confidence interval for arith %-change: -15.33% -10.29%
      Arith are helped.
      
      total quadwords in shared programs: 118117 -> 117262 (-0.72%)
      quadwords in affected programs: 15283 -> 14428 (-5.59%)
      helped: 143
      HURT: 0
      helped stats (abs) min: 1.0 max: 23.0 x̄: 5.98 x̃: 5
      helped stats (rel) min: 0.44% max: 25.71% x̄: 7.56% x̃: 5.56%
      95% mean confidence interval for quadwords value: -6.46 -5.50
      95% mean confidence interval for quadwords %-change: -8.59% -6.53%
      Quadwords are helped.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      99b2ddde
    • Alyssa Rosenzweig's avatar
      pan/bi: Fuse LD_VAR+TEXS_2D -> VAR_TEX · f35d0fb0
      Alyssa Rosenzweig authored
      
      
      When the LD_VAR is only used once as an input to a texture instruction,
      this is an improvement. We handle this case as a backwards pass.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      f35d0fb0
    • Alyssa Rosenzweig's avatar
      pan/bi: Analyze helper invocations · 3fef3b6a
      Alyssa Rosenzweig authored
      
      
      Set the .skip bit on texture instructions and the terminate discarded
      threads bit on the clause header based on data flow analysis of helper
      invocations. This code is adapted from Midgard, which requires the same
      analysis with a few details changed.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      3fef3b6a
    • Alyssa Rosenzweig's avatar
      pan/bi: Track LOD mode even for TEXC · 134c74e3
      Alyssa Rosenzweig authored
      
      
      Redundant with the texture operation descriptor, but we don't want to
      parse that in the rest of the compiler. Handling it as a pseudo-modifier
      lets us share a code path with TEXS.
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      134c74e3
    • Alyssa Rosenzweig's avatar
      pan/bi: Report cycle counts · b7ca1252
      Alyssa Rosenzweig authored
      
      
      Based on analysis of results from the Mali Offline Compiler. I am
      uncertain how well these translate to real life, and they are
      normalized counts only...
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      b7ca1252
    • Alyssa Rosenzweig's avatar
      pan/bi: Only spill nodes that could progress in RA · a38ad8ec
      Alyssa Rosenzweig authored
      
      
      This reduces number of spills and hence compile-time by avoiding
      pointless decisions. In a terrain shader forced to use full threads:
      
      Before: 39:168 spills:fills
      After: 23:127 spills:fills
      
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!11733>
      a38ad8ec