- 28 Feb, 2016 3 commits
-
-
David Chase authored
Exposed data already in sdom to avoid recreating it in prove. Change-Id: I834c9c03ed8faeaee013e5a1b3f955908f0e0915 Reviewed-on: https://go-review.googlesource.com/19999 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alexandru Moșoi <alexandru@mosoi.ro>
-
Alexandru Moșoi authored
* It does very simple bounds checking elimination. E.g. removes the second check in for i := range a { a[i]++; a[i++]; } * Improves on the following redundant expression: return a6 || (a6 || (a6 || a4)) || (a6 || (a4 || a6 || (false || a6))) * Linear in the number of block edges. I patched in CL 12960 that does bounds, nil and constant propagation to make sure this CL is not just redundant. Size of pkg/tool/linux_amd64/* (excluding compile which is affected by this change): With IsInBounds and IsSliceInBounds -this -12960 92285080 +this -12960 91947416 -this +12960 91978976 +this +12960 91923088 Gain is ~110% of 12960. Without IsInBounds and IsSliceInBounds (older run) -this -12960 95515512 +this -12960 95492536 -this +12960 95216920 +this +12960 95204440 Shaves 22k on its own. * Can we handle IsInBounds better with this? In for i := range a { a[i]++; } the bounds checking at a[i] is not eliminated. Change-Id: I98957427399145fb33693173fd4d5a8d71c7cc20 Reviewed-on: https://go-review.googlesource.com/19710Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Todd Neal authored
Add the max arg length to opcodes and use it in zcse. Doesn't affect speed, but allows better checking in checkFunc and removes the need to keep a list of zero arg opcodes up to date. Change-Id: I157c6587154604119720ec6228b767b6e52bb5c7 Reviewed-on: https://go-review.googlesource.com/19994Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@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 2 commits
-
-
Keith Randall authored
non-SSA backends are all over the map as to whether nil checks get removed or not. amd64, 386, 386/387, arm are all subtly different. Remove these extra checks for now, they are in nilptr3_ssa.go so they won't get lost. Change-Id: I2e0051f488fb2cb7278c6fdd44cb9d68b5778345 Reviewed-on: https://go-review.googlesource.com/19961Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
Just like we do for integer loads/stores. Update #14511 Change-Id: Ic6ca6b54301438a5701ea5fb0be755451cb24d45 Reviewed-on: https://go-review.googlesource.com/19923Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Run-TryBot: Keith Randall <khr@golang.org>
-
- 25 Feb, 2016 3 commits
-
-
Keith Randall authored
Our stack frame sizes look pretty good now. Lower the stack guard from 1024 to 720. Tip is currently using 720. We could go lower (to 640 at least) except PPC doesn't like that. Change-Id: Ie5f96c0e822435638223f1e8a2bd1a1eed68e6aa Reviewed-on: https://go-review.googlesource.com/19922 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
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/19885Reviewed-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 7 commits
-
-
Keith Randall authored
Forgot the obvious case. Allows us to remove the load in: func f(p *int, x int) int { *p = x + 5 return *p } Change-Id: I93686d8240bab3a1d166b88e224cf71e3d947aef Reviewed-on: https://go-review.googlesource.com/19905 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
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>
-
Keith Randall authored
Remove the stuff that's already done. Change-Id: I3b4fc827240d45dd051dc36897883532d8900a0c Reviewed-on: https://go-review.googlesource.com/19906Reviewed-by: David Chase <drchase@google.com>
-
David Chase authored
In regalloc, make LoadReg instructions use the line number of their *use*, not their *source*. This reduces the tendency of debugger stepping to "jump around" the program. Change-Id: I59e2eeac4dca9168d8af3a93effbc5bdacac2881 Reviewed-on: https://go-review.googlesource.com/19836 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Todd Neal authored
Construct better initial partitions by recursively comparing values and their arguments. This saves one second on compile of arithConst_ssa.go (4.3s to 3.3s) and shows a 3-5% increase with compilebench. name old time/op new time/op delta Template 266ms ± 3% 253ms ± 4% -5.08% (p=0.032 n=5+5) GoTypes 927ms ± 3% 885ms ± 2% -4.55% (p=0.016 n=5+5) Compiler 3.91s ± 3% 3.73s ± 2% -4.49% (p=0.008 n=5+5) MakeBash 31.6s ± 1% 30.5s ± 3% -3.51% (p=0.016 n=5+5) Change-Id: I6ede31ff459131ccfed69531acfbd06b19837700 Reviewed-on: https://go-review.googlesource.com/19838Reviewed-by: David Chase <drchase@google.com>
-
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/19848Reviewed-by: David Chase <drchase@google.com>
-
Alexandru Moșoi authored
Saves about 2k for binaries in pkg/tool/linux_amd64. Also useful when opt runs after cse (as in 12960) which reorders arguments for commutative operations such as Add64. Change-Id: I49ad53afa53db9736bd35c425f4fb35fb511fd63 Reviewed-on: https://go-review.googlesource.com/19827 Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org>
-
- 23 Feb, 2016 18 commits
-
-
Keith Randall authored
Semi-regular merge from tip to dev.ssa. Change-Id: If7d2269f267bcbc0ecd3a483d349951044470e3f
-
Alberto Donizetti authored
name old time/op new time/op delta DecodeValidASCII-4 94.7ns ± 1% 87.4ns ± 1% -7.71% (p=0.000 n=10+9) DecodeValidJapaneseChars-4 91.0ns ± 2% 84.8ns ± 0% -6.77% (p=0.000 n=9+10) DecodeRune-4 16.5ns ± 0% 16.6ns ± 2% ~ (p=0.108 n=9+10) For #6957 Change-Id: I618c15c2a42ef7ec6a5cd163b7c3f1a65ca4ad01 Reviewed-on: https://go-review.googlesource.com/19826Reviewed-by: Rob Pike <r@golang.org>
-
Matthew Dempsky authored
This reverts commit f28bbb77. Change-Id: I82fb81dcff3ddcaefef72949f1ef3a41bcd22301 Reviewed-on: https://go-review.googlesource.com/19849 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Paul Marks authored
The previous Happy Eyeballs implementation would intentionally leak connections, because dialTCP could not be reliably terminated upon losing the race. Now that dialTCP supports cancelation (plan9 excluded), dialParallel can wait for responses from both the primary and fallback racers, strictly before returning control to the caller. In dial_test.go, we no longer need Sleep to avoid leaks. Also, fix a typo in the Benchmark IPv4 address. Updates #11225 Fixes #14279 Change-Id: Ibf3fe5c7ac2f7a438c1ab2cdb57032beb8bc27b5 Reviewed-on: https://go-review.googlesource.com/19390Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Robert Griesemer authored
The () parentheses grouped wrongly. Removed them completely in favor of separate 2- and 3-index slice alternatives which is clearer. Fixes #14477. Change-Id: I0b7521ac912130d9ea8740b8793b3b88e2609418 Reviewed-on: https://go-review.googlesource.com/19853Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alexandru Moșoi authored
While investigating the differences between 19710 (remove tautological controls) and 12960 (bounds and nil propagation) I observed that part of the wins of 19710 come from missed opportunities for deadcode elimination due to phis. See for example runtime.stackcacherelease. 19710 happens much later than 12960 and has more chances to eliminate bounds. Size of pkg/tool/linux_amd64/* excluding compile: -this -12960 95882248 +this -12960 95880120 -this +12960 95581512 +this +12960 95555224 This change saves about 25k. Change-Id: Id2f4e55fc92b71595842ce493c3ed527d424fe0e Reviewed-on: https://go-review.googlesource.com/19728Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
Makes godoc 10KB smaller. For #6853. Change-Id: Id54bd8c82cb2a1ba11d2d724e3107f73024b19d9 Reviewed-on: https://go-review.googlesource.com/19696 Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Alberto Donizetti authored
Found running go vet on the package. It barks that regexp/backtrack.go:257: unreachable code regexp/backtrack.go:302: unreachable code For #11041 Change-Id: I0f5ba0d6183108fba3d144991b826273db0ffb09 Reviewed-on: https://go-review.googlesource.com/19824Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Harshavardhana authored
Current code does not print any response headers from httputil.DumpResponse(). PUT /miniocloud/new-file HTTP/1.1 Host: s3.amazonaws.com User-Agent: Go-http-client/1.1 Content-Length: 11 Accept-Encoding: gzip HTTP/1.1 200 OK With this fix we get an appropriate output for httputil.DumpResponse(). PUT /miniocloud/new-file HTTP/1.1 Host: s3.amazonaws.com User-Agent: Go-http-client/1.1 Content-Length: 11 Accept-Encoding: gzip HTTP/1.1 200 OK Content-Length: 0 Date: Thu, 14 Jan 2016 03:04:42 GMT Etag: "3e25960a79dbc69b674cd4ec67a72c62" Server: AmazonS3 X-Amz-Id-2: qnXyH6sknlovV0Myy3emFAXTNtI/sQIcu1ZXNq/6wd17K32tQ7WNGB1qb3nzCpW2DhfeZ/MbWfw= X-Amz-Request-Id: 8422EACB0CC492BD Fixes #13942 Change-Id: Ida063cc3524a96170d8a837893f7c9f49b6cf98e Reviewed-on: https://go-review.googlesource.com/18624Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shawn Smith authored
Change-Id: I6035941df8b0de6aeaf6c05df7257bcf6e9191fe Reviewed-on: https://go-review.googlesource.com/19320Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Alberto Donizetti authored
For #6957 Change-Id: Ic497c12f33efc933e9fe81f6cd1b2a0a01abbabf Reviewed-on: https://go-review.googlesource.com/19820 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Matthew Dempsky authored
util.go was originally added in golang.org/cl/4851, and later moved to its current location in golang.org/cl/10287. Change-Id: I10b4941d42ae1ff2e78990c497c1347bbbae4e3d Reviewed-on: https://go-review.googlesource.com/19851Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Matthew Dempsky authored
Change-Id: Ib413b0cb16405965455d7764a8c4a22bf431389b Reviewed-on: https://go-review.googlesource.com/19850 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
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/19740Reviewed-by: Keith Randall <khr@golang.org>
-
Robert Griesemer authored
Pass lexer around so state is accessible and dependency is explicit. In the process remove EOF -> '\n' conversion that has to be corrected for when reporting errors. Change-Id: If95564b70e7484dedc1f5348e585cd19acbc1243 Reviewed-on: https://go-review.googlesource.com/19819 Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
-
Robert Griesemer authored
Fixes #14475. Change-Id: I1b5b0a9793a417572ec55f313185d03ad5ae9d01 Reviewed-on: https://go-review.googlesource.com/19846Reviewed-by: Robert Griesemer <gri@golang.org>
-
Todd Neal authored
Loads of stores from the same pointer with compatible types can be replaced with a copy. Change-Id: I514b3ed8e5b6a9c432946880eac67a51b1607932 Reviewed-on: https://go-review.googlesource.com/19743 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
They do the same thing, except memequal also has the short-circuit check if the two pointers are equal. A) We might as well always do the short-circuit check, it is only 2 instructions. B) The extra function call (memequal->memeq) is expensive. benchmark old ns/op new ns/op delta BenchmarkArrayEqual-8 8.56 5.31 -37.97% No noticeable affect on the former memeq user (maps). Fixes #14302 Change-Id: I85d1ada59ed11e64dd6c54667f79d32cc5f81948 Reviewed-on: https://go-review.googlesource.com/19843 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 22 Feb, 2016 6 commits
-
-
Brady Sullivan authored
A comment existed referencing RC4 coming before AES because of it's vulnerability to the Lucky 13 attack. This clarifies that the Lucky 13 attack only effects AES-CBC, and not AES-GCM. Fixes #14474 Change-Id: Idcb07b5e0cdb0f9257cf75abea60129ba495b5f5 Reviewed-on: https://go-review.googlesource.com/19845Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Rob Pike authored
The structure of the code meant that an embedded field was never checked for export status. We need to check the name of the type, which is either of type T or type *T, and T might be unexported. Fixes #14356. Change-Id: I56f468e9b8ae67e9ed7509ed0b91d860507baed2 Reviewed-on: https://go-review.googlesource.com/19701Reviewed-by: Robert Griesemer <gri@golang.org>
-
Matthew Dempsky authored
It's not needed on other OSes. Change-Id: Ia6b13510585392a7062374806527d33876beba2a Reviewed-on: https://go-review.googlesource.com/19818 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: David Crawshaw <crawshaw@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
Change-Id: I7414d2fab18ae6e7e7c50f8697ec64d38290f409 Reviewed-on: https://go-review.googlesource.com/19817 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Josh Bleecher Snyder authored
Cuts 20k off cmd/go and 32k off golang.org/x/tools/cmd/godoc, approx 0.15% each. For #6853 and #9930 Change-Id: Ic510b76b80a9153b1ede7b3533d2dbc16caa5c63 Reviewed-on: https://go-review.googlesource.com/19768 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Caio Marcelo de Oliveira Filho authored
When visiting the AST to add counters, there are special cases in which the code calls cuts the walking short by returning nil. In some cases certain nodes are ignored, e.g. Init and Cond inside IfStmt. The fix is to explicitly walk all the children nodes (not only Body and Else) when cutting the current walk. Similar approach was taken with SwitchStmt and TypeSwitchStmt. While the existing test code doesn't handle different counters in the same line, the generated HTML report does it correctly (because it takes column into account). The previous behavior caused lines in function literals to not be tracked when those literals were inside Init or Cond of an IfStmt for example. Fixes #14039. Change-Id: Iad591363330843ad833bd79a0388d709c8d0c8aa Reviewed-on: https://go-review.googlesource.com/19775Reviewed-by: Rob Pike <r@golang.org>
-