1. 08 Apr, 2019 1 commit
  2. 07 Apr, 2019 1 commit
  3. 05 Apr, 2019 13 commits
  4. 04 Apr, 2019 5 commits
  5. 03 Apr, 2019 15 commits
  6. 02 Apr, 2019 3 commits
  7. 01 Apr, 2019 2 commits
    • Eliminate Intermediate::replace() · 459453a9
      Nicolas Capens authored
      With Reactor variables now merely tracking the last assigned rvalue if
      used within a single basic block, we can avoid the unsafe replace()
      operation on SpirvShader::Intermediate.
      
      This effectively reverts
      https://swiftshader-review.googlesource.com/c/SwiftShader/+/27769
      
      Bug b/129356087
      Bug b/128527271
      
      Change-Id: Ibfafc6960ac7e10b898ff8804752b928a7fc1988
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/28109Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
      Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
    • Elide single basic block variable materialization · 0192d15d
      Nicolas Capens authored
      Variables which are only used within a single basic block and don't
      have their address taken, don't require allocating stack memory.
      Instead they can track the latest rvalue that has been assigned to them.
      Allocating stack memory is necessary for variables that are assigned to
      in divergent basic blocks since there is no single rvalue to track after
      the merge point (unless we inserted phi instructions, but that is
      outside of the scope of this change).
      
      Because Reactor can't look forward to check whether a variable will be
      used in divergent basic blocks, we keep the set of variables that may
      not have been materialized yet, meaning they have no stack address yet.
      When a branch is encountered, they are all materialized.
      
      Variables not yet materialized at a Return() are 'killed' to prevent
      materializing afterwards, which would cause the terminator ret
      instruction to not be the last instruction of the basic block.
      
      Note that this change creates a dependency of the Nucleus
      implementation on Variable, which is currently defined in a higher
      layer in Reactor.hpp. Since Variable doesn't depend on anything else
      in Reactor.hpp it could be made part of Nucleus, or an in-between
      layer could be added.
      
      Bug b/129356087
      
      Change-Id: Ie8c09e34c8befb9787a5c0bca7a20e770bcbf8d3
      Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27928Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
      Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
      Reviewed-by: 's avatarBen Clayton <bclayton@google.com>