- 09 Mar, 2016 4 commits
-
-
Ian Lance Taylor authored
Mix in several other minor cleanups, including adding some new methods to Nodes: Index, Addr, SetIndex, SetNodes. Passes toolstash -cmp. Update #14473. Change-Id: I8bd4ae3fde7c5e20ba66e7dd1654fbc70c3ddeb8 Reviewed-on: https://go-review.googlesource.com/20491 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
This CL was automatically generated using a special-purpose AST rewriting tool, followed by manual editing to put some comments back in the right places and fix some bad line breaks. The result is not perfect but it's a big step toward getting back to sanity, and because it was automatically generated there is a decent chance that it is correct. Passes toolstash -cmp. Update #14473. Change-Id: I01c09078a6d78e2b008bc304d744b79469a38d3d Reviewed-on: https://go-review.googlesource.com/20440 Reviewed-by:
David Crawshaw <crawshaw@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
More idiomatic naming (in particular, matches the naming used for go/types.Signature). Also, convert more code to use these methods and/or IterFields. (Still more to go; only made a quick pass for low hanging fruit.) Passes toolstash -cmp. Change-Id: I61831bfb1ec2cd50d4c7efc6062bca4e0dcf267b Reviewed-on: https://go-review.googlesource.com/20451 Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Matthew Dempsky authored
Passes toolstash -cmp. Change-Id: I325b02dcc8412ded0dc304d43377c0bdf59c66a8 Reviewed-on: https://go-review.googlesource.com/20405 Reviewed-by:
David Crawshaw <crawshaw@golang.org> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 08 Mar, 2016 4 commits
-
-
David Chase authored
Fixes #14646. Change-Id: I0bb82ed6d3533633cd8369ba37aa467948bbe155 Reviewed-on: https://go-review.googlesource.com/20381 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp. Update #14473. Change-Id: I717ebd948dfc8faf8b9ef5aa02c67484af618d18 Reviewed-on: https://go-review.googlesource.com/20359 Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
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>
-
Matthew Dempsky authored
Passes toolstash/buildall. Fixes #14692. Change-Id: I4352678d8251309f2b8b7793674c550fac948006 Reviewed-on: https://go-review.googlesource.com/20350 Reviewed-by:
Dave Cheney <dave@cheney.net> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 07 Mar, 2016 1 commit
-
-
Matthew Dempsky authored
Eliminates type conversions in a bunch of Oconv(int(n.Op), ...) calls. Notably, this identified a misuse of Oconv in amd64/gsubr.go to try to print an assembly instruction op instead of a compiler node op. Change-Id: I93b5aa49fe14a5eaf868b05426d3b8cd8ab52bc5 Reviewed-on: https://go-review.googlesource.com/20298 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 06 Mar, 2016 1 commit
-
-
Josh Bleecher Snyder authored
OffPtr allocates less and is easier to optimize. With this change, the OffPtr collapsing opt rule matches increase from 160k to 263k, and the Load-after-Store opt rule matches increase from 217 to 853. Change-Id: I763426a3196900f22a367f7f6d8e8047b279653d Reviewed-on: https://go-review.googlesource.com/20273 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Todd Neal <todd@tneal.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 05 Mar, 2016 2 commits
-
-
Matthew Dempsky authored
Instead make substArgTypes responsible for cloning the function definition Node and the function signature Type tree. Passes toolstash -cmp. Change-Id: I9ec84c90a7ae83d164d3f578e84a91cf1490d8ab Reviewed-on: https://go-review.googlesource.com/20239 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Passes toolstash -cmp. Update #14473. Change-Id: I1b50fe981e7a266d4b14f31d849eb91afccdfda3 Reviewed-on: https://go-review.googlesource.com/20270 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 04 Mar, 2016 2 commits
-
-
Ian Lance Taylor authored
Also fix some uses of nodeSeqIterator.Len, and fix the implementation in nodesIterator. Passes toolstash -cmp. Update #14473. Change-Id: I228871470234b7f1314ffd2aae8a4c0624c35f98 Reviewed-on: https://go-review.googlesource.com/20231 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
To turn ssa compilation on or off altogether, use -ssa=1 or -ssa=0. Default is on. To turn on or off consistency checks, do -d=ssa/check/on or -d=ssa/check/off. Default is on for now. Change-Id: I277e0311f538981c8b9c62e7b7382a0c8755ce4c Reviewed-on: https://go-review.googlesource.com/20217 Reviewed-by:
David Chase <drchase@google.com>
-
- 03 Mar, 2016 1 commit
-
-
Keith Randall authored
If we're about to enter a loop, load values which are live and will soon be used in the loop into registers. name old time/op new time/op delta BinaryTree17-8 2.80s ± 4% 2.62s ± 2% -6.43% (p=0.008 n=5+5) Fannkuch11-8 2.45s ± 2% 2.14s ± 1% -12.43% (p=0.008 n=5+5) FmtFprintfEmpty-8 49.0ns ± 1% 48.4ns ± 1% -1.35% (p=0.032 n=5+5) FmtFprintfString-8 160ns ± 1% 153ns ± 0% -4.63% (p=0.008 n=5+5) FmtFprintfInt-8 152ns ± 0% 150ns ± 0% -1.57% (p=0.000 n=5+4) FmtFprintfIntInt-8 252ns ± 2% 244ns ± 1% -3.02% (p=0.008 n=5+5) FmtFprintfPrefixedInt-8 223ns ± 0% 223ns ± 0% ~ (all samples are equal) FmtFprintfFloat-8 293ns ± 2% 291ns ± 2% ~ (p=0.389 n=5+5) FmtManyArgs-8 956ns ± 0% 936ns ± 0% -2.05% (p=0.008 n=5+5) GobDecode-8 7.18ms ± 0% 7.11ms ± 0% -1.02% (p=0.008 n=5+5) GobEncode-8 6.12ms ± 3% 6.07ms ± 1% ~ (p=0.690 n=5+5) Gzip-8 284ms ± 1% 284ms ± 0% ~ (p=1.000 n=5+5) Gunzip-8 40.8ms ± 1% 40.6ms ± 1% ~ (p=0.310 n=5+5) HTTPClientServer-8 69.8µs ± 1% 72.2µs ± 4% ~ (p=0.056 n=5+5) JSONEncode-8 16.1ms ± 2% 16.2ms ± 1% ~ (p=0.151 n=5+5) JSONDecode-8 54.9ms ± 0% 57.0ms ± 1% +3.79% (p=0.008 n=5+5) Mandelbrot200-8 4.35ms ± 0% 4.39ms ± 0% +0.85% (p=0.008 n=5+5) GoParse-8 3.56ms ± 1% 3.42ms ± 1% -4.03% (p=0.008 n=5+5) RegexpMatchEasy0_32-8 75.6ns ± 1% 75.0ns ± 0% -0.83% (p=0.016 n=5+4) RegexpMatchEasy0_1K-8 250ns ± 0% 252ns ± 1% +0.80% (p=0.016 n=4+5) RegexpMatchEasy1_32-8 75.0ns ± 0% 75.4ns ± 2% ~ (p=0.206 n=5+5) RegexpMatchEasy1_1K-8 401ns ± 0% 398ns ± 1% ~ (p=0.056 n=5+5) RegexpMatchMedium_32-8 119ns ± 0% 118ns ± 0% -0.84% (p=0.008 n=5+5) RegexpMatchMedium_1K-8 36.6µs ± 0% 36.9µs ± 0% +0.91% (p=0.008 n=5+5) RegexpMatchHard_32-8 1.95µs ± 1% 1.92µs ± 0% -1.23% (p=0.032 n=5+5) RegexpMatchHard_1K-8 58.3µs ± 1% 58.1µs ± 1% ~ (p=0.548 n=5+5) Revcomp-8 425ms ± 1% 389ms ± 1% -8.39% (p=0.008 n=5+5) Template-8 65.5ms ± 1% 63.6ms ± 1% -2.86% (p=0.008 n=5+5) TimeParse-8 363ns ± 0% 354ns ± 1% -2.59% (p=0.008 n=5+5) TimeFormat-8 363ns ± 0% 364ns ± 1% ~ (p=0.159 n=5+5) Fixes #14511 Change-Id: I1b79d2545271fa90d5b04712cc25573bdc94f2ce Reviewed-on: https://go-review.googlesource.com/20151 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
- 02 Mar, 2016 4 commits
-
-
Robert Griesemer authored
Change-Id: Ic9ca792b55cc4ebd0ac6cfa2fbdb58030893bacd Reviewed-on: https://go-review.googlesource.com/20132 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Robert Griesemer authored
- removed lots of unnecessary int(x) casts - removed parserline() - was inconsistently used anyway - minor simplifications in dcl.go Change-Id: Ibf7de679eea528a31c9692ef1c76a1d9b3239211 Reviewed-on: https://go-review.googlesource.com/20131 Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Keith Randall authored
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>
-
Brad Fitzpatrick authored
The tree's pretty inconsistent about single space vs double space after a period in documentation. Make it consistently a single space, per earlier decisions. This means contributors won't be confused by misleading precedence. This CL doesn't use go/doc to parse. It only addresses // comments. It was generated with: $ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])') $ go test go/doc -update Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7 Reviewed-on: https://go-review.googlesource.com/20022 Reviewed-by:
Rob Pike <r@golang.org> Reviewed-by:
Dave Day <djd@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 01 Mar, 2016 4 commits
-
-
Ian Lance Taylor authored
This check seems to apply to all code instrumentation, not just -race. Fixes #14589. Change-Id: I16ae07749ede7c1e6ed06f472711638d195034ac Reviewed-on: https://go-review.googlesource.com/20113 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Marvin Stenger <marvin.stenger94@gmail.com>
-
Keith Randall authored
SSA is a real compiler now, don't trigger on function names. Change-Id: Iaf6dd78248c1b6ca2630275bd59f7ea7b7576497 Reviewed-on: https://go-review.googlesource.com/20088 Reviewed-by:
David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ilya Tocar authored
Writing to low 8/16 bits of register creates false dependency Generate 32-bit operations when possible. Change-Id: I8eb6c1c43a66424eec6baa91a660bceb6b80d1d3 Reviewed-on: https://go-review.googlesource.com/19506 Reviewed-by:
Keith Randall <khr@golang.org> Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Add writeback code to each return location which copies the final result back to the correct stack location. Cgo plays tricky games by taking the address of a in f(a int) (b int) and then using that address to modify b. So for cgo-generated Go code, disable the SSAing of output args. Update #14511 Change-Id: I95cba727d53699d31124eef41db0e03935862be9 Reviewed-on: https://go-review.googlesource.com/19988 Reviewed-by:
Todd Neal <todd@tneal.org> Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 29 Feb, 2016 2 commits
-
-
Keith Randall authored
It gets rewritten to an xor by the linker also. Change-Id: Iae35130325d41bd1a09b7e971190cae6f4e17fac Reviewed-on: https://go-review.googlesource.com/20058 Reviewed-by:
David Chase <drchase@google.com> Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ilya Tocar authored
Movups is 1 byte smaller than movapd that we currently use. Change-Id: I22f771f066529352722a28543535ec43497cb9c5 Reviewed-on: https://go-review.googlesource.com/19938 Reviewed-by:
David Chase <drchase@google.com>
-
- 28 Feb, 2016 1 commit
-
-
David Chase authored
Avoid targeting a partial register with load; ensure source of load (writebarrier) is aligned. Better yet would be "CMPB $1,writebarrier" but that requires wrestling with flagalloc (mem operand complicates moving instruction around). Didn't see a change in time for benchcmd -n 10 Build go build net/http Verified that we clean the code up properly: 0x20a8 <main.main+104>: mov 0xc30a2(%rip),%eax # 0xc5150 <runtime.writeBarrier> 0x20ae <main.main+110>: test %al,%al Change-Id: Id5fb8c260eaec27bd727cb0ae1476c60343b0986 Reviewed-on: https://go-review.googlesource.com/19998 Reviewed-by:
Keith Randall <khr@golang.org>
-
- 27 Feb, 2016 1 commit
-
-
Keith Randall authored
plive doesn't like the fact that we put JMPs right after CALL ops to select{send,recv}. Fixes SSA -N build. Change-Id: I9b3c9e5293196094fd5a6206dd2f99784951f7a9 Reviewed-on: https://go-review.googlesource.com/19982 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
- 26 Feb, 2016 1 commit
-
-
Keith Randall authored
Just like we do for integer loads/stores. Update #14511 Change-Id: Ic6ca6b54301438a5701ea5fb0be755451cb24d45 Reviewed-on: https://go-review.googlesource.com/19923 Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Keith Randall <khr@golang.org>
-
- 25 Feb, 2016 2 commits
-
-
David Chase authored
The -d compiler flag can also specify ssa phase and flag, for example -d=ssa/generic_cse/time,ssa/generic_cse/stats Spaces in the phase names can be specified with an underscore. Flags currently parsed (not necessarily recognized by the phases yet) are: on, off, mem, time, debug, stats, and test On, off and time are handled in the harness, debug, stats, and test are interpreted by the phase itself. The pass is now attached to the Func being compiled, and a new method logStats(key, ...value) on *Func to encourage a semi-standardized format for that output. Output fields are separated by tabs to ease digestion by awk and spreadsheets. For example, if f.pass.stats > 0 { f.logStat("CSE REWRITES", rewrites) } Change-Id: I16db2b5af64c50ca9a47efeb51d961147a903abc Reviewed-on: https://go-review.googlesource.com/19885 Reviewed-by:
Keith Randall <khr@golang.org> Reviewed-by:
Todd Neal <todd@tneal.org>
-
Keith Randall authored
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>
-
- 24 Feb, 2016 1 commit
-
-
Keith Randall authored
Helps keep line numbers around for debugging, particularly for break and continue statements (which often compile down to nothing). Update #14379 Change-Id: I6ea06aa887b0450d9ba4f11e319e5c263f5a98ba Reviewed-on: https://go-review.googlesource.com/19848 Reviewed-by:
David Chase <drchase@google.com>
-
- 23 Feb, 2016 1 commit
-
-
Todd Neal authored
The upper bits of 8/16/32 bit constants are undefined. We need to truncate in order to prevent x86.oclass misidentifying the size of the constant. Fixes #14389 Change-Id: I3e5ff79cd904376572a93f489ba7e152a5cb6e60 Reviewed-on: https://go-review.googlesource.com/19740 Reviewed-by:
Keith Randall <khr@golang.org>
-
- 08 Feb, 2016 1 commit
-
-
Ilya Tocar authored
INC/DEC produces slightly faster and smaller code. Change-Id: I329d9bdb01b90041be45e053d9df640818bf0c2d Reviewed-on: https://go-review.googlesource.com/19238 Run-TryBot: Ilya Tocar <ilya.tocar@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
- 07 Feb, 2016 1 commit
-
-
Keith Randall authored
Panic doesn't return, so record that we immediately exit after a panic call. This will help code analysis. Change-Id: I4d1f67494f97b6aee130c43ff4e44307b2b0f149 Reviewed-on: https://go-review.googlesource.com/19303 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
- 06 Feb, 2016 1 commit
-
-
Keith Randall authored
The frontend does this for 32 bits and below, but SSA needs to do it for 64 bits. The algorithms are all copied from cgen.go:cgen_div. Speeds up TimeFormat substantially: ~40% slower to ~10% slower. Change-Id: I023ea2eb6040df98ccd9105e15ca6ea695610a7a Reviewed-on: https://go-review.googlesource.com/19302 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Todd Neal <todd@tneal.org>
-
- 05 Feb, 2016 3 commits
-
-
Keith Randall authored
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>
-
Keith Randall authored
Change-Id: Ifb8eba1929c79ee7a8cae2191613c55a3b8f74e5 Reviewed-on: https://go-review.googlesource.com/19236 Reviewed-by:
Todd Neal <todd@tneal.org>
-
Keith Randall authored
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>
-
- 04 Feb, 2016 1 commit
-
-
Keith Randall authored
Mostly indexed loads. A few more LEA cases. Change-Id: Idc1d447ed0dd6e906cd48e70307a95e77f61cf5f Reviewed-on: https://go-review.googlesource.com/19172 Reviewed-by:
Todd Neal <todd@tneal.org> Run-TryBot: Keith Randall <khr@golang.org>
-
- 02 Feb, 2016 1 commit
-
-
Keith Randall authored
Add the aux type to opcodes. Add rematerializeable as a flag. Change-Id: I906e19281498f3ee51bb136299bf26e13a54b2ec Reviewed-on: https://go-review.googlesource.com/19088 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Todd Neal <todd@tneal.org>
-