- 29 Apr, 2018 5 commits
-
-
Giovanni Bajo authored
When a branch is followed, we apply the relation as described in the domain relation table. In case the relation is in the positive domain, we can also infer an unsigned relation if, by that point, we know that both operands are non-negative. Fixes #20393 Change-Id: Ieaf0c81558b36d96616abae3eb834c788dd278d5 Reviewed-on: https://go-review.googlesource.com/100278 Run-TryBot: Giovanni Bajo <rasky@develer.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Giovanni Bajo <rasky@develer.com> Reviewed-by: David Chase <drchase@google.com>
-
Giovanni Bajo authored
Implement it through a partial order datastructure, which keeps the relations between SSA values in a forest of DAGs and is able to discover contradictions. In make.bash, this patch is able to prove hundreds of conditions which were not proved before. Compilebench: name old time/op new time/op delta Template 371ms ± 2% 368ms ± 1% ~ (p=0.222 n=5+5) Unicode 203ms ± 6% 199ms ± 3% ~ (p=0.421 n=5+5) GoTypes 1.17s ± 4% 1.18s ± 1% ~ (p=0.151 n=5+5) Compiler 5.54s ± 2% 5.59s ± 1% ~ (p=0.548 n=5+5) SSA 12.9s ± 2% 13.2s ± 1% +2.96% (p=0.032 n=5+5) Flate 245ms ± 2% 247ms ± 3% ~ (p=0.690 n=5+5) GoParser 302ms ± 6% 302ms ± 4% ~ (p=0.548 n=5+5) Reflect 764ms ± 4% 773ms ± 3% ~ (p=0.095 n=5+5) Tar 354ms ± 6% 361ms ± 3% ~ (p=0.222 n=5+5) XML 434ms ± 3% 429ms ± 1% ~ (p=0.421 n=5+5) StdCmd 22.6s ± 1% 22.9s ± 1% +1.40% (p=0.032 n=5+5) name old user-time/op new user-time/op delta Template 436ms ± 8% 426ms ± 5% ~ (p=0.579 n=5+5) Unicode 219ms ±15% 219ms ±12% ~ (p=1.000 n=5+5) GoTypes 1.47s ± 6% 1.53s ± 6% ~ (p=0.222 n=5+5) Compiler 7.26s ± 4% 7.40s ± 2% ~ (p=0.389 n=5+5) SSA 17.7s ± 4% 18.5s ± 4% +4.13% (p=0.032 n=5+5) Flate 257ms ± 5% 268ms ± 9% ~ (p=0.333 n=5+5) GoParser 354ms ± 6% 348ms ± 6% ~ (p=0.913 n=5+5) Reflect 904ms ± 2% 944ms ± 4% ~ (p=0.056 n=5+5) Tar 398ms ±11% 430ms ± 7% ~ (p=0.079 n=5+5) XML 501ms ± 7% 489ms ± 5% ~ (p=0.444 n=5+5) name old text-bytes new text-bytes delta HelloSize 670kB ± 0% 670kB ± 0% +0.00% (p=0.008 n=5+5) CmdGoSize 7.22MB ± 0% 7.21MB ± 0% -0.07% (p=0.008 n=5+5) name old data-bytes new data-bytes delta HelloSize 9.88kB ± 0% 9.88kB ± 0% ~ (all equal) CmdGoSize 248kB ± 0% 248kB ± 0% -0.06% (p=0.008 n=5+5) name old bss-bytes new bss-bytes delta HelloSize 125kB ± 0% 125kB ± 0% ~ (all equal) CmdGoSize 145kB ± 0% 144kB ± 0% -0.20% (p=0.008 n=5+5) name old exe-bytes new exe-bytes delta HelloSize 1.43MB ± 0% 1.43MB ± 0% ~ (all equal) CmdGoSize 14.5MB ± 0% 14.5MB ± 0% -0.06% (p=0.008 n=5+5) Fixes #19714 Updates #20393 Change-Id: Ia090f5b5dc1bcd274ba8a39b233c1e1ace1b330e Reviewed-on: https://go-review.googlesource.com/100277 Run-TryBot: Giovanni Bajo <rasky@develer.com> Reviewed-by: David Chase <drchase@google.com>
-
Josh Bleecher Snyder authored
There are several things combined in this change. First, eliminate the gobitvector type in favor of adding a ptrbit method to bitvector. In non-performance-critical code, use that method. In performance critical code, though, load the bitvector data one byte at a time and iterate only over set bits. To support that, add and use sys.Ctz8. name old time/op new time/op delta StackCopyPtr-8 81.8ms ± 5% 78.9ms ± 3% -3.58% (p=0.000 n=97+96) StackCopy-8 65.9ms ± 3% 62.8ms ± 3% -4.67% (p=0.000 n=96+92) StackCopyNoCache-8 105ms ± 3% 102ms ± 3% -3.38% (p=0.000 n=96+95) Change-Id: I00b80f45612708bd440b1a411a57fa6dfa24aa74 Reviewed-on: https://go-review.googlesource.com/109716 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Josh Bleecher Snyder authored
getArgInfo is called a lot during stack copying. In the common case it doesn't do much work, but it cannot be inlined. This change works around that. name old time/op new time/op delta StackCopyPtr-8 108ms ± 5% 96ms ± 4% -10.40% (p=0.000 n=20+20) StackCopy-8 82.6ms ± 3% 78.4ms ± 6% -5.15% (p=0.000 n=19+20) StackCopyNoCache-8 130ms ± 3% 122ms ± 3% -6.44% (p=0.000 n=20+20) Change-Id: If7d8a08c50a4e2e76e4331b399396c5dbe88c2ce Reviewed-on: https://go-review.googlesource.com/108945 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Austin Clements authored
Currently, when the runtime looks up the stack map for a frame, it uses frame.continpc - 1 unless continpc is the function entry PC, in which case it uses frame.continpc. As a result, if continpc is the function entry point (which happens for deferred frames), it will actually look up the stack map *following* the first instruction. I think, though I am not positive, that this is always okay today because the first instruction of a function can never change the stack map. It's usually not a CALL, so it doesn't have PCDATA. Or, if it is a CALL, it has to have the entry stack map. But we're about to start emitting stack maps at every instruction that changes them, which means the first instruction can have PCDATA (notably, in leaf functions that don't have a prologue). To prepare for this, tweak how the runtime looks up stack map indexes so that if continpc is the function entry point, it directly uses the entry stack map. For #24543. Change-Id: I85aa818041cd26aff416f7b1fba186e9c8ca6568 Reviewed-on: https://go-review.googlesource.com/109349Reviewed-by: Rick Hudson <rlh@golang.org>
-
- 28 Apr, 2018 2 commits
-
-
bill_ofarrell authored
This instruction was introduced on the z14 to accelerate "limbified" multiplications for certain cryptographic algorithms. This change allows it to be used in Go assembly. Change-Id: Ic93dae7fec1756f662874c08a5abc435bce9dd9e Reviewed-on: https://go-review.googlesource.com/109695 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
fanzha02 authored
Current optab entries are unordered, because the new instructions are added at the end of the optab. The patch reorders them by comments in optab, such as arithmetic operations, logical operations and a series of load/store etc. The patch removes the VMOVS opcode because FMOVS already has the same operation. Change-Id: Iccdf89ecbb3875b9dfcb6e06be2cc19c7e5581a2 Reviewed-on: https://go-review.googlesource.com/109896 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
- 27 Apr, 2018 12 commits
-
-
Richard Musiol authored
Return a non-zero exit code if the WebAssembly host fails to compile the WebAssmbly bytecode to machine code. Change-Id: I774309db2872b6a2de77a1b0392608058414160d Reviewed-on: https://go-review.googlesource.com/110097Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Ben Shi authored
ARM64 supports efficient instructions which combine shift, addition, load/store together. Such as "MOVD (R0)(R1<<3), R2" and "MOVWU R6, (R4)(R1<<2)". This CL optimizes the compiler to emit such efficient instuctions. And below is some test data. 1. binary size before/after binary size change pkg/linux_arm64 +80.1KB pkg/tool/linux_arm64 +121.9KB go -4.3KB gofmt -64KB 2. go1 benchmark There is big improvement for the test case Fannkuch11, and slight improvement for sme others, excluding noise. name old time/op new time/op delta BinaryTree17-4 43.9s ± 2% 44.0s ± 2% ~ (p=0.820 n=30+30) Fannkuch11-4 30.6s ± 2% 24.5s ± 3% -19.93% (p=0.000 n=25+30) FmtFprintfEmpty-4 500ns ± 0% 499ns ± 0% -0.11% (p=0.000 n=23+25) FmtFprintfString-4 1.03µs ± 0% 1.04µs ± 3% ~ (p=0.065 n=29+30) FmtFprintfInt-4 1.15µs ± 3% 1.15µs ± 4% -0.56% (p=0.000 n=30+30) FmtFprintfIntInt-4 1.80µs ± 5% 1.82µs ± 0% ~ (p=0.094 n=30+24) FmtFprintfPrefixedInt-4 2.17µs ± 5% 2.20µs ± 0% ~ (p=0.100 n=30+23) FmtFprintfFloat-4 3.08µs ± 3% 3.09µs ± 4% ~ (p=0.123 n=30+30) FmtManyArgs-4 7.41µs ± 4% 7.17µs ± 1% -3.26% (p=0.000 n=30+23) GobDecode-4 93.7ms ± 0% 94.7ms ± 4% ~ (p=0.685 n=24+30) GobEncode-4 78.7ms ± 7% 77.1ms ± 0% ~ (p=0.729 n=30+23) Gzip-4 4.01s ± 0% 3.97s ± 5% -1.11% (p=0.037 n=24+30) Gunzip-4 389ms ± 4% 384ms ± 0% ~ (p=0.155 n=30+23) HTTPClientServer-4 536µs ± 1% 537µs ± 1% ~ (p=0.236 n=30+30) JSONEncode-4 179ms ± 1% 182ms ± 6% ~ (p=0.763 n=24+30) JSONDecode-4 843ms ± 0% 839ms ± 6% -0.42% (p=0.003 n=25+30) Mandelbrot200-4 46.5ms ± 0% 46.5ms ± 0% +0.02% (p=0.000 n=26+26) GoParse-4 44.3ms ± 6% 43.3ms ± 0% ~ (p=0.067 n=30+27) RegexpMatchEasy0_32-4 1.07µs ± 7% 1.07µs ± 4% ~ (p=0.835 n=30+30) RegexpMatchEasy0_1K-4 5.51µs ± 0% 5.49µs ± 0% -0.35% (p=0.000 n=23+26) RegexpMatchEasy1_32-4 1.01µs ± 0% 1.02µs ± 4% +0.96% (p=0.014 n=24+30) RegexpMatchEasy1_1K-4 7.43µs ± 0% 7.18µs ± 0% -3.41% (p=0.000 n=23+24) RegexpMatchMedium_32-4 1.78µs ± 0% 1.81µs ± 4% +1.47% (p=0.012 n=23+30) RegexpMatchMedium_1K-4 547µs ± 1% 542µs ± 3% -0.90% (p=0.003 n=24+30) RegexpMatchHard_32-4 30.4µs ± 0% 29.7µs ± 0% -2.15% (p=0.000 n=19+23) RegexpMatchHard_1K-4 913µs ± 0% 915µs ± 6% +0.25% (p=0.012 n=24+30) Revcomp-4 6.32s ± 1% 6.42s ± 4% ~ (p=0.342 n=25+30) Template-4 868ms ± 6% 878ms ± 6% +1.15% (p=0.000 n=30+30) TimeParse-4 4.57µs ± 4% 4.59µs ± 3% +0.65% (p=0.010 n=29+30) TimeFormat-4 4.51µs ± 0% 4.50µs ± 0% -0.27% (p=0.000 n=27+24) [Geo mean] 695µs 689µs -0.92% name old speed new speed delta GobDecode-4 8.19MB/s ± 0% 8.12MB/s ± 4% ~ (p=0.680 n=24+30) GobEncode-4 9.76MB/s ± 7% 9.96MB/s ± 0% ~ (p=0.616 n=30+23) Gzip-4 4.84MB/s ± 0% 4.89MB/s ± 4% +1.16% (p=0.030 n=24+30) Gunzip-4 49.9MB/s ± 4% 50.6MB/s ± 0% ~ (p=0.162 n=30+23) JSONEncode-4 10.9MB/s ± 1% 10.7MB/s ± 6% ~ (p=0.575 n=24+30) JSONDecode-4 2.30MB/s ± 0% 2.32MB/s ± 5% +0.72% (p=0.003 n=22+30) GoParse-4 1.31MB/s ± 6% 1.34MB/s ± 0% +2.26% (p=0.002 n=30+27) RegexpMatchEasy0_32-4 30.0MB/s ± 6% 30.0MB/s ± 4% ~ (p=1.000 n=30+30) RegexpMatchEasy0_1K-4 186MB/s ± 0% 187MB/s ± 0% +0.35% (p=0.000 n=23+26) RegexpMatchEasy1_32-4 31.8MB/s ± 0% 31.5MB/s ± 4% -0.92% (p=0.012 n=25+30) RegexpMatchEasy1_1K-4 138MB/s ± 0% 143MB/s ± 0% +3.53% (p=0.000 n=23+24) RegexpMatchMedium_32-4 560kB/s ± 0% 553kB/s ± 4% -1.19% (p=0.005 n=23+30) RegexpMatchMedium_1K-4 1.87MB/s ± 0% 1.89MB/s ± 3% +1.04% (p=0.002 n=24+30) RegexpMatchHard_32-4 1.05MB/s ± 0% 1.08MB/s ± 0% +2.40% (p=0.000 n=19+23) RegexpMatchHard_1K-4 1.12MB/s ± 0% 1.12MB/s ± 5% +0.12% (p=0.006 n=25+30) Revcomp-4 40.2MB/s ± 1% 39.6MB/s ± 4% ~ (p=0.242 n=25+30) Template-4 2.24MB/s ± 6% 2.21MB/s ± 6% -1.15% (p=0.000 n=30+30) [Geo mean] 7.87MB/s 7.91MB/s +0.44% Change-Id: If374cb7abf83537aa0a176f73c0f736f7800db03 Reviewed-on: https://go-review.googlesource.com/108735Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Cherry Zhang authored
The init function and runtime.addmoduledata were not added when building plugin, which caused the runtime could not find the module. Testplugin is still not enabled on linux/arm64 (https://go.googlesource.com/go/+/master/src/cmd/dist/test.go#948) because the gold linker on the builder is too old, which fails with an internal error (see issue #17138). I tested locally and it passes. Fixes #24940. Updates #17138. Change-Id: I26aebca6c38a3443af0949471fa12b6d550e8c6c Reviewed-on: https://go-review.googlesource.com/109917 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Milan Knezevic authored
mips64 softfloat support is based on mips implementation and introduces new enviroment variable GOMIPS64. GOMIPS64 is a GOARCH=mips64{,le} specific option, for a choice between hard-float and soft-float. Valid values are 'hardfloat' (default) and 'softfloat'. It is passed to the assembler as 'GOMIPS64_{hardfloat,softfloat}'. Change-Id: I7f73078627f7cb37c588a38fb5c997fe09c56134 Reviewed-on: https://go-review.googlesource.com/108475Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
Hex before: d0 a1 Hex after: 43 Not sure where that came from. Change-Id: I189e7e21f8faf480ba72846b956a149976f720f8 Reviewed-on: https://go-review.googlesource.com/109777Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Zhou Peng authored
Change-Id: I561640768c43491288e7f5bd1a34247787793dab Reviewed-on: https://go-review.googlesource.com/109935Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Yasuhiro Matsumoto authored
Fixes #24999 Change-Id: Ie0bb6a6e0fa3992cdd272d42347af65ae7c95463 Reviewed-on: https://go-review.googlesource.com/108755 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
Daniel Martí authored
As a follow-up to the first README for cmd/compile/internal/ssa. Since this is the parent package for all the compiler packages, this README serves as an overview of the compiler and its packages. As more READMEs are added for specific parts with more detail, such as ssa's, they can be linked from this one. Thanks to Iskander Sharipov, Josh Bleecher Snyder, Matthew Dempsky, Alberto Donizetti, and Robert Griesemer for helping with all the details in this document. Change-Id: I820a535e25dce86ccc667ce1c6e92b75fc32f3af Reviewed-on: https://go-review.googlesource.com/103935Reviewed-by: Martin Möhrmann <moehrmann@google.com> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
Not a big win, but cheap. name old alloc/op new alloc/op delta Template 34.4MB ± 0% 34.4MB ± 0% -0.20% (p=0.000 n=15+15) Unicode 29.2MB ± 0% 29.3MB ± 0% +0.17% (p=0.000 n=15+15) GoTypes 113MB ± 0% 113MB ± 0% -0.22% (p=0.000 n=15+15) Compiler 509MB ± 0% 508MB ± 0% -0.11% (p=0.000 n=15+14) SSA 1.46GB ± 0% 1.46GB ± 0% -0.08% (p=0.000 n=14+15) Flate 23.8MB ± 0% 23.7MB ± 0% -0.22% (p=0.000 n=15+15) GoParser 27.9MB ± 0% 27.8MB ± 0% -0.21% (p=0.000 n=14+15) Reflect 77.2MB ± 0% 77.0MB ± 0% -0.27% (p=0.000 n=14+15) Tar 34.0MB ± 0% 33.9MB ± 0% -0.21% (p=0.000 n=13+15) XML 42.6MB ± 0% 42.5MB ± 0% -0.15% (p=0.000 n=15+15) [Geo mean] 75.8MB 75.7MB -0.15% name old allocs/op new allocs/op delta Template 322k ± 0% 320k ± 0% -0.60% (p=0.000 n=15+15) Unicode 337k ± 0% 336k ± 0% -0.23% (p=0.000 n=12+15) GoTypes 1.13M ± 0% 1.12M ± 0% -0.58% (p=0.000 n=15+14) Compiler 4.67M ± 0% 4.65M ± 0% -0.38% (p=0.000 n=14+15) SSA 11.7M ± 0% 11.6M ± 0% -0.25% (p=0.000 n=15+15) Flate 216k ± 0% 214k ± 0% -0.67% (p=0.000 n=15+15) GoParser 271k ± 0% 270k ± 0% -0.57% (p=0.000 n=15+15) Reflect 927k ± 0% 920k ± 0% -0.72% (p=0.000 n=13+14) Tar 318k ± 0% 316k ± 0% -0.57% (p=0.000 n=15+15) XML 376k ± 0% 375k ± 0% -0.46% (p=0.000 n=14+14) [Geo mean] 731k 727k -0.50% Change-Id: I1417c5881e866fb3efe62a3d0fbe1134275da31a Reviewed-on: https://go-review.googlesource.com/109755 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
I forgot this in CL 109358. Change-Id: Ia5e8bd9cf43393f098b101a0d6a0c526e3e4f101 Reviewed-on: https://go-review.googlesource.com/109775 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Kevin Burke authored
If the vetted function supplies zero arguments, previously you would get an error message like this: Printf format %v reads arg #1, but call has only 0 args "has only 0 args" is an odd construction, and "has 0 args" sounds better. Getting rid of "only" in all cases simplifies the code and reads just as well. Change-Id: I4706dfe4a75f13bf4db9c0650e459ca676710752 Reviewed-on: https://go-review.googlesource.com/109457 Run-TryBot: Kevin Burke <kev@inburke.com> Run-TryBot: David Symonds <dsymonds@golang.org> Reviewed-by: David Symonds <dsymonds@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Daniel Martí authored
Simplify some C-style loops with range statements, and move some declarations closer to their uses. While at it, ensure that all the SymbolType consts are typed. Change-Id: I04b06afb2c1fb249ef8093a0c5cca0a597d1e05c Reviewed-on: https://go-review.googlesource.com/105217 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 26 Apr, 2018 21 commits
-
-
Matthew Dempsky authored
Using oldname+resolve is how typecheck handles this anyway. Passes toolstash -cmp, with both -iexport enabled and disabled. Change-Id: I12b0f0333d6b86ce6bfc4d416c461b5f15c1110d Reviewed-on: https://go-review.googlesource.com/109715 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org>
-
Cherry Zhang authored
Getcallerpc/sp no longer takes argument. Change-Id: I80b30020e798990c59c8ffd0a4e078af6a75aea0 Reviewed-on: https://go-review.googlesource.com/109696Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Hana Kim authored
Also change tasks to be represented as "slices" instead of asynchronous events which are more efficiently represented in trace viewer data model. This change allows to utilize the flow events (arrows) to represent task hierarchies. Introduced RegionArgs and TaskArgs where the task id infomation and goroutine id informations are stored for information-purpose. Change-Id: I11bec7dd716fdfc5f94ea39661b2e51344367a6f Reviewed-on: https://go-review.googlesource.com/109337Reviewed-by: Heschi Kreinick <heschi@google.com>
-
Hana Kim authored
Change-Id: I919444886a264bc11026faa8ccda193bf09a8d8d Reviewed-on: https://go-review.googlesource.com/109675Reviewed-by: Heschi Kreinick <heschi@google.com>
-
Josh Bleecher Snyder authored
Change-Id: I220a459f67ecb310b6e9a526a1ff55527d421e70 Reviewed-on: https://go-review.googlesource.com/109416 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Cherry Zhang authored
Fixes #24883. Change-Id: Iff992ec3f2f31f4d82923d7cc806df4ee58e70b0 Reviewed-on: https://go-review.googlesource.com/108295 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Elias Naur <elias.naur@gmail.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Cherry Zhang authored
getcallersp is intrinsified, and so the dummy arg is no longer needed. Remove it, as well as a few dummy args that are solely to feed getcallersp. Change-Id: Ibb6c948ff9c56537042b380ac3be3a91b247aaa6 Reviewed-on: https://go-review.googlesource.com/109596 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alberto Donizetti authored
The example in the 'A web server' section of the effective Go document uses Google's image charts API (at chart.apis.google.com). The service is now deprecated (see developers.google.com/chart/image), and visiting http://chart.apis.google.com gives a 404. The endpoint is still active, so the Go code in the example still works, but there's no point in making the link clickable by the user if the page returns a 404. Change the element to `<code>`. Change-Id: Ie67f4723cfa636e3dc1460507055b6bbb2b0970c Reviewed-on: https://go-review.googlesource.com/109576Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Lubomir I. Ivanov (VMware) authored
'%SystemRoot%/System32/chcp.com' is a tool on Windows that is used to change the active code page in the console. 'go test os/exec' can fail with: "'chcp' is not recognized as an internal or external command" The test uses a custom PATH variable but does not include '%SystemRoot%/System32'. Always append that to PATH. Updates #24709 Change-Id: I1ab83b326072e3f0086b391b836234bcfd8a1fb7 GitHub-Last-Rev: fb930529bb0673cdec921df5a2821c4b41de745e GitHub-Pull-Request: golang/go#25088 Reviewed-on: https://go-review.googlesource.com/109361 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Lubomir I. Ivanov (VMware) authored
'%SystemRoot%/System32/chcp.com' is a tool on Windows that is used to change the active code page in the console. 'go test path/filepath' can fail with: "'chcp' is not recognized as an internal or external command" The test uses a custom PATH variable but does not include '%SystemRoot%/System32'. Always append that to PATH. Updates #24709 Change-Id: Ib4c83ffdcc5dd6eb7bb34c07386cf2ab61dcae57 GitHub-Last-Rev: fac92613cce0d60f6794ad850618ed64d04c76fd GitHub-Pull-Request: golang/go#25089 Reviewed-on: https://go-review.googlesource.com/109362 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
On amd64, Ctz must include special handling of zeros. But the prove pass has enough information to detect whether the input is non-zero, allowing a more efficient lowering. Introduce new CtzNonZero ops to capture and use this information. Benchmark code: func BenchmarkVisitBits(b *testing.B) { b.Run("8", func(b *testing.B) { for i := 0; i < b.N; i++ { x := uint8(0xff) for x != 0 { sink = bits.TrailingZeros8(x) x &= x - 1 } } }) // and similarly so for 16, 32, 64 } name old time/op new time/op delta VisitBits/8-8 7.27ns ± 4% 5.58ns ± 4% -23.35% (p=0.000 n=28+26) VisitBits/16-8 14.7ns ± 7% 10.5ns ± 4% -28.43% (p=0.000 n=30+28) VisitBits/32-8 27.6ns ± 8% 19.3ns ± 3% -30.14% (p=0.000 n=30+26) VisitBits/64-8 44.0ns ±11% 38.0ns ± 5% -13.48% (p=0.000 n=30+30) Fixes #25077 Change-Id: Ie6e5bd86baf39ee8a4ca7cadcf56d934e047f957 Reviewed-on: https://go-review.googlesource.com/109358 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Michael Munday authored
Running 'go run *.go' in the gen directory resulted in this diff. Change-Id: Iee398a720f54d3f2c3c122fc6fc45a708a39e45e Reviewed-on: https://go-review.googlesource.com/109575 Run-TryBot: Michael Munday <mike.munday@ibm.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Ian Lance Taylor authored
Fixes #25106 Change-Id: I315817543b44aa581980828a32ecc224f8c0a44d Reviewed-on: https://go-review.googlesource.com/109316Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Diogo Pinela authored
When creating a directory, Writer.Create now returns a dummy io.Writer that always returns an error on Write. Fixes #24043 Change-Id: I7792f54440d45d22d0aa174cba5015ed5fab1c5c Reviewed-on: https://go-review.googlesource.com/108615Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com> Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alberto Donizetti authored
NewReplacer's documentation says that "replacements are performed in order", meaning that substrings are replaced in the order they appear in the target string, and not that the old->new replacements are applied in the order they're passed to NewReplacer. Rephrase the doc to make this clearer. Fixes #25071 Change-Id: Icf3aa6a9d459b94764c9d577e4a76ad8c04d158d Reviewed-on: https://go-review.googlesource.com/109375Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Balaram Makam authored
This change provides VSRI instruction for ChaCha20Poly1305 implementation. Change-Id: Ifee727b6f3982b629b44a67cac5bbe87ca59027b Reviewed-on: https://go-review.googlesource.com/109342 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Keith Randall authored
Doesn't cause an error, see #25085. But we should fix it nonetheless. Change-Id: I7b6799e0a95475202cacefc3a7f02487e61bfd31 Reviewed-on: https://go-review.googlesource.com/109355Reviewed-by: Heschi Kreinick <heschi@google.com>
-
Balaram Makam authored
Use CMN/TST to simplify comparisons. This can reduce the register pressure by removing single def/use registers for example: ADDW R0, R1, R8 -> CMNW R1, R0 ; CMN is an alias of ADDS. CBZW R8, label -> BEQ label ; single def/use of R8 removed. Little change in performance of go1 benchmark on Amberwing: name old time/op new time/op delta RegexpMatchEasy0_32 247ns ± 0% 246ns ± 0% -0.40% (p=0.008 n=5+5) RegexpMatchEasy0_1K 581ns ± 0% 580ns ± 0% ~ (p=0.079 n=4+5) RegexpMatchEasy1_32 244ns ± 0% 243ns ± 0% -0.41% (p=0.008 n=5+5) RegexpMatchEasy1_1K 804ns ± 0% 806ns ± 0% +0.25% (p=0.016 n=5+4) RegexpMatchMedium_32 313ns ± 0% 311ns ± 0% -0.64% (p=0.008 n=5+5) RegexpMatchMedium_1K 52.2µs ± 0% 51.9µs ± 0% -0.51% (p=0.008 n=5+5) RegexpMatchHard_32 2.76µs ± 3% 2.74µs ± 0% ~ (p=0.683 n=5+5) RegexpMatchHard_1K 78.8µs ± 0% 78.9µs ± 0% +0.04% (p=0.008 n=5+5) FmtFprintfEmpty 58.6ns ± 0% 57.7ns ± 0% -1.54% (p=0.008 n=5+5) FmtFprintfString 118ns ± 0% 115ns ± 0% -2.54% (p=0.008 n=5+5) FmtFprintfInt 119ns ± 0% 119ns ± 0% ~ (all equal) FmtFprintfIntInt 192ns ± 0% 192ns ± 0% ~ (all equal) FmtFprintfPrefixedInt 224ns ± 0% 205ns ± 0% -8.48% (p=0.008 n=5+5) FmtFprintfFloat 336ns ± 0% 333ns ± 1% ~ (p=0.683 n=5+5) FmtManyArgs 779ns ± 1% 760ns ± 1% -2.41% (p=0.008 n=5+5) Gzip 437ms ± 0% 436ms ± 0% -0.27% (p=0.008 n=5+5) HTTPClientServer 90.1µs ± 1% 91.1µs ± 0% +1.19% (p=0.008 n=5+5) JSONEncode 20.1ms ± 0% 20.2ms ± 1% ~ (p=0.690 n=5+5) JSONDecode 94.5ms ± 1% 94.1ms ± 1% ~ (p=0.095 n=5+5) Mandelbrot200 5.37ms ± 0% 5.37ms ± 0% ~ (p=0.421 n=5+5) TimeParse 450ns ± 0% 446ns ± 0% -0.89% (p=0.000 n=5+4) TimeFormat 483ns ± 1% 473ns ± 0% -2.19% (p=0.008 n=5+5) Template 90.6ms ± 0% 89.7ms ± 0% -0.93% (p=0.008 n=5+5) GoParse 5.97ms ± 0% 6.01ms ± 0% +0.65% (p=0.008 n=5+5) BinaryTree17 11.8s ± 0% 11.7s ± 0% -0.28% (p=0.016 n=5+5) Revcomp 669ms ± 0% 669ms ± 0% ~ (p=0.222 n=5+5) Fannkuch11 3.28s ± 0% 3.34s ± 0% +1.72% (p=0.016 n=4+5) [Geo mean] 46.6µs 46.3µs -0.74% name old speed new speed delta RegexpMatchEasy0_32 129MB/s ± 0% 130MB/s ± 0% +0.32% (p=0.016 n=5+4) RegexpMatchEasy0_1K 1.76GB/s ± 0% 1.76GB/s ± 0% +0.13% (p=0.016 n=4+5) RegexpMatchEasy1_32 131MB/s ± 0% 132MB/s ± 0% +0.32% (p=0.008 n=5+5) RegexpMatchEasy1_1K 1.27GB/s ± 0% 1.27GB/s ± 0% -0.24% (p=0.016 n=5+4) RegexpMatchMedium_32 3.19MB/s ± 0% 3.21MB/s ± 0% +0.63% (p=0.008 n=5+5) RegexpMatchMedium_1K 19.6MB/s ± 0% 19.7MB/s ± 0% +0.51% (p=0.029 n=4+4) RegexpMatchHard_32 11.6MB/s ± 2% 11.7MB/s ± 0% ~ (p=1.000 n=5+5) RegexpMatchHard_1K 13.0MB/s ± 0% 13.0MB/s ± 0% ~ (p=0.079 n=4+5) Gzip 44.4MB/s ± 0% 44.5MB/s ± 0% +0.27% (p=0.008 n=5+5) JSONEncode 96.4MB/s ± 0% 96.2MB/s ± 1% ~ (p=0.579 n=5+5) JSONDecode 20.5MB/s ± 1% 20.6MB/s ± 1% ~ (p=0.111 n=5+5) Template 21.4MB/s ± 0% 21.6MB/s ± 0% +0.94% (p=0.008 n=5+5) GoParse 9.70MB/s ± 0% 9.63MB/s ± 0% -0.68% (p=0.016 n=4+5) Revcomp 380MB/s ± 0% 380MB/s ± 0% ~ (p=0.222 n=5+5) [Geo mean] 55.3MB/s 55.4MB/s +0.23% Change-Id: I2e5338138991d9bc984e67b51212aa5d1b0f2a6b Reviewed-on: https://go-review.googlesource.com/97335Reviewed-by: Cherry Zhang <cherryyz@google.com> Run-TryBot: Cherry Zhang <cherryyz@google.com>
-
Carlos Eduardo Seo authored
This change implements math.Round as an intrinsic on ppc64x so it can be done using a single instruction. benchmark old ns/op new ns/op delta BenchmarkRound-16 2.60 0.69 -73.46% Change-Id: I9408363e96201abdfc73ced7bcd5f0c29db006a8 Reviewed-on: https://go-review.googlesource.com/109395 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
-
Matthew Dempsky authored
When we moved racewalk to buildssa, we disabled SSA of structs with 2-4 fields while instrumenting because it caused false dependencies because for "x.f" we would emit (StructSelect (Load (Addr x)) "f") Even though we later simplify this to (Load (OffPtr (Addr x) "f")) the instrumentation saw a load of x in its entirety and would issue appropriate race/msan calls. The fix taken here is to directly emit the OffPtr form when x.f is addressable and can't be represented in SSA form. Change-Id: I0caf37bced52e9c16937466b0ac8cab6d356e525 Reviewed-on: https://go-review.googlesource.com/109360 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
-
Yuval Pavel Zholkover authored
This is a followup for CL 93156. Fixes #22942. Change-Id: Ic6e2de44011d041b91454353a6f2e3b0cf590060 Reviewed-on: https://go-review.googlesource.com/108095 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-