- 29 Jan, 2016 8 commits
-
-
Keith Randall authored
We used to compare the init state with == to 0 and 2, which requires 2 comparisons. Instead, compare with 1 and use <, ==. That requires only one comparison. This isn't a big deal performance-wise, as it is just init code. But there is a fair amount of init code, so this should help a bit with code size. Change-Id: I4a2765f1005776f0edce28ac143f4b7596d95a68 Reviewed-on: https://go-review.googlesource.com/18948Reviewed-by: David Chase <drchase@google.com>
-
Keith Randall authored
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>
-
Keith Randall authored
The old write barriers used _nostore versions, which don't work for Ian's cgo checker. Instead, we adopt the same write barrier pattern as the default compiler. It's a bit trickier to code up but should be more efficient. Change-Id: I6696c3656cf179e28f800b0e096b7259bd5f3bb7 Reviewed-on: https://go-review.googlesource.com/18941 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Keith Randall authored
Compiling && and || expressions often leads to control flow of the following form: p: If a goto b else c b: <- p ... x = phi(a, ...) If x goto t else u Note that if we take the edge p->b, then we are guaranteed to take the edge b->t also. So in this situation, we might as well go directly from p to t. Change-Id: I6974f1e6367119a2ddf2014f9741fdb490edcc12 Reviewed-on: https://go-review.googlesource.com/18910Reviewed-by: David Chase <drchase@google.com>
-
Keith Randall authored
For each value that needs to be in a fixed register at the end of the block, and try to pick that fixed register when the instruction generating that value is scheduled (or restored from a spill). Just used for end-of-block register requirements for now. Fixed-register instruction requirements (e.g. shift in ecx) can be added later. Also two-instruction constraints (input reg == output reg) might be recorded in a similar manner. Change-Id: I59916e2e7f73657bb4fc3e3b65389749d7a23fa8 Reviewed-on: https://go-review.googlesource.com/18774 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Keith Randall authored
The OpSB hack didn't quite work. We need to really CSE these ops to make regalloc happy. Change-Id: I9f4d7bfb0929407c84ee60c9e25ff0c0fbea84af Reviewed-on: https://go-review.googlesource.com/19083 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Keith Randall authored
Speeds up compilation by 6%. Change-Id: Ibaad95710323ddbe13c1b0351843fe43a48d776e Reviewed-on: https://go-review.googlesource.com/19080Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
Some tests make multiple Funcs per Config at once. With value & block caching, we can't do that any more. Change-Id: Ibdb60aa2fcf478f1726b3be0fcaa06b04433eb67 Reviewed-on: https://go-review.googlesource.com/19081Reviewed-by: Keith Randall <khr@golang.org>
-
- 28 Jan, 2016 2 commits
-
-
Keith Randall authored
Speeds up the compiler ~5%. Change-Id: Ia5cf0bcd58701fd14018ec77d01f03d5c7d6385b Reviewed-on: https://go-review.googlesource.com/19060Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
It is one of the slowest compiler phases right now, and we run two of them. Instead of using a map to make the initial partition, use a sort. It is much less memory intensive. Do a few optimizations to avoid work for size-1 equivalence classes. Implement -N. Change-Id: I1d2d85d3771abc918db4dd7cc30b0b2d854b15e1 Reviewed-on: https://go-review.googlesource.com/19024Reviewed-by: David Chase <drchase@google.com>
-
- 26 Jan, 2016 2 commits
-
-
Keith Randall authored
The x86 backend automatically rewrites MOV $0, AX to XOR AX, AX. That rewrite isn't ok when the flags register is live across the MOV. Keep track of which moves care about preserving flags, then disable this rewrite for them. On x86, Prog.Mark was being used to hold the length of the instruction. We already store that in Prog.Isize, so no need to store it in Prog.Mark also. This frees up Prog.Mark to hold a bitmask on x86 just like all the other architectures. Update #12405 Change-Id: Ibad8a8f41fc6222bec1e4904221887d3cc3ca029 Reviewed-on: https://go-review.googlesource.com/18861Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
Keith Randall authored
The conversion from -0.0 to +0.0 happens inside mpgetflt now. The SSA code doesn't need this fix any more. Change-Id: I6cd4f4a4e75b13cf284ebbb95b08af050ed9891c Reviewed-on: https://go-review.googlesource.com/18942Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Keith Randall <khr@golang.org>
-
- 22 Jan, 2016 1 commit
-
-
Keith Randall authored
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>
-
- 21 Jan, 2016 1 commit
-
-
Keith Randall authored
Change-Id: I78743987dcb45d821212caf95a00ae15b7a6cfd8 Reviewed-on: https://go-review.googlesource.com/18773Reviewed-by: Andrew Gerrand <adg@golang.org>
-
- 20 Jan, 2016 2 commits
-
-
Keith Randall authored
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>
-
Keith Randall authored
Redo how we keep track of forward references when building SSA. When the forward reference is resolved, update the Value node in place. Improve the phi elimination pass so it can simplify phis of phis. Give SSA package access to decoded line numbers. Fix line numbers for constant booleans. Change-Id: I3dc9896148d260be2f3dd14cbe5db639ec9fa6b7 Reviewed-on: https://go-review.googlesource.com/18674Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Keith Randall <khr@golang.org>
-
- 19 Jan, 2016 6 commits
-
-
Keith Randall authored
Semi-regular merge from tip to dev.ssa. Conflicts: src/runtime/sys_windows_amd64.s Change-Id: I5f733130049c810e6ceacd46dad85faebca52b29
-
Keith Randall authored
Distinguish move/load/store ops. Unify some of this code a bit. Reduces Mandelbrot slowdown with SSA from 58% to 12%. Change-Id: I3276eaebcbcdd9de3f8299c79b5f25c0429194c4 Reviewed-on: https://go-review.googlesource.com/18677 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Keith Randall authored
If a failure occurs in SSA processing, we always report the last line of the function we're compiling. Modify the callbacks from SSA to the GC compiler so we can pass a line number back and use it in Fatalf. Change-Id: Ifbfad50d5e167e997e0a96f0775bcc369f5c397e Reviewed-on: https://go-review.googlesource.com/18599 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Michael Munday authored
The timeout means that TestSpecialDomainName will not hang if the DNS server does not respond to the request. Fixes #13939 Change-Id: I46e30bbd3c11b6c560656134e704331cf6f8af3f Reviewed-on: https://go-review.googlesource.com/18661Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Updates x/net/http2 to git rev 72aa00c6 for https://golang.org/cl/18721 (but actually at https://golang.org/cl/18722 now) Fixes #14008 Change-Id: If05d5ad51ec0ba5ba7e4fe16605c0a83f0484bc8 Reviewed-on: https://go-review.googlesource.com/18723 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Shenghou Ma authored
Both mips64 architectures share the same runtime/rt0 file, so we have to hardcode them in buildall.bash. Ideally we should have cmd/dist report all supported platforms, see #12270. Change-Id: I08ce35cfe0a831af5e1e8255b305efd38386fa52 Reviewed-on: https://go-review.googlesource.com/18687Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 18 Jan, 2016 6 commits
-
-
Shenghou Ma authored
Change-Id: I7ccf1b5001d77c4390479f53c0137ab02f98595b Reviewed-on: https://go-review.googlesource.com/18685 Run-TryBot: Minux Ma <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
No need to say "by default" because there is no alternative and no way to override. Always HTTP/2.0 is officially spelled HTTP/2 these days. Fixes #13985 harder Change-Id: Ib1ec03cec171ca865342b8e7452cd4c707d7b770 Reviewed-on: https://go-review.googlesource.com/18720Reviewed-by: Rob Pike <r@golang.org>
-
Brad Fitzpatrick authored
Updates x/net/http2 to git rev 5c0dae8 for https://golang.org/cl/18709 Fixes #14003 Change-Id: I8bc205d6d089107b017e3458bbc7e05f6d0cae60 Reviewed-on: https://go-review.googlesource.com/18730Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Fixes #14001 Change-Id: I6f9bc3028345081758d8f537c3aaddb2e254e69e Reviewed-on: https://go-review.googlesource.com/18708Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Mikio Hara authored
Updates #13981. Change-Id: Id8f3cd56a81a7a993cea5c757e619407da491fed Reviewed-on: https://go-review.googlesource.com/18710Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
This is testing code in asm_GOARCH.s, so it's not necessary to run the test on systems where it doesn't build. Fixes #13991. Change-Id: Ia7a2d3a34b32e6987dc67428c1e09e63baf0518a Reviewed-on: https://go-review.googlesource.com/18707Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 16 Jan, 2016 3 commits
-
-
Brad Fitzpatrick authored
Wire up Transport.CloseIdleConnections to http2.Transport.CloseIdleConnections. Updates x/net/http2 to git rev c92cdcb0 for https://golang.org/cl/18678 Fixes #13975 Change-Id: I1183a31256104ff95ae7621e5788cfeee741b1aa Reviewed-on: https://go-review.googlesource.com/18679Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
GC assists check gcBlackenEnabled under the assist queue lock to avoid going to sleep after gcWakeAllAssists has already woken all assists. However, currently we clear gcBlackenEnabled shortly *after* waking all assists, which opens a window where this exact race can happen. Fix this by clearing gcBlackenEnabled before waking blocked assists. However, it's unlikely this actually matters because the world is stopped between waking assists and clearing gcBlackenEnabled and there aren't any obvious allocations during this window, so I don't think an assist could actually slip in to this race window. Updates #13645. Change-Id: I7571f059530481dc781d8fd96a1a40aadebecb0d Reviewed-on: https://go-review.googlesource.com/18682 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rick Hudson <rlh@golang.org>
-
Mikio Hara authored
Also adds missing nosplit to unminit. Fixes #13964. Change-Id: I07d93a8c872a255a89f91f808b66c889f0a6a69c Reviewed-on: https://go-review.googlesource.com/18658Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
- 15 Jan, 2016 3 commits
-
-
Brad Fitzpatrick authored
If a user starts two HTTP requests when no http2 connection is available, both end up creating new TCP connections, since the server's protocol (h1 or h2) isn't yet known. Once it turns out that the server supports h2, one of the connections is useless. Previously we kept upgrading both TLS connections to h2 (SETTINGS frame exchange, etc). Now the unnecessary connections are closed instead, before the h2 preface/SETTINGS. Updates x/net/http2 to git rev a8e212f3d for https://golang.org/cl/18675 This CL contains the tests for https://golang.org/cl/18675 Semi-related change noticed while writing the tests: now that we have TLSNextProto in Go 1.6, which consults the TLS ConnectionState.NegotiatedProtocol, we have to gurantee that the TLS handshake has been done before we look at the ConnectionState. So add that check after the DialTLS hook. (we never documented that users have to call Handshake, so do it for them, now that it matters) Updates #13957 Change-Id: I9a70e9d1282fe937ea654d9b1269c984c4e366c0 Reviewed-on: https://go-review.googlesource.com/18676Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Pull the relevant part of https://go-review.googlesource.com/#/c/18304/ into the SSA branch. This fixes the windows SSA build. Change-Id: Iee3834d8e7019cd90307e32029f3d1032ceb46c1 Reviewed-on: https://go-review.googlesource.com/18673Reviewed-by: Austin Clements <austin@google.com>
-
Austin Clements authored
While the default behavior of eliding runtime frames from tracebacks usually makes sense, this is not the case when you're trying to test the runtime itself. Fix this by forcing the traceback level to at least "system" in the runtime tests. This will specifically help with debugging issue #13645, which has proven remarkably resistant to reproduction outside of the build dashboard itself. Change-Id: I2a8356ba6c3c5badba8bb3330fc527357ec0d296 Reviewed-on: https://go-review.googlesource.com/18648 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
-
- 14 Jan, 2016 6 commits
-
-
Matthew Dempsky authored
Fixes #13916. Change-Id: If2cad5473a749460909519ac20aca19dea8a2e7a Reviewed-on: https://go-review.googlesource.com/18671Reviewed-by: David Crawshaw <crawshaw@golang.org>
-
Russ Cox authored
Fixes build. Change-Id: Idd7d87f0bf3fe553b3ab00dd32eee4925a4fe3ff Reviewed-on: https://go-review.googlesource.com/18647 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com>
-
Ian Lance Taylor authored
Change-Id: I6b1dc789e54a385c958961e7ba16bfd9d0f3b313 Reviewed-on: https://go-review.googlesource.com/18629Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Passes with go test -race -count=1000 -name=TestServerValidatesHostHeader now without hanging. Fixes #13950 Change-Id: I41c3a555c642595c95c8c52f19a05a4c68e67630 Reviewed-on: https://go-review.googlesource.com/18660 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
This doesn't fix a bug, but may improve performance in programs that have many concurrent calls from C to Go. The old code made several system calls between lockextra and unlockextra. That could be happening while another thread is spinning acquiring lockextra. This changes the code to not make any system calls while holding the lock. Change-Id: I50576478e478670c3d6429ad4e1b7d80f98a19d8 Reviewed-on: https://go-review.googlesource.com/18548Reviewed-by: Russ Cox <rsc@golang.org>
-
Russ Cox authored
Fixes #12217. Change-Id: I5ee6cb18eaa66bdec1affe689aa531c05e719fc9 Reviewed-on: https://go-review.googlesource.com/18645Reviewed-by: Andrew Gerrand <adg@golang.org>
-