- 11 Jun, 2015 2 commits
-
-
Keith Randall authored
Implement correct Go shifts. Allow multi-line rewrite rules. Fix offset & alignment in stack alloc. Change-Id: I0ae9e522c83df9205bbe4ab94bc0e43d16dace58 Reviewed-on: https://go-review.googlesource.com/10891Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
Add calls, particularly closure calls. Reorg SSAable variable test for converting to SSA. Change-Id: Ia75c04295e6b0b040122f97e2381836a393b7f42 Reviewed-on: https://go-review.googlesource.com/10912Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
- 10 Jun, 2015 1 commit
-
-
Michael Matloob authored
Change-Id: I1dfffd75cc1f49307c654f910f7133c03da6c84f Reviewed-on: https://go-review.googlesource.com/10559Reviewed-by: Keith Randall <khr@golang.org>
-
- 09 Jun, 2015 1 commit
-
-
Michael Matloob authored
It's been replaced by rewritegeneric.go Change-Id: I2658abbc6201ecfedae4513c6da04ea3cac8bb9c Reviewed-on: https://go-review.googlesource.com/10846Reviewed-by: Keith Randall <khr@golang.org>
-
- 08 Jun, 2015 2 commits
-
-
Keith Randall authored
Revamp autogeneration. Get rid of gogenerate commands, they are more trouble than they are worth. (If the code won't compile, gogenerate doesn't work.) Generate opcode enums & tables. This means we only have to specify opcodes in one place instead of two. Add arch prefixes to opcodes so they will be globally unique. Change-Id: I175d0a89b701b2377bbe699f3756731b7c9f5a9f Reviewed-on: https://go-review.googlesource.com/10812Reviewed-by: Alan Donovan <adonovan@google.com>
-
Michael Matloob authored
Change-Id: I21edff280a283895e4f0cbf91a3b4406f2f86788 Reviewed-on: https://go-review.googlesource.com/10558Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Keith Randall <khr@golang.org>
-
- 05 Jun, 2015 1 commit
-
-
Michael Matloob authored
Change-Id: I9d4e0f3e9afc9920ee0d77b0073ac8597c7c048f Reviewed-on: https://go-review.googlesource.com/10756Reviewed-by: Keith Randall <khr@golang.org>
-
- 04 Jun, 2015 4 commits
-
-
Josh Bleecher Snyder authored
* Improve some docs and logging. * Set correct type and len for indexing into strings. Fixes #11029. Change-Id: Ib22c45908e41ba3752010d2f5759e37e3921a48e Reviewed-on: https://go-review.googlesource.com/10635Reviewed-by: Keith Randall <khr@golang.org>
-
Keith Randall authored
Eliminate dead stores. Dead stores are those which are unconditionally followed by another store to the same location, with no intervening load. Just a simple intra-block implementation for now. Change-Id: I2bf54e3a342608fc4e01edbe1b429e83f24764ab Reviewed-on: https://go-review.googlesource.com/10386Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Keith Randall authored
Change-Id: Ica26c0297ac7afeb0b5b668cf5f5cd1667c6cc43 Reviewed-on: https://go-review.googlesource.com/10699Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
Keith Randall authored
Add ops to load, store, select ptr & len, and build constant strings. A few other minor cleanups. Change-Id: I6f0f7419d641b119b613ed44561cd308a466051c Reviewed-on: https://go-review.googlesource.com/10449Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
-
- 03 Jun, 2015 1 commit
-
-
Michael Matloob authored
The string method has the same output as printFunc. Change-Id: Iab2ebc17a3d6418edfeb7b585e4f251e7a11f399 Reviewed-on: https://go-review.googlesource.com/10552Reviewed-by: Keith Randall <khr@golang.org>
-
- 30 May, 2015 2 commits
-
-
Keith Randall authored
Change-Id: I47e5349e34fc18118c4d35bf433f875b958cc3e5 Reviewed-on: https://go-review.googlesource.com/10495Reviewed-by: Alan Donovan <adonovan@google.com>
-
Keith Randall authored
Add test handler to count and check generated opcodes. This will be useful for testing that certain optimizations don't regress. Also pass a *Config to the Fun constructor so that compile() works. Change-Id: Iee679e87cf0bc635ddcbe433fc1bd4c1d9c953cc Reviewed-on: https://go-review.googlesource.com/10502Reviewed-by: Michael Matloob <michaelmatloob@gmail.com> Reviewed-by: Keith Randall <khr@golang.org>
-
- 29 May, 2015 1 commit
-
-
Michael Matloob authored
Code generation is now done in genssa. Also remove the asm field in opInfo. It's no longer used. Change-Id: I65fffac267e138fd424b2ef8aa7ed79f0ebb63d5 Reviewed-on: https://go-review.googlesource.com/10539Reviewed-by: Keith Randall <khr@golang.org>
-
- 28 May, 2015 14 commits
-
-
Keith Randall authored
Semi-regular merge of tip to dev.ssa. Complicated a bit by the move of cmd/internal/* to cmd/compile/internal/*. Change-Id: I1c66d3c29bb95cce4a53c5a3476373aa5245303d
-
Keith Randall authored
Rename ops like ADDCQ to ADDQconst, so it is clear what the base opcode is and what the modifiers are. Convert FP references to SP references once we know the frame size. Related, compute the frame size in the ssa package. Do a bunch of small fixes. Add a TODO list for people to peruse. Change-Id: Ia6a3fe2bf57e5a2e5e883032e2a2a3fdd566c038 Reviewed-on: https://go-review.googlesource.com/10465Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Fixes #10979. Change-Id: Iac25645ba8181a56a75ddfcd29ff6d64c15c4f57 Reviewed-on: https://go-review.googlesource.com/10466Reviewed-by: Alan Donovan <adonovan@google.com>
-
Josh Bleecher Snyder authored
Memory usage has been reduced. The tests are still slow, but that is issue #10571. /usr/bin/time shows significant variation in the peak memory usage compiling with tip. This is unsurprising, given GC. Using Go 1.4.2, memory is stable at 410mb. Using tip at d2ee09298, memory ranges from 470mb (+15%) to 534mb (+30%), with a mean of 504mb (+23%), with n=50. Fixes #9933. Change-Id: Id31f3ae086ec324abf70e8f1a8044c4a0c27e274 Reviewed-on: https://go-review.googlesource.com/10211Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
David Chase authored
Use pkgimport == nil (or not) to distinguish between parsing .go source files where "p" exponent specifier is not allowed and parsing .a or .o export data where it is. Use that to control error when p-exponent is seen. Fixes #9036 Change-Id: I8924f09c91d4945ef3f20e80a6e544008a94a7e4 Reviewed-on: https://go-review.googlesource.com/10450Reviewed-by: Russ Cox <rsc@golang.org>
-
Josh Bleecher Snyder authored
This is an automated follow-up to CL 10210. It was generated with a combination of eg and gofmt -r. No functional changes. Passes toolstash -cmp. Change-Id: I35f5897948a270b472d8cf80612071b4b29e9a2b Reviewed-on: https://go-review.googlesource.com/10253Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Austin Clements authored
TestGoroutineParallelism can deadlock if the GC runs during the test. Currently it tries to prevent this by forcing a GC before the test, but this is best effort and fails completely if GOGC is very low for testing. This change replaces this best-effort fix with simply setting GOGC to off for the duration of the test. Change-Id: I8229310833f241b149ebcd32845870c1cb14e9f8 Reviewed-on: https://go-review.googlesource.com/10454Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
Currently when the race detector is enabled, orderexpr always creates a temporary for slice and append operations. This used to be necessary because the race detector had a different code path for slice assignment that required this temporary. Unfortunately, creating this temporary inhibits the optimization that eliminates write barriers when a slice is assigned only to change its length or cap. For most code, this is bad for performance, and in go:nowritebarrier functions in the runtime, this can mean the difference between compiling and not compiling. Now the race detector uses the regular slice assignment code, so creating this temporary is no longer necessary. Change-Id: I296042e1edc571b77c407f709c2ff9091c4aa795 Reviewed-on: https://go-review.googlesource.com/10456Reviewed-by: Russ Cox <rsc@golang.org>
-
Austin Clements authored
Most runtime tests that invoke the compiler to build a sub-test binary do so with a special environment constructed by testEnv that strips out environment variables that should apply to the test but not to the build. Fix TestGdbPython to use this test environment when invoking go build, like other tests do. Change-Id: Iafdf89d4765c587cbebc427a5d61cb8a7e71b326 Reviewed-on: https://go-review.googlesource.com/10455Reviewed-by: Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
A decimal represented 0.0 with a 0-length mantissa and undefined exponent, but the formatting code assumes a valid zero exponent if the float value is 0.0. The code worked because we allocate a new decimal value each time and because there's no rounding that lead to 0.0. Change-Id: Ifd771d7709de83b87fdbf141786286b4c3e13d4f Reviewed-on: https://go-review.googlesource.com/10448Reviewed-by: Alan Donovan <adonovan@google.com>
-
Ryan Brown authored
Change-Id: I3a6df0a76d57db7cb6910f4179a6ce380f219a37 Reviewed-on: https://go-review.googlesource.com/10442Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Josh Bleecher Snyder authored
This is dead code that was missed during the 'go tool compile' migration. Change-Id: Ice2af8a9ef72f8fd5f82225ee261854d93b659f1 Reviewed-on: https://go-review.googlesource.com/10430Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Shenghou Ma authored
It shrinks Prog type from 448 bytes down to 376 bytes on amd64. It also makes sense, because I don't know of any modern architecture that have instructions which can write to two destinations, none of which is a register (even x86 doesn't have such instructions). Change-Id: I3061f1c9ac93d79ee2b92ecb9049641d0e0f6300 Reviewed-on: https://go-review.googlesource.com/10330Reviewed-by: Aram Hăvărneanu <aram@mgk.ro> Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
This speeds up sharded builds notably, by 1 second * the number of tests. Change-Id: Ib0295c31e4974f3003f72cb16c48949812b6f22b Reviewed-on: https://go-review.googlesource.com/10460Reviewed-by: Andrew Gerrand <adg@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 27 May, 2015 11 commits
-
-
Robert Griesemer authored
Change-Id: Ibace718452b6dc029c5af5240117f5fc794c38cf Reviewed-on: https://go-review.googlesource.com/10388Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
- factor out handling of sign - rename bstring, pstring to fmtB, fmtP consistent with fmtE, fmtF - move all float-to-string conversion functions into ftoa.go - no functional changes Change-Id: I5970ecb874dc9c387630b59147d90bda16a5d8e6 Reviewed-on: https://go-review.googlesource.com/10387Reviewed-by: Alan Donovan <adonovan@google.com>
-
Robert Griesemer authored
Change-Id: I590ac9e976d4044d1f4f280137ea9b38851a9fc2 Reviewed-on: https://go-review.googlesource.com/10424Reviewed-by: Alan Donovan <adonovan@google.com>
-
Brad Fitzpatrick authored
Fixes #10956 Change-Id: If8517094f04250c4f722e1e899a237eb6e170eb9 Reviewed-on: https://go-review.googlesource.com/10421 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
-
David Chase authored
Added a lineno parameter to treecopy and listtreecopy (ignored if = 0). When nodes are copied the copy is assigned the non-zero lineno (normally this would be the destination). Fixes #8183 Change-Id: Iffb767a745093fb89aa08bf8a7692c2f0122be98 Reviewed-on: https://go-review.googlesource.com/10334Reviewed-by: Russ Cox <rsc@golang.org>
-
Brad Fitzpatrick authored
Change-Id: I48b5f10d703dba48ec8e67c58d4276befafb5524 Reviewed-on: https://go-review.googlesource.com/10420Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-
Keith Randall authored
Add & as an input op. Add several output ops (loads & stores, TESTB, LEAQglobal, branches, memcopy) Some other small things: - Add exprAddr to builder to generate addresses of expressions. Use it in various places that had ad-hoc code. - Separate out nil & bounds check generation to separate functions. - Add explicit FP and SP ops so we dont need specialized *FP and *SP opcodes. - Fix fallthrough at end of functions with no return values. - rematerialization of more opcodes. Change-Id: I781decfcef9770fb15f0cd6b061547f7824a2d5e Reviewed-on: https://go-review.googlesource.com/10213Reviewed-by: Alan Donovan <adonovan@google.com>
-
Michael Hudson-Doyle authored
We already read the address of a gcmask/gcprog out of the type data, but I didn't know how many bytes to read. But it turns out that it's easy to calculate, so change to do that. This means that we no longer depend on the local symbols being present, allowing me to strip the shared libraries for distribution and make them a lot smaller. As a bonus, this makes LSym another 24 bytes smaller, down to 296 bytes now. Change-Id: I379d359e28d63afae6753efd23efdf1fbb716992 Reviewed-on: https://go-review.googlesource.com/10377Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Michael Hudson-Doyle authored
The motivation for this is the innocuous looking test case that is added. This creates a stack exe -> libdep2.so -> libdep.so -> libruntime.so. The problem comes from the fact that a function from libdep.so gets inlined all the way into exe. This (unsurprisingly) means that the object file for exe references symbols from libdep.so, which means that -ldep needs to be passed when linking exe and it isn't. The fix is simply to pass it -- there is no harm in passing it when it's not needed. The thing is, it's not clear at all in the current code to see how the linker can know that libdep2 is linked against libdep. It could look through the DT_NEEDED entries in libdep2 and try to guess which are Go libraries, but it feels better to be explicit. So this adds another SHT_NOTE section that lists the shared libraries a shared library was linked against, and makes sure the complete set of depended upon shared libraries is passed to the external linker. Change-Id: I79aa6f98b4db4721d657a7eb7b7f062269bf49e2 Reviewed-on: https://go-review.googlesource.com/10376Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Håvard Haugen authored
Fixes #10959. Fixes #10960. Change-Id: I9a81a0e2b8275338d0d1c3f7f7265e0fd91f3de2 Reviewed-on: https://go-review.googlesource.com/10402 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Symonds <dsymonds@golang.org>
-
Michael Hudson-Doyle authored
This makes for a more stable API for tools (including cmd/link itself) to extract the abi hash from a shared library and makes it possible at all for a library that has had the local symbol table removed. The existing note-writing code only supports writing notes into the very start of the object file so they are easy to find in core dumps. This doesn't apply to the "go" notes and means that all notes have to fit into a fixed size budget. That's annoying now we have more notes (and the next CL will add another one) so this does a little bit of work to make adding notes that do not have to go at the start of the file easier and moves the writing of the package list note over to that mechanism, which lets me revert a hack that increased the size budget mentioned above for -buildmode=shared builds. Change-Id: I6077a68d395c8a2bc43dec8506e73c71ef77d9b9 Reviewed-on: https://go-review.googlesource.com/10375Reviewed-by: Ian Lance Taylor <iant@golang.org>
-