summaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/TODO
Commit message (Collapse)AuthorAgeFilesLines
* cmd/compile: update SSA TODO fileKeith Randall2018-04-241-26/+4
| | | | | | | | Get rid of a bunch of stuff we've already done. Change-Id: Ibae4be7535ddb58590a072a2390c5f3e948c2fd7 Reviewed-on: https://go-review.googlesource.com/109136 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* cmd/compile/internal/ssa: use Compare instead of EqualJosh Bleecher Snyder2016-04-171-2/+0
| | | | | | | | | | | | | | | They have different semantics. Equal is stricter and is designed for the front-end. Compare is looser and cheaper and is designed for the back-end. To avoid possible regression, remove Equal from ssa.Type. Updates #15043 Change-Id: Ie23ce75ff6b4d01b7982e0a89e6f81b5d099d8d6 Reviewed-on: https://go-review.googlesource.com/21483 Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
* cmd/compile: modify regalloc/stackalloc to use the cmd line debug argsTodd Neal2016-03-111-0/+1
| | | | | | | | | | | Change the existing flags from compile time consts to be configurable from the command line. Change-Id: I4aab4bf3dfcbdd8e2b5a2ff51af95c2543967769 Reviewed-on: https://go-review.googlesource.com/20560 Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
* cmd/compile: preallocate storage for three Value argsJosh Bleecher Snyder2016-03-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | benchstat master2 arg3b name old time/op new time/op delta Template 441ms ± 4% 444ms ± 6% ~ (p=0.335 n=22+25) GoTypes 1.51s ± 2% 1.51s ± 2% ~ (p=0.129 n=25+21) Compiler 5.59s ± 1% 5.56s ± 2% -0.65% (p=0.001 n=24+21) name old alloc/op new alloc/op delta Template 85.6MB ± 0% 85.3MB ± 0% -0.40% (p=0.000 n=25+24) GoTypes 307MB ± 0% 305MB ± 0% -0.38% (p=0.000 n=25+25) Compiler 1.06GB ± 0% 1.05GB ± 0% -0.43% (p=0.000 n=25+25) name old allocs/op new allocs/op delta Template 1.10M ± 0% 1.09M ± 0% -1.04% (p=0.000 n=25+25) GoTypes 3.36M ± 0% 3.32M ± 0% -1.13% (p=0.000 n=25+24) Compiler 13.0M ± 0% 12.9M ± 0% -1.12% (p=0.000 n=25+25) Change-Id: I1280b846e895c00b95bb6664958a7765bd819610 Reviewed-on: https://go-review.googlesource.com/20296 Reviewed-by: Keith Randall <khr@golang.org>
* cmd/compile: cache const nil, iface, slice, and ""Josh Bleecher Snyder2016-03-081-1/+0
| | | | | | | | | | | | | | | | | | | | | | | name old time/op new time/op delta Template 441ms ± 4% 446ms ± 4% +1.23% (p=0.048 n=22+25) GoTypes 1.51s ± 2% 1.51s ± 2% ~ (p=0.224 n=25+25) Compiler 5.59s ± 1% 5.57s ± 2% -0.38% (p=0.019 n=24+24) name old alloc/op new alloc/op delta Template 85.6MB ± 0% 85.6MB ± 0% -0.11% (p=0.000 n=25+24) GoTypes 307MB ± 0% 305MB ± 0% -0.45% (p=0.000 n=25+25) Compiler 1.06GB ± 0% 1.06GB ± 0% -0.34% (p=0.000 n=25+25) name old allocs/op new allocs/op delta Template 1.10M ± 0% 1.10M ± 0% -0.03% (p=0.001 n=25+24) GoTypes 3.36M ± 0% 3.35M ± 0% -0.13% (p=0.000 n=25+25) Compiler 13.0M ± 0% 13.0M ± 0% -0.12% (p=0.000 n=25+24) Change-Id: I7fc18acbc3b1588aececef9692e24a0bd3dba974 Reviewed-on: https://go-review.googlesource.com/20295 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
* cmd/compile: some SSA cleanupKeith Randall2016-03-021-19/+0
| | | | | | | | | | | Do some easy TODOs. Move a bunch of other TODOs into bugs. Change-Id: Iaba9dad6221a2af11b3cbcc512875f4a85842873 Reviewed-on: https://go-review.googlesource.com/20114 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Todd Neal <todd@tneal.org>
* [dev.ssa] cmd/compile: adjust branch likeliness for calls/loopsDavid Chase2016-03-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Static branch predictions (which guide block ordering) are adjusted based on: loop/not-loop (favor looping) abnormal-exit/not (avoid panic) call/not-call (avoid call) ret/default (treat returns as rare) This appears to make no difference in performance of real code, meaning the compiler itself. The earlier version of this has been stripped down to help make the cost of this only-aesthetic-on-Intel phase be as cheap as possible (we probably want information about inner loops for improving register allocation, but because register allocation follows close behind this pass, conceivably the information could be reused -- so we might do this anyway just to normalize output). For a ./make.bash that takes 200 user seconds, about .75 second is reported in likelyadjust (summing nanoseconds reported with -d=ssa/likelyadjust/time ). Upstream predictions are respected. Includes test, limited to build on amd64 only. Did several iterations on the debugging output to allow some rough checks on behavior. Debug=1 logging notes agree/disagree with earlier passes, allowing analysis like the following: Run on make.bash: GO_GCFLAGS=-d=ssa/likelyadjust/debug \ ./make.bash >& lkly5.log grep 'ranch prediction' lkly5.log | wc -l 78242 // 78k predictions grep 'ranch predi' lkly5.log | egrep -v 'agrees with' | wc -l 29633 // 29k NEW predictions grep 'disagrees' lkly5.log | wc -l 444 // contradicted 444 times grep '< exit' lkly5.log | wc -l 10212 // 10k exit predictions grep '< exit' lkly5.log | egrep 'disagrees' | wc -l 5 // 5 contradicted by previous prediction grep '< exit' lkly5.log | egrep -v 'agrees' | wc -l 702 // 702-5 redundant with previous prediction grep '< call' lkly5.log | egrep -v 'agrees' | wc -l 16699 // 16k new call predictions grep 'stay in loop' lkly5.log | egrep -v 'agrees' | wc -l 3951 // 4k new "remain in loop" predictions Fixes #11451. Change-Id: Iafb0504f7030d304ef4b6dc1aba9a5789151a593 Reviewed-on: https://go-review.googlesource.com/19995 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile: add constant cacheJosh Bleecher Snyder2016-02-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cache gets a 62% hit rate while compiling the standard library. name old time/op new time/op delta Template 449ms ± 2% 443ms ± 4% -1.40% (p=0.006 n=23+25) GoTypes 1.54s ± 1% 1.50s ± 2% -2.53% (p=0.000 n=22+22) Compiler 5.51s ± 1% 5.39s ± 1% -2.29% (p=0.000 n=23+25) name old alloc/op new alloc/op delta Template 90.4MB ± 0% 90.0MB ± 0% -0.45% (p=0.000 n=25+25) GoTypes 334MB ± 0% 331MB ± 0% -1.05% (p=0.000 n=25+25) Compiler 1.12GB ± 0% 1.10GB ± 0% -1.57% (p=0.000 n=25+24) name old allocs/op new allocs/op delta Template 681k ± 0% 682k ± 0% +0.26% (p=0.000 n=25+25) GoTypes 2.23M ± 0% 2.23M ± 0% +0.05% (p=0.000 n=23+24) Compiler 6.46M ± 0% 6.46M ± 0% +0.02% (p=0.000 n=24+25) Change-Id: I2629c291892827493d7b55ec4d83f6973a2ab133 Reviewed-on: https://go-review.googlesource.com/20026 Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org>
* [dev.ssa] cmd/compile: small improvementsKeith Randall2016-02-251-0/+8
| | | | | | | | | | | | | Found looking at mapaccess1_faststr. runtime.throw never returns. Do x+y+c with an LEA. Change-Id: I27ea6669324242a6302397cbdc73230891d97591 Reviewed-on: https://go-review.googlesource.com/19911 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
* [dev.ssa] cmd/compile: fix @ rewrite rulesKeith Randall2016-02-241-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The @ directive used to read the target block after some value structure had already changed. I don't think it was ever really a bug, but it's confusing. It might fail like this: (Foo x y) -> @v.Args[0].Block (Bar y (Baz ...)) v.Op = Bar v.Args[0] = y v.Args[1] = v.Args[0].Block.NewValue(Baz, ...) That new value is allocated in the block of y, not the block of x. Anyway, read the destination block first so this potential bug can't happen. Change-Id: Ie41d2fc349b35cefaa319fa9327808bcb781b4e2 Reviewed-on: https://go-review.googlesource.com/19900 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Todd Neal <todd@tneal.org>
* [dev.ssa] cmd/compile: update TODOKeith Randall2016-02-241-14/+0
| | | | | | | | Remove the stuff that's already done. Change-Id: I3b4fc827240d45dd051dc36897883532d8900a0c Reviewed-on: https://go-review.googlesource.com/19906 Reviewed-by: David Chase <drchase@google.com>
* [dev.ssa] cmd/compile: reenable TestStackBarrierProfilingDavid Chase2016-02-181-1/+0
| | | | | | | | | Tested it 1000x on OS X and Linux amd64, no failures. Updated TODO. Change-Id: Ia60c8d90962f6e5f7c3ed1ded6ba1b25eee983e1 Reviewed-on: https://go-review.googlesource.com/19662 Reviewed-by: Todd Neal <todd@tneal.org>
* [dev.ssa] cmd/compile: reorg write barriers a bitKeith Randall2016-02-051-2/+0
| | | | | | | | | | | | | | Use just a single write barrier flag test, even if there are multiple pointer fields in a struct. This helps move more of the wb-specific code (like the LEA needed to materialize the write address) into the unlikely path. Change-Id: Ic7a67145904369c4ff031e464d51267d71281c8f Reviewed-on: https://go-review.googlesource.com/19085 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
* [dev.ssa] cmd/compile: Use ADD instead of LEA when we canKeith Randall2016-02-051-2/+0
| | | | | | | | | If the output register is one of the input registers, we can use a real add instead of LEA. Change-Id: Ide58f1536afb077c0b939d3a8c7555807fd1c5e3 Reviewed-on: https://go-review.googlesource.com/19234 Reviewed-by: Alexandru Moșoi <alexandru@mosoi.ro>
* [dev.ssa] cmd/compile: lots of small rewrite optimizationsKeith Randall2016-01-311-0/+2
| | | | | | | | | | | | | | | | | | | | Small optimizations I noticed while looking at Giovanni's test cases. More shifts by constants. Indexed stores for smaller types. Fold LEA into loads/stores. More extending loads. CMP $0 of AND -> TEST Fix order of TEST ops. Giovanni's test cases at https://gist.github.com/rasky/62fba94e3a20d1b05b2a Change-Id: I7077bc0b5319bf05767eeb39f401f4bb4b39f635 Reviewed-on: https://go-review.googlesource.com/19086 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Todd Neal <todd@tneal.org> Reviewed-by: David Chase <drchase@google.com>
* [dev.ssa] cmd/compile: prepare for some load+op combiningKeith Randall2016-01-291-3/+4
| | | | | | | | | | | | | Rename StoreConst to ValAndOff so we can use it for other ops. Make ValAndOff print nicely. Add some notes & checks related to my aborted attempt to implement combined CMP+load ops. Change-Id: I2f901d12d42bc5a82879af0334806aa184a97e27 Reviewed-on: https://go-review.googlesource.com/18947 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: David Chase <drchase@google.com>
* [dev.ssa] cmd/compile: short-circuit empty blocksKeith Randall2016-01-221-1/+0
| | | | | | | | | | | Empty blocks are introduced to remove critical edges. After regalloc, we can remove any of the added blocks that are still empty. Change-Id: I0b40e95ac3a6cc1e632a479443479532b6c5ccd9 Reviewed-on: https://go-review.googlesource.com/18833 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
* [dev.ssa] cmd/compile: update SSA TODOsKeith Randall2016-01-211-0/+14
| | | | | | Change-Id: I78743987dcb45d821212caf95a00ae15b7a6cfd8 Reviewed-on: https://go-review.googlesource.com/18773 Reviewed-by: Andrew Gerrand <adg@golang.org>
* [dev.ssa] cmd/compile: Allow structs to be SSAdKeith Randall2016-01-201-1/+3
| | | | | | | | | | | | | | Break small structs up into their components so they can be registerized. Change StructSelect to use field indexes instead of field offsets, as field offsets aren't unique in the presence of zero-sized fields. Change-Id: I2f1dc89f7fa58e1cf58aa1a32b238959d53f62e4 Reviewed-on: https://go-review.googlesource.com/18570 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com>
* [dev.ssa] cmd/compile: add some more TODOsKeith Randall2016-01-081-0/+9
| | | | | | Change-Id: If8b6b85d2165d6222b36f101adb95b7ee40371c1 Reviewed-on: https://go-review.googlesource.com/18300 Reviewed-by: David Chase <drchase@google.com>
* [dev.ssa] Merge remote-tracking branch 'origin/master' into mergebranchKeith Randall2016-01-071-0/+2
| | | | | | Semi-regular merge from tip into dev.ssa. Change-Id: I1627d7c7e6892cd4f1f5da5f3e07389ff1d677ce
* [dev.ssa] cmd/compile: some SSA optimizationsKeith Randall2015-11-101-13/+9
| | | | | | | | | | | | | | Some optimizations of things I've seen looking at generated code. (x+y)-x == y x-0 == x The ptr portion of the constant string "" can be nil. Also update TODO with recent changes. Change-Id: I02c41ca2f9e9e178bf889058d3e083b446672dbe Reviewed-on: https://go-review.googlesource.com/16771 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com>
* [dev.ssa] cmd/compile: remove done items from TODODavid Chase2015-09-231-2/+0
| | | | | | Change-Id: I5ee2953f7d387ef5bc70f6958763f775f0ae72dc Reviewed-on: https://go-review.googlesource.com/14880 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* [dev.ssa] cmd/compile: update SSA todosJosh Bleecher Snyder2015-09-071-6/+2
| | | | | | Change-Id: I1271c015e602cd7ec92bf24f019dd8839b3180fc Reviewed-on: https://go-review.googlesource.com/14346 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile: store floats in AuxIntTodd Neal2015-09-041-1/+0
| | | | | | | | | Store floats in AuxInt to reduce allocations. Change-Id: I101e6322530b4a0b2ea3591593ad022c992e8df8 Reviewed-on: https://go-review.googlesource.com/14320 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile: cse should treat -0.0 and 0.0 as differentTodd Neal2015-09-031-0/+1
| | | | | | | | | | | cse was incorrectly classifying -0.0 and 0.0 as equivalent. This lead to invalid code as ssa uses PXOR -0.0, reg to negate a floating point. Fixes math. Change-Id: Id7eb10c71749eaed897f29b02c33891cf5820acf Reviewed-on: https://go-review.googlesource.com/14205 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile/internal/ssa: update TODO and commentsKeith Randall2015-08-251-11/+2
| | | | | | Change-Id: I3c598faff8af18530ae863b9e72f0cef379b4a1f Reviewed-on: https://go-review.googlesource.com/13909 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* [dev.ssa] cmd/compile/internal/ssa: implement OHMULTodd Neal2015-08-191-1/+2
| | | | | | | | | | Adds support for high multiply which is used by the frontend when rewriting const division. The frontend currently only does this for 8, 16, and 32 bit integer arithmetic. Change-Id: I9b6c6018f3be827a50ee6c185454ebc79b3094c8 Reviewed-on: https://go-review.googlesource.com/13696 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile/internal/ssa: implement ODIVTodd Neal2015-08-181-1/+2
| | | | | | | | Implement integer division for non-consts. Change-Id: If40cbde20e5f0ebb9993064def7be468e4eca076 Reviewed-on: https://go-review.googlesource.com/13644 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile: initial implementation of likely directionJosh Bleecher Snyder2015-08-121-1/+1
| | | | | | Change-Id: Id8457b18c07bf717d13c9423d8f314f253eee64f Reviewed-on: https://go-review.googlesource.com/13580 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile/internal/ssa: Update TODO listKeith Randall2015-08-101-65/+64
| | | | | | Change-Id: Ibcd4c6984c8728fd9ab76e0c7df555984deaf281 Reviewed-on: https://go-review.googlesource.com/13471 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
* [dev.ssa] cmd/compile: fix registers for in-place instructionsJosh Bleecher Snyder2015-07-271-0/+2
| | | | | | | | | | | | | | | Some of these were right; others weren't. Fixes 'GOGC=off GOSSAPKG=mime go test -a mime'. The right long term fix is probably to teach the register allocator about in-place instructions. In the meantime, all the tests that we can run now pass. Change-Id: I8e37b00a5f5e14f241b427d45d5f5cc1064883a2 Reviewed-on: https://go-review.googlesource.com/12664 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile: minor cleanupJosh Bleecher Snyder2015-07-241-0/+4
| | | | | | | | Cull dead code. Add TODOs. Change-Id: I81d24371de47f5a27d3a3a0ec0ef5baaf6814c06 Reviewed-on: https://go-review.googlesource.com/12659 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* [dev.ssa] cmd/compile: minor cleanupJosh Bleecher Snyder2015-07-231-0/+3
| | | | | | Change-Id: Ib33f3b1cfa09f410675d275e214d8ddc246c53c3 Reviewed-on: https://go-review.googlesource.com/12548 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile/internal/ssa: compute outarg size correctlyKeith Randall2015-07-161-1/+0
| | | | | | | | | | Keep track of the outargs size needed at each call. Compute the size of the outargs section of the stack frame. It's just the max of the outargs size at all the callsites in the function. Change-Id: I3d0640f654f01307633b1a5f75bab16e211ea6c0 Reviewed-on: https://go-review.googlesource.com/12178 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
* [dev.ssa] cmd/compile/internal/ssa: Initial implementation of memory zeroingDaniel Morsing2015-07-011-0/+2
| | | | | | | | | This will make it possible for us to start implementing interfaces and other stack allocated types which are more than one machine word. Change-Id: I52b187a791cf1919cb70ed6dabdc9f57b317ea83 Reviewed-on: https://go-review.googlesource.com/11631 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile/ssa: refine type equality in cseJosh Bleecher Snyder2015-06-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | 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/11451 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile/internal/ssa: Handle variables correctlyKeith Randall2015-06-251-0/+8
| | | | | | | | | | | | | | | | | Use *Node of type ONAME instead of string as the key for variable maps. This will prevent aliasing between two identically named but differently scoped variables. Introduce an Aux value that encodes the offset of a variable from a base pointer (either global base pointer or stack pointer). Allow LEAQ and derivatives (MOVQ, etc.) to also have such an Aux field. Allocate space for AUTO variables in stackalloc. Change-Id: Ibdccdaea4bbc63a1f4882959ac374f2b467e3acd Reviewed-on: https://go-review.googlesource.com/11238 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
* [dev.ssa] cmd/compile/ssa: add nilcheckelim passJosh Bleecher Snyder2015-06-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | 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/11430 Reviewed-by: Alan Donovan <adonovan@google.com>
* [dev.ssa] cmd/compile/ssa: separate logging, work in progress, and fatal errorsJosh Bleecher Snyder2015-06-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/11160 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile/internal/ssa: Complete 64-bit shiftsKeith Randall2015-06-111-11/+5
| | | | | | | | | | | | Implement correct Go shifts. Allow multi-line rewrite rules. Fix offset & alignment in stack alloc. Change-Id: I0ae9e522c83df9205bbe4ab94bc0e43d16dace58 Reviewed-on: https://go-review.googlesource.com/10891 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile/internal/ssa: add call opcodesKeith Randall2015-06-111-0/+3
| | | | | | | | | | Add calls, particularly closure calls. Reorg SSAable variable test for converting to SSA. Change-Id: Ia75c04295e6b0b040122f97e2381836a393b7f42 Reviewed-on: https://go-review.googlesource.com/10912 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
* [dev.ssa] cmd/compile/internal/ssa: add line numbers to ValuesMichael Matloob2015-06-101-2/+0
| | | | | | Change-Id: I1dfffd75cc1f49307c654f910f7133c03da6c84f Reviewed-on: https://go-review.googlesource.com/10559 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] cmd/compile/internal/ssa: Implement block rewriting rulesKeith Randall2015-05-301-0/+9
| | | | | | Change-Id: I47e5349e34fc18118c4d35bf433f875b958cc3e5 Reviewed-on: https://go-review.googlesource.com/10495 Reviewed-by: Alan Donovan <adonovan@google.com>
* [dev.ssa] cmd/compile/internal/ssa: remove cgen passMichael Matloob2015-05-291-1/+0
| | | | | | | | | Code generation is now done in genssa. Also remove the asm field in opInfo. It's no longer used. Change-Id: I65fffac267e138fd424b2ef8aa7ed79f0ebb63d5 Reviewed-on: https://go-review.googlesource.com/10539 Reviewed-by: Keith Randall <khr@golang.org>
* [dev.ssa] Merge remote-tracking branch 'origin/master' into mergebranchKeith Randall2015-05-281-0/+47
Semi-regular merge of tip to dev.ssa. Complicated a bit by the move of cmd/internal/* to cmd/compile/internal/*. Change-Id: I1c66d3c29bb95cce4a53c5a3476373aa5245303d