- 02 Sep, 2015 2 commits
-
-
Todd Neal authored
Modified to use the truncating conversion. Fixes reflect. Change-Id: I47bf3200abc2d2c662939a2a2351e2ff84168f4a Reviewed-on: https://go-review.googlesource.com/14167Reviewed-by:
David Chase <drchase@google.com>
-
Todd Neal authored
It does a XOR internally and clobbers flags. Change-Id: Id6ef9219c4e6c3a2b5fc79c8d52bcfa30c148617 Reviewed-on: https://go-review.googlesource.com/14165Reviewed-by:
Keith Randall <khr@golang.org>
-
- 01 Sep, 2015 5 commits
-
-
Keith Randall authored
They do an AND or an OR internally, so they clobber flags. Fixes #12441 Change-Id: I6c843bd268496bc13fc7e3c561d76619e961e8ad Reviewed-on: https://go-review.googlesource.com/14180Reviewed-by:
Todd Neal <todd@tneal.org>
-
Todd Neal authored
liblink rewrites MOV $0, reg into XOR reg, reg. Make MOVxconst clobber flags so we don't generate invalid code in the unlikely case that it matters. In testing, this change leads to no additional regenerated flags due to a scheduling fix in CL14042. Change-Id: I7bc1cfee94ef83beb2f97c31ec6a97e19872fb89 Reviewed-on: https://go-review.googlesource.com/14043Reviewed-by:
Keith Randall <khr@golang.org>
-
David Chase authored
Still to do: details, more testing corner cases. (e.g. negative zero) Includes small cleanups for previous CL. Note: complex division is currently done in the runtime, so the division code here is apparently not yet necessary and also not tested. Seems likely better to open code division and expose the widening/narrowing to optimization. Complex64 multiplication and division is done in wide format to avoid cancellation errors; for division, this also happens to be compatible with pre-SSA practice (which uses a single complex128 division function). It would-be-nice to widen for complex128 multiplication intermediates as well, but that is trickier to implement without a handy wider-precision format. Change-Id: I595a4300f68868fb7641852a54674c6b2b78855e Reviewed-on: https://go-review.googlesource.com/14028Reviewed-by:
Keith Randall <khr@golang.org>
-
Keith Randall authored
Specifying types in rewrites for all subexpressions gets verbose quickly. Allow opcodes to specify a default type which is used when none is supplied explicitly. Provide default types for a few easy opcodes. There are probably more we can do, but this is a good start. Change-Id: Iedc2a1a423cc3e2d4472640433982f9aa76a9f18 Reviewed-on: https://go-review.googlesource.com/14128Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Todd Neal authored
Change-Id: Ib0ea4b9c245f3d551e0f703826caa6b444b56a2d Reviewed-on: https://go-review.googlesource.com/14136Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 31 Aug, 2015 5 commits
-
-
Todd Neal authored
To reduce the number of spills, give any non-phi values whose argument is the control the same priority as the control. With mask.bash, this reduces regenerated flags from 603 to 240. Change-Id: I26883d69e80357c56b343428fb528102b3f26e7a Reviewed-on: https://go-review.googlesource.com/14042Reviewed-by:
Keith Randall <khr@golang.org>
-
Todd Neal authored
Change-Id: Ic7be8fa3a89e46a93df181df3163ec1bf7e96a23 Reviewed-on: https://go-review.googlesource.com/14076Reviewed-by:
Minux Ma <minux@golang.org>
-
Todd Neal authored
Change-Id: Ice206f7e94af4a148d9dd9a7570f5ed21722bedc Reviewed-on: https://go-review.googlesource.com/14075Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Todd Neal authored
Change-Id: Ia5483d23fe0b5dd0b6cfe2099e9b475184742716 Reviewed-on: https://go-review.googlesource.com/14074Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Todd Neal authored
Change-Id: I8fd3727763c812297967c8069847833fc8516ff2 Reviewed-on: https://go-review.googlesource.com/14073Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 29 Aug, 2015 4 commits
-
-
Keith Randall authored
Instead of trying to delete dead code as soon as we find it, just mark it as dead using a PlainAndDead block kind. The deadcode pass will do the real removal. This way is somewhat more efficient because we don't need to mess with successor and predecessor lists of all the dead blocks. Fixes #12347 Change-Id: Ia42d6b5f9cdb3215a51737b3eb117c00bd439b13 Reviewed-on: https://go-review.googlesource.com/14033Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Josh Bleecher Snyder authored
This also fixes the encoding/gob TestTopLevelNilPointer failure. Change-Id: I9b29a6fddffd51af305c685f3a8e2a0594bfeeab Reviewed-on: https://go-review.googlesource.com/14032Reviewed-by:
Keith Randall <khr@golang.org>
-
Todd Neal authored
addEdge had two identical implementations so make it an exported method on Block. Change-Id: I8c21655a9dc5074fefd7f63b2f5b51897571e608 Reviewed-on: https://go-review.googlesource.com/14040Reviewed-by:
Keith Randall <khr@golang.org>
-
Todd Neal authored
Frontend has already rewriten fallthrough statements, we just need to ignore them. Change-Id: Iadf89b06a9f8f9e6e2e1e87c934f31add77a19a1 Reviewed-on: https://go-review.googlesource.com/14029Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 28 Aug, 2015 7 commits
-
-
Todd Neal authored
Change-Id: I1453ba226376ccd4d79780fc0686876d6dde01ee Reviewed-on: https://go-review.googlesource.com/14027Reviewed-by:
Keith Randall <khr@golang.org>
-
David Chase authored
Change-Id: I8dee400aef07165f911750de2615b8757f826000 Reviewed-on: https://go-review.googlesource.com/13945Reviewed-by:
Keith Randall <khr@golang.org>
-
Keith Randall authored
Fixes build. There may be no current block. Change-Id: I0da8bab133dc207124556927698e7cd682e64ef5 Reviewed-on: https://go-review.googlesource.com/13989Reviewed-by:
Keith Randall <khr@golang.org>
-
Todd Neal authored
Change-Id: If7a6ab6b1336dbacb006f562be7f153eb93e7253 Reviewed-on: https://go-review.googlesource.com/14025Reviewed-by:
Keith Randall <khr@golang.org>
-
Keith Randall authored
Add a check to make sure value arguments dominate the value. Phi elim output used to fail this test. When eliminating redundant phis, phi elim was using one of the args and not the ultimate source. For example: b1: x = ... -> b2 b3 b2: y = Copy x b3: z = Copy x -> b4 -> b4 b4: w = phi y z Phi elim eliminates w, but it used to replace w with (Copy y). That's bad as b2 does not dominate b4. Instead we should replace w with (Copy x). Fixes #12347 Change-Id: I9f340cdabcda8e2e90359fb4f9250877b1fffe98 Reviewed-on: https://go-review.googlesource.com/13986Reviewed-by:
David Chase <drchase@google.com>
-
David Chase authored
Still to do: arithmetic Change-Id: I31fd23b34980c9ed4b4e304b8597134b2ba6ca5c Reviewed-on: https://go-review.googlesource.com/14024Reviewed-by:
Keith Randall <khr@golang.org>
-
Todd Neal authored
Implement len(map) values. Change-Id: If92be96ec9a7a86aeb3ce566d6758aab01c2fa7d Reviewed-on: https://go-review.googlesource.com/13961Reviewed-by:
Keith Randall <khr@golang.org>
-
- 27 Aug, 2015 2 commits
-
-
Josh Bleecher Snyder authored
Change-Id: I113c07caf504cee66a81730da8830de6de098e49 Reviewed-on: https://go-review.googlesource.com/13981Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
The old backend doesn't like ideal types, and we want to reuse its stackmap generation. OOROR and OANDAND expressions have ideal type. The old backend didn't care, because those expressions got rewritten away into jumps before stackmap generation. Fix the type during conversion. Change-Id: I488e7499298d9aec71da39c202f6a7235935bc8d Reviewed-on: https://go-review.googlesource.com/13980Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 26 Aug, 2015 2 commits
-
-
Todd Neal authored
The code previously always used AX causing errors. For now, just switch off the type in order to at least generate valid code. Change-Id: Iaf13120a24b62456b9b33c04ab31f2d5104b381b Reviewed-on: https://go-review.googlesource.com/13943Reviewed-by:
David Chase <drchase@google.com>
-
Todd Neal authored
Change-Id: Iacd302350cf0a8a8164d937e5c4ac55e6a07d380 Reviewed-on: https://go-review.googlesource.com/13942Reviewed-by:
David Chase <drchase@google.com>
-
- 25 Aug, 2015 13 commits
-
-
Keith Randall authored
Semi-regular merge of master into dev.ssa. Change-Id: Ia7f2e29dfdea7618141efcfcf6f6c7c8b5553dfa
-
Keith Randall authored
Add blocks to remove critical edges, even when it looks like there's no phi that requires it. Regalloc still likes to have critical-edge-free graphs for other reasons. Change-Id: I69f8eaecbc5d79ab9f2a257c2e289d60b18e43c8 Reviewed-on: https://go-review.googlesource.com/13933Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Ulrich Kunitz authored
The issue 12226 has been caused by the allocation of the same register for the equality check of two byte values. The code in cgen.go freed the register for the second operand before the allocation of the register for the first operand. Fixes #12226 Change-Id: Ie4dc33a488bd48a17f8ae9b497fd63c1ae390555 Reviewed-on: https://go-review.googlesource.com/13771Reviewed-by:
Russ Cox <rsc@golang.org>
-
Keith Randall authored
Change-Id: I3c598faff8af18530ae863b9e72f0cef379b4a1f Reviewed-on: https://go-review.googlesource.com/13909Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
Add a new function and generic operation to handle bounds checking for slices. Unlike the index bounds checking the index can be equal to the upper bound. Do gc-friendly slicing that generates proper code for 0-length result slices. This is a takeover of Alexandru's original change, (https://go-review.googlesource.com/#/c/12764/) submittable now that the decompose phase is in. Change-Id: I17d164cf42ed7839f84ca949c6ad3289269c9160 Reviewed-on: https://go-review.googlesource.com/13903Reviewed-by:
David Chase <drchase@google.com>
-
David Chase authored
Basic ops, no particular optimization in the pattern matching yet (e.g. x!=x for Nan detection, x cmp constant, etc.) Change-Id: I0043564081d6dc0eede876c4a9eb3c33cbd1521c Reviewed-on: https://go-review.googlesource.com/13704Reviewed-by:
Keith Randall <khr@golang.org>
-
Austin Clements authored
A comparison of the form l == r where l is an interface and r is concrete performs a type assertion on l to convert it to r's type. However, the compiler fails to zero the temporary where the result of the type assertion is written, so if the type is a pointer type and a stack scan occurs while in the type assertion, it may see an invalid pointer on the stack. Fix this by zeroing the temporary. This is equivalent to the fix for type switches from c4092ac3. Fixes #12253. Change-Id: Iaf205d456b856c056b317b4e888ce892f0c555b9 Reviewed-on: https://go-review.googlesource.com/13872Reviewed-by:
Russ Cox <rsc@golang.org>
-
David Chase authored
Change-Id: I8c17f706a3e0f1fa2d754bfb4ccd1f7a027cb3db Reviewed-on: https://go-review.googlesource.com/13744Reviewed-by:
Keith Randall <khr@golang.org>
-
Keith Randall authored
MOVXload and MOVXstore opcodes have both an auxint offset and an aux offset (a symbol name, like a local or arg or global). Make sure we keep those values during rewrites. Change-Id: Ic9fd61bf295b5d1457784c281079a4fb38f7ad3b Reviewed-on: https://go-review.googlesource.com/13849Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Dave Cheney authored
Updates #11336 Follow the lead of amd64 by doing a pointer equality check before comparing string/byte contents on arm64. BenchmarkCompareBytesEqual-8 25.8 26.3 +1.94% BenchmarkCompareBytesToNil-8 9.59 9.59 +0.00% BenchmarkCompareBytesEmpty-8 9.59 9.17 -4.38% BenchmarkCompareBytesIdentical-8 26.3 9.17 -65.13% BenchmarkCompareBytesSameLength-8 16.3 16.3 +0.00% BenchmarkCompareBytesDifferentLength-8 16.3 16.3 +0.00% BenchmarkCompareBytesBigUnaligned-8 1132038 1131409 -0.06% BenchmarkCompareBytesBig-8 1126758 1128470 +0.15% BenchmarkCompareBytesBigIdentical-8 1084366 9.17 -100.00% Change-Id: Id7125c31957eff1ddb78897d4511bd50e79af3f7 Reviewed-on: https://go-review.googlesource.com/13885Reviewed-by:
Keith Randall <khr@golang.org>
-
Todd Neal authored
nmspinning has a value range of [0, 2^31-1]. Update the comment to indicate this and fix the comparison so it's not always false. Fixes #11280 Change-Id: Iedaf0654dcba5e2c800645f26b26a1a781ea1991 Reviewed-on: https://go-review.googlesource.com/13877Reviewed-by:
Minux Ma <minux@golang.org>
-
Shenghou Ma authored
gobuf.g is a guintptr, so without hex(), it will be printed as a decimal, which is not very helpful and inconsistent with how other pointers are printed. Change-Id: I7c0432e9709e90a5c3b3e22ce799551a6242d017 Reviewed-on: https://go-review.googlesource.com/13879Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Didier Spezia authored
Simplify slice/map literal expressions. Caught with gofmt -d -s, fixed with gofmt -w -s Reformatted some expressions to improve readability. Change-Id: Iaf123e6bd49162ec45c59297ad3b002ca59443bc Reviewed-on: https://go-review.googlesource.com/13850Reviewed-by:
Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-