- 19 Feb, 2016 2 commits
-
-
Alexandru Moșoi authored
Change-Id: Idd880cc6c1e5dc34dddbdea0841a7a718d2fa836 Reviewed-on: https://go-review.googlesource.com/19544Reviewed-by: David Chase <drchase@google.com>
-
Alexandru Moșoi authored
Change-Id: I731722eb77f373ff7d6101f93830ab0a50497e2c Reviewed-on: https://go-review.googlesource.com/19542 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
- 18 Feb, 2016 1 commit
-
-
David Chase authored
Tested it 1000x on OS X and Linux amd64, no failures. Updated TODO. Change-Id: Ia60c8d90962f6e5f7c3ed1ded6ba1b25eee983e1 Reviewed-on: https://go-review.googlesource.com/19662Reviewed-by: Todd Neal <todd@tneal.org>
-
- 17 Feb, 2016 2 commits
-
-
Alexandru Moșoi authored
Also throw in a few more shift constant folding. Change-Id: Iabe00596987f594e0686fbac3d76376d94612340 Reviewed-on: https://go-review.googlesource.com/19543 Run-TryBot: David Chase <drchase@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Alexandru Moșoi authored
* In cases where we end up with empty branches like in if a then jmp b else jmp b; the flow can be replaced by a; jmp b. The following functions is optimized as follows: func f(a bool, x int) int { v := 0 if a { v = -1 } else { v = -1 } return x | v } Before this change: 02819 (arith_ssa.go:362) VARDEF "".~r2+16(FP) 02820 (arith_ssa.go:362) MOVQ $0, "".~r2+16(FP) 02821 (arith_ssa.go:362) MOVB "".a(FP), AX 02822 (arith_ssa.go:362) TESTB AX, AX 02823 (arith_ssa.go:364) JEQ 2824 02824 (arith_ssa.go:369) VARDEF "".~r2+16(FP) 02825 (arith_ssa.go:369) MOVQ $-1, "".~r2+16(FP) 02826 (arith_ssa.go:369) RET After this change: 02819 (arith_ssa.go:362) VARDEF "".~r2+16(FP) 02820 (arith_ssa.go:369) VARDEF "".~r2+16(FP) 02821 (arith_ssa.go:369) MOVQ $-1, "".~r2+16(FP) 02822 (arith_ssa.go:369) RET Updates #14277 Change-Id: Ibe7d284f43406c704903632a4fcf2a4a64059686 Reviewed-on: https://go-review.googlesource.com/19464Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 16 Feb, 2016 2 commits
-
-
Alexandru Moșoi authored
* Merge copyelim into phielim. * Add phielimValue to rewrite. cgoIsGoPointer is, for example, 2 instructions smaller now. Change-Id: I8baeb206d1b3ef8aba4a6e3bcdc432959bcae2d5 Reviewed-on: https://go-review.googlesource.com/19462Reviewed-by: David Chase <drchase@google.com>
-
Todd Neal authored
ANDs of constants whose only set bits are leading or trailing can be rewritten as two shifts instead. This is slightly faster for 32 or 64 bit operands. Change-Id: Id5c1ff27e5a4df22fac67b03b9bddb944871145d Reviewed-on: https://go-review.googlesource.com/19485 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
- 12 Feb, 2016 1 commit
-
-
Todd Neal authored
When printing a value with just an aux, print the aux as well. Debugging cse is easier when the aux values are visible. Change-Id: Ifaf96bdb25462c9df7ba01fdfdbf0d379631f555 Reviewed-on: https://go-review.googlesource.com/19476Reviewed-by: Keith Randall <khr@golang.org>
-
- 11 Feb, 2016 2 commits
-
-
Gerrit Code Review authored
-
Keith Randall authored
Flagalloc was recalculating flags is some situations when it didn't need to. Fixed by using the same name for the original flag calculation instruction throughout. Change-Id: Ic0bf58f728a8d87748434dd25a67b0708755e1f8 Reviewed-on: https://go-review.googlesource.com/19237 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
- 10 Feb, 2016 1 commit
-
-
Keith Randall authored
Semi-regular merge from tip to dev.ssa. Two fixes: 1) Mark selectgo as not returning. This caused problems because there are no VARKILL ops on the selectgo path, causing things to be marked live that shouldn't be. 2) Tell the amd64 assembler that addressing modes like name(SP)(AX*4) are ok. Change-Id: I9ca81c76391b1a65cc47edc8610c70ff1a621913
-
- 09 Feb, 2016 5 commits
-
-
Alexandru Moșoi authored
Found by inspecting random generated code. Change-Id: I57d0fed7c3a8dc91fd13cdccb4819101f9976ec9 Reviewed-on: https://go-review.googlesource.com/19413Reviewed-by: Keith Randall <khr@golang.org>
-
Alexandru Moșoi authored
* Phis can have variable number of arguments, but rulegen assumed that each operation has fixed number of arguments. * Rewriting Phis is necessary to handle the following case: func f1_ssa(a bool, x int) int { v := 0 if a { v = -1 } else { v = -1 } return x|v } Change-Id: Iff6bd411b854f3d1d6d3ce21934bf566757094f2 Reviewed-on: https://go-review.googlesource.com/19412Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
A first pass to decompose user types (structs, maybe arrays someday), and a second pass to decompose builtin types (strings, interfaces, slices, complex). David wants this for value range analysis so he can have structs decomposed but slices and friends will still be intact and he can deduce things like the length of a slice is >= 0. Change-Id: Ia2300d07663329b51ed6270cfed21d31980daa7c Reviewed-on: https://go-review.googlesource.com/19340 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: David Chase <drchase@google.com>
-
Todd Neal authored
Adds a test to detect the bug that slipped in earlier when partioning by the Aux value, but not sorting by it. Change-Id: I56d0ba76383bbc1514b3dabd295e369771c26645 Reviewed-on: https://go-review.googlesource.com/19382 Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
-
Brad Fitzpatrick authored
ListenAndServeTLS doesn't require cert and key file names if the server's TLSConfig has a cert configured. This code was never updated when the GetCertificate hook was added to *tls.Config, however. Fixes #14268 Change-Id: Ib282ebb05697edd37ed8ff105972cbd1176d900b Reviewed-on: https://go-review.googlesource.com/19381Reviewed-by: Russ Cox <rsc@golang.org>
-
- 08 Feb, 2016 7 commits
-
-
Robert Griesemer authored
Fixes #14262. Change-Id: Id590995dd4460e81f6b91bcfb3f02515a97650fe Reviewed-on: https://go-review.googlesource.com/19361 Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Brad Fitzpatrick authored
Fixes #14259 Change-Id: I23fedec0eb85ae28e56bc24539bc864674856130 Reviewed-on: https://go-review.googlesource.com/19318Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
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>
-
Alexandru Moșoi authored
Change-Id: Id51e5c97e9653b764b809bf3424f1a6d31b6ffea Reviewed-on: https://go-review.googlesource.com/19338 Run-TryBot: David Chase <drchase@google.com> Reviewed-by: David Chase <drchase@google.com>
-
David Chase authored
Problem was caused by use of Args[].Aux differences in early partitioning. This artificially separated two equivalent expressions because sort ignores the Aux field, hence things can end with equal things separated by unequal things and thus the equal things are split into more than one partition. For example: SliceLen(a), SliceLen(b), SliceLen(a). Fix: don't use Args[].Aux in initial partitioning. Left in a debugging flag and some debugging Fprintf's; not sure if that is house style or not. We'll probably want to be more systematic in our naming conventions, e.g. ssa.cse, ssa.scc, etc. Change-Id: Ib1412539cc30d91ea542c0ac7b2f9b504108ca7f Reviewed-on: https://go-review.googlesource.com/19316Reviewed-by: Keith Randall <khr@golang.org>
-
Robert Griesemer authored
The operation where this manifested in a crash was % (only defined on integers). However, the existing code was sloppy in that it didn't retain the integer form after a value (e.g., 3.0) was accepted as representable in integer form (3 for the example). We would have seen a crash in such cases for / as well except that there was code to fix it for just that case. Remove the special code for / and fix more generally by retaining the integer form for all operations if applicable. Fixes #14229. Change-Id: I8bef769e6299839fade27c6e8b5ff29ad6521d0d Reviewed-on: https://go-review.googlesource.com/19300Reviewed-by: Alan Donovan <adonovan@google.com>
-
Todd Neal authored
Examine both Aux and AuxInt to form more precise initial partitions. Restructure loop to avoid repeated type.Equal() call. Speeds up compilation of testdata/gen/arithConst_ssa by 25%. Change-Id: I3cfb1d254adf0601ee69239e1885b0cf2a23575b Reviewed-on: https://go-review.googlesource.com/19313 Run-TryBot: Todd Neal <todd@tneal.org> Reviewed-by: Keith Randall <khr@golang.org>
-
- 07 Feb, 2016 2 commits
-
-
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>
-
Mikio Hara authored
Change-Id: I630d4d2d8a914d6c07f22351a56d5e44a937123e Reviewed-on: https://go-review.googlesource.com/19245Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
- 06 Feb, 2016 2 commits
-
-
Ian Lance Taylor authored
The test sends two HTTP/1.1 pipelined requests. The first is completedly by the second, and as such triggers an immediate call to the CloseNotify channel. The second calls the CloseNotify channel after the overall connection is closed. The test was passing fine on gc because the code would enter the select loop before running the handler, so the send on gotReq would always be seen first. On gccgo the code would sometimes enter the select loop after the handler had already finished, meaning that the select could choose between gotReq and sawClose. If it picked sawClose, it would never close the overall connection, and the httptest server would hang. The same hang could be induced with gc by adding a time.Sleep immediately before the select loop. Deflake the test by 1) don't close the overall connection until both requests have been seen; 2) don't exit the loop until both closes have been seen. Fixes #14231. Change-Id: I9d20c309125422ce60ac545f78bcfa337aec1c7d Reviewed-on: https://go-review.googlesource.com/19281Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
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 6 commits
-
-
Brad Fitzpatrick authored
Change-Id: I93201fa4152f2d60b3eedb8d321a152819033121 Reviewed-on: https://go-review.googlesource.com/19270Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
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>
-
Brad Fitzpatrick authored
Updates x/net/http2 to git rev 493a262 for https://golang.org/cl/19223 Fixes #14227 Change-Id: I626122811138fb3d88e4eea83f8da3fdcf91e0dc Reviewed-on: https://go-review.googlesource.com/19250Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Keith Randall authored
Change-Id: Ifb8eba1929c79ee7a8cae2191613c55a3b8f74e5 Reviewed-on: https://go-review.googlesource.com/19236Reviewed-by: Todd Neal <todd@tneal.org>
-
Brad Fitzpatrick authored
Updates #14227 Change-Id: If39f11471ecd307c9483f64e73f9c89fe906ae71 Reviewed-on: https://go-review.googlesource.com/19222Reviewed-by: Andrew Gerrand <adg@golang.org> Reviewed-by: Russ Cox <rsc@golang.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/19234Reviewed-by: Alexandru Moșoi <alexandru@mosoi.ro>
-
- 04 Feb, 2016 7 commits
-
-
Keith Randall authored
When using a stack-allocated buffer for the result, don't expose the uninitialized portion of it by restricting its capacity to its length. The other option is to zero the portion between len and cap. That seems like more work, but might be worth it if the caller then appends some stuff to the result. But this close to 1.6, I'm inclined to do the simplest fix possible. Fixes #14232 Change-Id: I21c50d3cda02fd2df4d60ba5e2cfe2efe272f333 Reviewed-on: https://go-review.googlesource.com/19231Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Andrew Gerrand authored
The plan9.bell-labs.com site has fallen into disrepair. We'll instead use the site maintained by contributor David du Colombier. Fixes #14233 Change-Id: I0c702e5d3b091cccd42b288ea32f34d507a4733d Reviewed-on: https://go-review.googlesource.com/19240Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: David du Colombier <0intro@gmail.com>
-
Alexandru Moșoi authored
* Enclose each rule's code in a for with no condition * The loop is ran at most once because it's always terminated by a return. * Use break when matching condition fails * Drop rule hashes * Shaves about 3 lines of code per rule The binary size is not afected. Change-Id: I27c3e40dc8cae98dcd50739342dc38db2ef9c247 Reviewed-on: https://go-review.googlesource.com/19220Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
Mostly indexed loads. A few more LEA cases. Change-Id: Idc1d447ed0dd6e906cd48e70307a95e77f61cf5f Reviewed-on: https://go-review.googlesource.com/19172Reviewed-by: Todd Neal <todd@tneal.org> Run-TryBot: Keith Randall <khr@golang.org>
-
Keith Randall authored
LEAQ symbol+100(SB), AX Under dynamic link, rewrites to MOVQ symbol@GOT(SB), AX ADDQ $100, AX but ADDQ clobbers flags, whereas the original LEAQ (when not dynamic linking) doesn't. Use LEAQ instead of ADDQ to add that constant in so we preserve flags. Change-Id: Ibb055403d94a4c5163e1c7d2f45da633ffd0b6a3 Reviewed-on: https://go-review.googlesource.com/19230Reviewed-by: David Chase <drchase@google.com> Run-TryBot: David Chase <drchase@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
-
Alexandru Moșoi authored
Shaves about 3 lines per generated rule. Change-Id: I94adc94ab79f90ac5fd033f896ece3b1eddf0f3d Reviewed-on: https://go-review.googlesource.com/19197Reviewed-by: Keith Randall <khr@golang.org>
-
Todd Neal authored
Add rewrite rules to optimize constant shifts. Fixes #10637 Change-Id: I74b724d3e81aeb7098c696d02c050f7fdfd5b523 Reviewed-on: https://go-review.googlesource.com/19106Reviewed-by: Keith Randall <khr@golang.org> Run-TryBot: Todd Neal <todd@tneal.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-