1. 11 Jul, 2015 2 commits
    • Josh Bleecher Snyder's avatar
      [dev.ssa] cmd/compile/ssa: handle nested dead blocks · 9b048527
      Josh Bleecher Snyder authored
      removePredecessor can change which blocks are live.
      However, it cannot remove dead blocks from the function's
      slice of blocks because removePredecessor may have been
      called from within a function doing a walk of the blocks.
      
      CL 11879 did not handle this correctly and broke the build.
      
      To fix this, mark the block as dead but leave its actual
      removal for a deadcode pass. Blocks that are dead must have
      no successors, predecessors, values, or control values,
      so they will generally be ignored by other passes.
      To be safe, we add a deadcode pass after the opt pass,
      which is the only other pass that calls removePredecessor.
      
      Two alternatives that I considered and discarded:
      
      (1) Make all call sites aware of the fact that removePrecessor
      might make arbitrary changes to the list of blocks. This
      will needlessly complicate callers.
      
      (2) Handle the things that can go wrong in practice when
      we encounter a dead-but-not-removed block. CL 11930 takes
      this approach (and the tests are stolen from that CL).
      However, this is just patching over the problem.
      
      Change-Id: Icf0687b0a8148ce5e96b2988b668804411b05bd8
      Reviewed-on: https://go-review.googlesource.com/12004Reviewed-by: default avatarTodd Neal <todd@tneal.org>
      Reviewed-by: default avatarMichael Matloob <michaelmatloob@gmail.com>
      9b048527
    • Josh Bleecher Snyder's avatar
      [dev.ssa] cmd/compile/ssa: print lazily · 9201c86b
      Josh Bleecher Snyder authored
      Reduces 'go run run.go 64bit.go' from 23s to 8s on my machine.
      
      Change-Id: Ie5b642d0abb56e8eb3899d69472bc88a85a1c985
      Reviewed-on: https://go-review.googlesource.com/12023Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      9201c86b
  2. 10 Jul, 2015 1 commit
  3. 07 Jul, 2015 1 commit
    • Todd Neal's avatar
      [dev.ssa] cmd/compile/ssa: dominator tests and benchmarks · 41dafe6e
      Todd Neal authored
      This change has some tests verifying functionality and an assortment of
      benchmarks of various block lists. It modifies NewBlock to allocate in
      contiguous blocks improving the performance of intersect() for extremely
      large graphs by 30-40%.
      
      benchmark                           old ns/op      new ns/op     delta
      BenchmarkDominatorsLinear-8         1185619        901154        -23.99%
      BenchmarkDominatorsFwdBack-8        1302138        863537        -33.68%
      BenchmarkDominatorsManyPred-8       404670521      247450911     -38.85%
      BenchmarkDominatorsMaxPred-8        455809002      471675119     +3.48%
      BenchmarkDominatorsMaxPredVal-8     819315864      468257300     -42.85%
      
      BenchmarkNilCheckDeep1-8            766            706           -7.83%
      BenchmarkNilCheckDeep10-8           2553           2209          -13.47%
      BenchmarkNilCheckDeep100-8          58606          57545         -1.81%
      BenchmarkNilCheckDeep1000-8         7753012        8025750       +3.52%
      BenchmarkNilCheckDeep10000-8        1224165946     789995184     -35.47%
      
      Change-Id: Id3d6bc9cb1138e8177934441073ac7873ddf7ade
      Reviewed-on: https://go-review.googlesource.com/11716Reviewed-by: default avatarKeith Randall <khr@golang.org>
      41dafe6e
  4. 06 Jul, 2015 1 commit
  5. 05 Jul, 2015 5 commits
  6. 02 Jul, 2015 1 commit
  7. 01 Jul, 2015 5 commits
  8. 30 Jun, 2015 18 commits
  9. 29 Jun, 2015 6 commits