1. 29 Jun, 2015 4 commits
    • Josh Bleecher Snyder's avatar
      [dev.ssa] cmd/compile/ssa: add comparison ops · 46815b9f
      Josh Bleecher Snyder authored
      Increase SSA coverage of functions in the
      standard library from 20.79% to 27.81%.
      
      The most significant unimplemented items are now:
      
       10.16%  2597 SSA unimplemented: zero for type error not implemented
        8.44%  2157 SSA unimplemented: addr: bad op DOTPTR
        7.98%  2039 SSA unimplemented: unhandled OLITERAL 7
        6.29%  1607 SSA unimplemented: unhandled expr OROR
        4.73%  1209 SSA unimplemented: unhandled expr LEN
        4.55%  1163 SSA unimplemented: unhandled expr LROT
        3.42%   874 SSA unimplemented: unhandled OLITERAL 6
        2.46%   629 SSA unimplemented: unhandled expr DOT
        2.41%   615 SSA unimplemented: zero for type []byte not implemented
        2.02%   516 SSA unimplemented: unhandled stmt CALLMETH
        1.90%   486 SSA unimplemented: unhandled expr ANDAND
        1.79%   458 SSA unimplemented: unhandled expr CALLINTER
        1.69%   433 SSA unimplemented: unhandled stmt SWITCH
        1.67%   428 SSA unimplemented: unhandled expr CALLMETH
        1.67%   426 SSA unimplemented: unhandled expr CLOSUREVAR
      
      Change-Id: I40959b22993c4f70784b4eca472cae752347879c
      Reviewed-on: https://go-review.googlesource.com/11452Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      46815b9f
    • Josh Bleecher Snyder's avatar
      [dev.ssa] cmd/compile/ssa: add nilcheckelim benchmarks · 1746e711
      Josh Bleecher Snyder authored
      These benchmarks demonstrate that
      the nilcheckelim pass is roughly O(n^2):
      
      BenchmarkNilCheckDeep1    	 2000000	       741 ns/op	   1.35 MB/s
      BenchmarkNilCheckDeep10   	 1000000	      2237 ns/op	   4.47 MB/s
      BenchmarkNilCheckDeep100  	   20000	     60713 ns/op	   1.65 MB/s
      BenchmarkNilCheckDeep1000 	     200	   7925198 ns/op	   0.13 MB/s
      BenchmarkNilCheckDeep10000	       1	1220104252 ns/op	   0.01 MB/s
      
      Profiling suggests that building the
      dominator tree is also O(n^2),
      and before size factors take over,
      considerably more expensive than nilcheckelim.
      
      Change-Id: If966b38ec52243a25f355dab871300d29db02e16
      Reviewed-on: https://go-review.googlesource.com/11520Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      1746e711
    • Josh Bleecher Snyder's avatar
      [dev.ssa] cmd/compile/ssa: refine type equality in cse · d9a704cd
      Josh Bleecher Snyder authored
      The correct way to compare gc.Types is Eqtype,
      rather than pointer equality.
      Introduce an Equal method for ssa.Type to allow
      us to use it.
      
      In the cse pass, use a type's string to build
      the coarse partition, and then use Type.Equal
      during refinement.
      
      This lets the cse pass do a better job.
      In the ~20% of the standard library that SSA
      can compile, the number of common subexpressions
      recognized by the cse pass increases from
      27,550 to 32,199 (+17%). The number of nil checks
      eliminated increases from 75 to 115 (+50%).
      
      Change-Id: I0bdbfcf613ca6bc2ec987eb19b6b1217b51f3008
      Reviewed-on: https://go-review.googlesource.com/11451Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      d9a704cd
    • Keith Randall's avatar
      [dev.ssa] cmd/compile/internal/gc: Fix constant shift generation · dbd83c44
      Keith Randall authored
      Change-Id: Ib142185de3f6e4d2f4983511c063492529d8fb8a
      Reviewed-on: https://go-review.googlesource.com/11656Reviewed-by: 's avatarMichael Matloob <michaelmatloob@gmail.com>
      dbd83c44
  2. 26 Jun, 2015 2 commits
  3. 25 Jun, 2015 1 commit
  4. 24 Jun, 2015 4 commits
  5. 21 Jun, 2015 1 commit
    • Josh Bleecher Snyder's avatar
      [dev.ssa] cmd/compile/ssa: separate logging, work in progress, and fatal errors · 8c6abfea
      Josh Bleecher Snyder authored
      The SSA implementation logs for three purposes:
      
      	* debug logging
      	* fatal errors
      	* unimplemented features
      
      Separating these three uses lets us attempt an SSA
      implementation for all functions, not just
      _ssa functions. This turns the entire standard
      library into a compilation test, and makes it
      easy to figure out things like
      "how much coverage does SSA have now" and
      "what should we do next to get more coverage?".
      
      Functions called _ssa are still special.
      They log profusely by default and
      the output of the SSA implementation
      is used. For all other functions,
      logging is off, and the implementation
      is built and discarded, due to lack of
      support for the runtime.
      
      While we're here, fix a few minor bugs and
      add some extra Unimplementeds to allow
      all.bash to pass.
      
      As of now, SSA handles 20.79% of the functions
      in the standard library (689 of 3314).
      
      The top missing features are:
      
       10.03%  2597 SSA unimplemented: zero for type error not implemented
        7.79%  2016 SSA unimplemented: addr: bad op DOTPTR
        7.33%  1898 SSA unimplemented: unhandled expr EQ
        6.10%  1579 SSA unimplemented: unhandled expr OROR
        4.91%  1271 SSA unimplemented: unhandled expr NE
        4.49%  1163 SSA unimplemented: unhandled expr LROT
        4.00%  1036 SSA unimplemented: unhandled expr LEN
        3.56%   923 SSA unimplemented: unhandled stmt CALLFUNC
        2.37%   615 SSA unimplemented: zero for type []byte not implemented
        1.90%   492 SSA unimplemented: unhandled stmt CALLMETH
        1.74%   450 SSA unimplemented: unhandled expr CALLINTER
        1.74%   450 SSA unimplemented: unhandled expr DOT
        1.71%   444 SSA unimplemented: unhandled expr ANDAND
        1.65%   426 SSA unimplemented: unhandled expr CLOSUREVAR
        1.54%   400 SSA unimplemented: unhandled expr CALLMETH
        1.51%   390 SSA unimplemented: unhandled stmt SWITCH
        1.47%   380 SSA unimplemented: unhandled expr CONV
        1.33%   345 SSA unimplemented: addr: bad op *
        1.30%   336 SSA unimplemented: unhandled OLITERAL 6
      
      Change-Id: I4ca07951e276714dc13c31de28640aead17a1be7
      Reviewed-on: https://go-review.googlesource.com/11160Reviewed-by: 's avatarKeith Randall <khr@golang.org>
      8c6abfea
  6. 17 Jun, 2015 3 commits
  7. 16 Jun, 2015 3 commits
  8. 15 Jun, 2015 1 commit
  9. 14 Jun, 2015 7 commits
  10. 12 Jun, 2015 2 commits
  11. 11 Jun, 2015 10 commits
  12. 10 Jun, 2015 2 commits