1. 24 Jun, 2015 2 commits
    • Josh Bleecher Snyder's avatar
      [dev.ssa] cmd/compile/ssa: fix build · 44be0e9c
      Josh Bleecher Snyder authored
      Somehow I missed this in CL 11160.
      Without it, all.bash fails on fixedbugs/bug303.go.
      
      The right fix is probably to discard the variable
      and keep going, even though the code is dead.
      
      For now, defer the decision by declaring
      such situations unimplemented and get the build
      fixed.
      
      Change-Id: I679197f780c7a3d3eb7d05e91c86a4cdc3b70131
      Reviewed-on: https://go-review.googlesource.com/11440Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
      44be0e9c
    • Josh Bleecher Snyder's avatar
      [dev.ssa] cmd/compile/ssa: add nilcheckelim pass · 2a846d2b
      Josh Bleecher Snyder authored
      The nilcheckelim pass eliminates unnecessary nil checks.
      The initial implementation removes redundant nil checks.
      See the comments in nilcheck.go for ideas for future
      improvements.
      
      The efficacy of the cse pass has a significant impact
      on this efficacy of this pass.
      
      There are 886 nil checks in the parts of the standard
      library that SSA can currently compile (~20%).
      
      This pass eliminates 75 (~8.5%) of them.
      
      As a data point, with a more aggressive but unsound
      cse pass that treats many more types as identical,
      this pass eliminates 115 (~13%) of the nil checks.
      
      Change-Id: I13e567a39f5f6909fc33434d55c17a7e3884a704
      Reviewed-on: https://go-review.googlesource.com/11430Reviewed-by: 's avatarAlan Donovan <adonovan@google.com>
      2a846d2b
  2. 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
  3. 17 Jun, 2015 3 commits
  4. 16 Jun, 2015 3 commits
  5. 15 Jun, 2015 1 commit
  6. 14 Jun, 2015 7 commits
  7. 12 Jun, 2015 2 commits
  8. 11 Jun, 2015 10 commits
  9. 10 Jun, 2015 7 commits
  10. 09 Jun, 2015 4 commits