An error occurred fetching the project authors.
- 27 Feb, 2018 1 commit
-
-
Keith Randall authored
The first word of an interface is a pointer, but for the purposes of GC we don't need to treat it as such. 1. If it is a non-empty interface, the pointer points to an itab which is always in persistentalloc space. 2. If it is an empty interface, the pointer points to a _type. a. If it is a compile-time-allocated type, it points into the read-only data section. b. If it is a reflect-allocated type, it points into the Go heap. Reflect is responsible for keeping a reference to the underlying type so it won't be GCd. If we ever have a moving GC, we need to change this for 2b (as well as scan itabs to update their itab._type fields). Write barriers on the first word of interfaces have already been removed. Change-Id: I643e91d7ac4de980ac2717436eff94097c65d959 Reviewed-on: https://go-review.googlesource.com/97518 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
- 26 Feb, 2018 1 commit
-
-
Kunpei Sakai authored
CL generated mechanically with github.com/mdempsky/unconvert. Also updated cmd/compile/internal/ssa/gen/*.rules manually. Change-Id: If721ef73cf0771ae83ce7e2d11623fc8d9155768 Reviewed-on: https://go-review.googlesource.com/97075Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 11 Oct, 2017 1 commit
-
-
Austin Clements authored
The liveness analysis no longer directly emits PCDATA. Fix stale comments that say so. Change-Id: Id26b112ddf4c13a12ebf766f64bf57c68fbfe3ef Reviewed-on: https://go-review.googlesource.com/67691 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 05 Oct, 2017 1 commit
-
-
Marvin Stenger authored
This reverts https://golang.org/cl/65930. Fixes #22148 Change-Id: Ie0712621ed89c43bef94417fc32de9af77607760 Reviewed-on: https://go-review.googlesource.com/68430Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 25 Sep, 2017 1 commit
-
-
Marvin Stenger authored
strings.IndexByte was introduced in go1.2 and it can be used effectively wherever the second argument to strings.Index is exactly one byte long. This avoids generating unnecessary string symbols and saves a few calls to strings.Index. Change-Id: I1ab5edb7c4ee9058084cfa57cbcc267c2597e793 Reviewed-on: https://go-review.googlesource.com/65930 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 20 Sep, 2017 3 commits
-
-
Matthew Dempsky authored
onebitwalktype1 no longer appears to be a bottleneck for the mentioned test case. In fact, we appear to compile it significantly faster now than Go 1.4 did (~1.8s vs ~3s). Fixes #21951. Change-Id: I315313e906092a7d6ff4ff60a918d80a4cff7a7f Reviewed-on: https://go-review.googlesource.com/65110Reviewed-by:
Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
No functional change; just making the code slightly more idiomatic. Passes toolstash-check. Change-Id: I66d14a8410bbecf260d0ea5683564aa413ce5747 Reviewed-on: https://go-review.googlesource.com/65070 Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
The existing logic tried to advance the offset for each variable's width, but then tried to undo this logic with the array and struct handling code. It can all be much simpler by only worrying about computing offsets within the array and struct code. While here, include a short-circuit for zero-width arrays to fix a pedantic compiler failure case. Passes toolstash-check. Fixes #20739. Change-Id: I98af9bb512a33e3efe82b8bf1803199edb480640 Reviewed-on: https://go-review.googlesource.com/64471 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org>
-
- 19 Sep, 2017 1 commit
-
-
Keith Randall authored
We used to have {Arg,Auto,Extern}Symbol structs with which we wrapped a *gc.Node or *obj.LSym before storing them in the Aux field of an ssa.Value. This let the SSA part of the compiler distinguish between autos and args, for example. We no longer need the wrappers as we can query the underlying objects directly. There was also some sloppy usage, where VarDef had a *gc.Node directly in its Aux field, whereas the use of that variable had that *gc.Node wrapped in an AutoSymbol. Thus the Aux fields didn't match (using ==) when they probably should. This sloppy usage cleanup is the only thing in the CL that changes the generated code - we can get rid of some more unused auto variables if the matching happens reliably. Removing this wrapper also lets us get rid of the varsyms cache (which was used to prevent wrapping the same *gc.Node twice). Change-Id: I0dedf8f82f84bfee413d310342b777316bd1d478 Reviewed-on: https://go-review.googlesource.com/64452 TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 24 Aug, 2017 1 commit
-
-
Michael Munday authored
This is a crude compiler pass to eliminate stores to auto variables that are only ever written to. Eliminates an unnecessary store to x from the following code: func f() int { var x := 1 return *(&x) } Fixes #19765. Change-Id: If2c63a8ae67b8c590b6e0cc98a9610939a3eeffa Reviewed-on: https://go-review.googlesource.com/38746 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 09 May, 2017 1 commit
-
-
Josh Bleecher Snyder authored
When package ssa was created, Type was in package gc. To avoid circular dependencies, we used an interface (ssa.Type) to represent type information in SSA. In the Go 1.9 cycle, gri extricated the Type type from package gc. As a result, we can now use it in package ssa. Now, instead of package types depending on package ssa, it is the other way. This is a more sensible dependency tree, and helps compiler performance a bit. Though this is a big CL, most of the changes are mechanical and uninteresting. Interesting bits: * Add new singleton globals to package types for the special SSA types Memory, Void, Invalid, Flags, and Int128. * Add two new Types, TSSA for the special types, and TTUPLE, for SSA tuple types. ssa.MakeTuple is now types.NewTuple. * Move type comparison result constants CMPlt, CMPeq, and CMPgt to package types. * We had picked the name "types" in our rules for the handy list of types provided by ssa.Config. That conflicted with the types package name, so change it to "typ". * Update the type comparison routine to handle tuples and special types inline. * Teach gc/fmt.go how to print special types. * We can now eliminate ElemTypes in favor of just Elem, and probably also some other duplicated Type methods designed to return ssa.Type instead of *types.Type. * The ssa tests were using their own dummy types, and they were not particularly careful about types in general. Of necessity, this CL switches them to use *types.Type; it does not make them more type-accurate. Unfortunately, using types.Type means initializing a bit of the types universe. This is prime for refactoring and improvement. This shrinks ssa.Value; it now fits in a smaller size class on 64 bit systems. This doesn't have a giant impact, though, since most Values are preallocated in a chunk. name old alloc/op new alloc/op delta Template 37.9MB ± 0% 37.7MB ± 0% -0.57% (p=0.000 n=10+8) Unicode 28.9MB ± 0% 28.7MB ± 0% -0.52% (p=0.000 n=10+10) GoTypes 110MB ± 0% 109MB ± 0% -0.88% (p=0.000 n=10+10) Flate 24.7MB ± 0% 24.6MB ± 0% -0.66% (p=0.000 n=10+10) GoParser 31.1MB ± 0% 30.9MB ± 0% -0.61% (p=0.000 n=10+9) Reflect 73.9MB ± 0% 73.4MB ± 0% -0.62% (p=0.000 n=10+8) Tar 25.8MB ± 0% 25.6MB ± 0% -0.77% (p=0.000 n=9+10) XML 41.2MB ± 0% 40.9MB ± 0% -0.80% (p=0.000 n=10+10) [Geo mean] 40.5MB 40.3MB -0.68% name old allocs/op new allocs/op delta Template 385k ± 0% 386k ± 0% ~ (p=0.356 n=10+9) Unicode 343k ± 1% 344k ± 0% ~ (p=0.481 n=10+10) GoTypes 1.16M ± 0% 1.16M ± 0% -0.16% (p=0.004 n=10+10) Flate 238k ± 1% 238k ± 1% ~ (p=0.853 n=10+10) GoParser 320k ± 0% 320k ± 0% ~ (p=0.720 n=10+9) Reflect 957k ± 0% 957k ± 0% ~ (p=0.460 n=10+8) Tar 252k ± 0% 252k ± 0% ~ (p=0.133 n=9+10) XML 400k ± 0% 400k ± 0% ~ (p=0.796 n=10+10) [Geo mean] 428k 428k -0.01% Removing all the interface calls helps non-trivially with CPU, though. name old time/op new time/op delta Template 178ms ± 4% 173ms ± 3% -2.90% (p=0.000 n=94+96) Unicode 85.0ms ± 4% 83.9ms ± 4% -1.23% (p=0.000 n=96+96) GoTypes 543ms ± 3% 528ms ± 3% -2.73% (p=0.000 n=98+96) Flate 116ms ± 3% 113ms ± 4% -2.34% (p=0.000 n=96+99) GoParser 144ms ± 3% 140ms ± 4% -2.80% (p=0.000 n=99+97) Reflect 344ms ± 3% 334ms ± 4% -3.02% (p=0.000 n=100+99) Tar 106ms ± 5% 103ms ± 4% -3.30% (p=0.000 n=98+94) XML 198ms ± 5% 192ms ± 4% -2.88% (p=0.000 n=92+95) [Geo mean] 178ms 173ms -2.65% name old user-time/op new user-time/op delta Template 229ms ± 5% 224ms ± 5% -2.36% (p=0.000 n=95+99) Unicode 107ms ± 6% 106ms ± 5% -1.13% (p=0.001 n=93+95) GoTypes 696ms ± 4% 679ms ± 4% -2.45% (p=0.000 n=97+99) Flate 137ms ± 4% 134ms ± 5% -2.66% (p=0.000 n=99+96) GoParser 176ms ± 5% 172ms ± 8% -2.27% (p=0.000 n=98+100) Reflect 430ms ± 6% 411ms ± 5% -4.46% (p=0.000 n=100+92) Tar 128ms ±13% 123ms ±13% -4.21% (p=0.000 n=100+100) XML 239ms ± 6% 233ms ± 6% -2.50% (p=0.000 n=95+97) [Geo mean] 220ms 213ms -2.76% Change-Id: I15c7d6268347f8358e75066dfdbd77db24e8d0c1 Reviewed-on: https://go-review.googlesource.com/42145 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
- 28 Apr, 2017 2 commits
-
-
Josh Bleecher Snyder authored
It is not safe to modify Node.Opt in the backend. Instead of using Node.Opt to store liveness variable indices, use a map. This simplifies the code and makes it much more clearly race-free. There are generally few such variables, so the maps are not a significant source of allocations; this also remove some allocations from putting int32s into interfaces. Because map lookups are more expensive than interface value extraction, reorder valueEffects to do the map lookup last. The only remaining use of Node.Opt is now in esc.go. Passes toolstash-check. Fixes #20144 name old alloc/op new alloc/op delta Template 37.8MB ± 0% 37.9MB ± 0% ~ (p=0.548 n=5+5) Unicode 28.9MB ± 0% 28.9MB ± 0% ~ (p=0.548 n=5+5) GoTypes 110MB ± 0% 110MB ± 0% +0.16% (p=0.008 n=5+5) Compiler 461MB ± 0% 462MB ± 0% +0.08% (p=0.008 n=5+5) SSA 1.11GB ± 0% 1.11GB ± 0% +0.11% (p=0.008 n=5+5) Flate 24.7MB ± 0% 24.7MB ± 0% ~ (p=0.690 n=5+5) GoParser 31.1MB ± 0% 31.1MB ± 0% ~ (p=0.841 n=5+5) Reflect 73.7MB ± 0% 73.8MB ± 0% +0.23% (p=0.008 n=5+5) Tar 25.8MB ± 0% 25.7MB ± 0% ~ (p=0.690 n=5+5) XML 41.2MB ± 0% 41.2MB ± 0% ~ (p=0.841 n=5+5) [Geo mean] 71.9MB 71.9MB +0.06% name old allocs/op new allocs/op delta Template 385k ± 0% 384k ± 0% ~ (p=0.548 n=5+5) Unicode 344k ± 0% 343k ± 1% ~ (p=0.421 n=5+5) GoTypes 1.16M ± 0% 1.16M ± 0% ~ (p=0.690 n=5+5) Compiler 4.43M ± 0% 4.42M ± 0% ~ (p=0.095 n=5+5) SSA 9.86M ± 0% 9.84M ± 0% -0.19% (p=0.008 n=5+5) Flate 238k ± 0% 238k ± 0% ~ (p=1.000 n=5+5) GoParser 321k ± 0% 320k ± 0% ~ (p=0.310 n=5+5) Reflect 956k ± 0% 956k ± 0% ~ (p=1.000 n=5+5) Tar 252k ± 0% 251k ± 0% ~ (p=0.056 n=5+5) XML 402k ± 1% 400k ± 1% -0.57% (p=0.032 n=5+5) [Geo mean] 740k 739k -0.19% Change-Id: Id5916c9def76add272e89c59fe10968f0a6bb01d Reviewed-on: https://go-review.googlesource.com/42135 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
This reverts commit 94d540a4. Reason for revert: prefer something along the lines of CL 42018. Change-Id: I876fe32e98f37d8d725fe55e0fd0ea429c0198e0 Reviewed-on: https://go-review.googlesource.com/42022 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 27 Apr, 2017 2 commits
-
-
Josh Bleecher Snyder authored
Node.Used was written to from the backend concurrently with reads of Node.Class for the same ONAME Nodes. I do not know why it was not failing consistently under the race detector, but it is a race. This is likely also a problem with Node.HasVal and Node.HasOpt. They will be handled in a separate CL. Fix Used by moving it to gc.Name and making it a separate bool. There was one non-Name use of Used, marking OLABELs as used. That is no longer needed, now that goto and label checking happens early in the front end. Leave the getters and setters in place, to ease changing the representation in the future (or changing to an interface!). Updates #20144 Change-Id: I9bec7c6d33dcb129a4cfa9d338462ea33087f9f7 Reviewed-on: https://go-review.googlesource.com/42015 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
Type.Size and Type.Alignment are for the front end: They calculate size and alignment if needed. Type.MustSize and Type.MustAlignment are for the back end: They call Fatal if size and alignment are not already calculated. Most uses are of MustSize and MustAlignment, but that's because the back end is newer, and this API was added to support it. This CL was mostly generated with sed and selective reversion. The only mildly interesting bit is the change of the ssa.Type interface and the supporting ssa dummy types. Follow-up to review feedback on CL 41970. Passes toolstash-check. Change-Id: I0d9b9505e57453dae8fb6a236a07a7a02abd459e Reviewed-on: https://go-review.googlesource.com/42016 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
- 26 Apr, 2017 1 commit
-
-
Josh Bleecher Snyder authored
Put it at position zero, since it is fairly hot. This shrinks gc.Node into a smaller size class on 64 bit systems. name old time/op new time/op delta Template 193ms ± 5% 192ms ± 3% ~ (p=0.353 n=94+93) Unicode 86.1ms ± 5% 85.0ms ± 4% -1.23% (p=0.000 n=95+98) GoTypes 546ms ± 3% 544ms ± 4% -0.40% (p=0.007 n=94+97) Compiler 2.56s ± 3% 2.54s ± 3% -0.67% (p=0.000 n=99+97) SSA 5.13s ± 2% 5.10s ± 3% -0.55% (p=0.000 n=94+98) Flate 122ms ± 6% 121ms ± 4% -0.75% (p=0.002 n=97+95) GoParser 144ms ± 5% 144ms ± 4% ~ (p=0.298 n=98+97) Reflect 348ms ± 4% 349ms ± 4% ~ (p=0.350 n=98+97) Tar 105ms ± 5% 104ms ± 5% ~ (p=0.154 n=96+98) XML 200ms ± 5% 198ms ± 4% -0.71% (p=0.015 n=97+98) [Geo mean] 330ms 328ms -0.52% name old user-time/op new user-time/op delta Template 229ms ±11% 224ms ± 7% -2.16% (p=0.001 n=100+87) Unicode 109ms ± 5% 109ms ± 6% ~ (p=0.897 n=96+91) GoTypes 712ms ± 4% 709ms ± 4% ~ (p=0.085 n=96+98) Compiler 3.41s ± 3% 3.36s ± 3% -1.43% (p=0.000 n=98+98) SSA 7.46s ± 3% 7.31s ± 3% -2.02% (p=0.000 n=100+99) Flate 145ms ± 6% 143ms ± 6% -1.11% (p=0.001 n=99+97) GoParser 177ms ± 5% 176ms ± 5% -0.78% (p=0.018 n=95+95) Reflect 432ms ± 7% 435ms ± 9% ~ (p=0.296 n=100+100) Tar 121ms ± 7% 121ms ± 5% ~ (p=0.072 n=100+95) XML 241ms ± 4% 239ms ± 5% ~ (p=0.085 n=97+99) [Geo mean] 413ms 410ms -0.73% name old alloc/op new alloc/op delta Template 38.4MB ± 0% 37.7MB ± 0% -1.85% (p=0.008 n=5+5) Unicode 30.1MB ± 0% 28.8MB ± 0% -4.09% (p=0.008 n=5+5) GoTypes 112MB ± 0% 110MB ± 0% -1.69% (p=0.008 n=5+5) Compiler 470MB ± 0% 461MB ± 0% -1.91% (p=0.008 n=5+5) SSA 1.13GB ± 0% 1.11GB ± 0% -1.70% (p=0.008 n=5+5) Flate 25.0MB ± 0% 24.6MB ± 0% -1.67% (p=0.008 n=5+5) GoParser 31.6MB ± 0% 31.1MB ± 0% -1.66% (p=0.008 n=5+5) Reflect 77.1MB ± 0% 75.8MB ± 0% -1.69% (p=0.008 n=5+5) Tar 26.3MB ± 0% 25.7MB ± 0% -2.06% (p=0.008 n=5+5) XML 41.9MB ± 0% 41.1MB ± 0% -1.93% (p=0.008 n=5+5) [Geo mean] 73.5MB 72.0MB -2.03% name old allocs/op new allocs/op delta Template 383k ± 0% 383k ± 0% ~ (p=0.690 n=5+5) Unicode 343k ± 0% 343k ± 0% ~ (p=0.841 n=5+5) GoTypes 1.16M ± 0% 1.16M ± 0% ~ (p=0.310 n=5+5) Compiler 4.43M ± 0% 4.42M ± 0% -0.17% (p=0.008 n=5+5) SSA 9.85M ± 0% 9.85M ± 0% ~ (p=0.310 n=5+5) Flate 236k ± 0% 236k ± 1% ~ (p=0.841 n=5+5) GoParser 320k ± 0% 320k ± 0% ~ (p=0.421 n=5+5) Reflect 988k ± 0% 987k ± 0% ~ (p=0.690 n=5+5) Tar 252k ± 0% 251k ± 0% ~ (p=0.095 n=5+5) XML 399k ± 0% 399k ± 0% ~ (p=1.000 n=5+5) [Geo mean] 741k 740k -0.07% Change-Id: I9e952b58a98e30a12494304db9ce50d0a85e459c Reviewed-on: https://go-review.googlesource.com/41797 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Marvin Stenger <marvin.stenger94@gmail.com>
-
- 23 Apr, 2017 1 commit
-
-
Josh Bleecher Snyder authored
Change-Id: If5631eae7e2ad2bef56e79b82f77105246e68773 Reviewed-on: https://go-review.googlesource.com/41494 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
- 21 Apr, 2017 3 commits
-
-
Josh Bleecher Snyder authored
Follow-up to previous CL. gorename -from '"cmd/compile/internal/gc".duintxxLSym' -to duintxx gorename -from '"cmd/compile/internal/gc".duint8LSym' -to duint8 gorename -from '"cmd/compile/internal/gc".duint16LSym' -to duint16 gorename -from '"cmd/compile/internal/gc".duint32LSym' -to duint32 gorename -from '"cmd/compile/internal/gc".duintptrLSym' -to duintptr gorename -from '"cmd/compile/internal/gc".dbvecLSym' -to dbvec gorename -from '"cmd/compile/internal/gc".dsnameLSym' -to dsname gorename -from '"cmd/compile/internal/gc".dsymptrLSym' -to dsymptr gorename -from '"cmd/compile/internal/gc".dsymptrOffLSym' -to dsymptrOff gorename -from '"cmd/compile/internal/gc".dsymptrWeakOffLSym' -to dsymptrWeakOff Passes toolstash-check. Change-Id: I007f57340f9e8b1468553242556ae25a71167e8c Reviewed-on: https://go-review.googlesource.com/41397 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Cherry Zhang authored
ARM's udiv function is nosplit and it shouldn't be preemptied (passing args in registers). It is in some sense like DUFFCOPY, which we don't mark as safepoint. Change-Id: I49f7c4e69e787ac364d0b0def0661e79a0ea9e69 Reviewed-on: https://go-review.googlesource.com/41370 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Keith Randall authored
The experiment "clobberdead" clobbers all pointer fields that the compiler thinks are dead, just before and after every safepoint. Useful for debugging the generation of live pointer bitmaps. Helped find the following issues: Update #15936 Update #16026 Update #16095 Update #18860 Change-Id: Id1d12f86845e3d93bae903d968b1eac61fc461f9 Reviewed-on: https://go-review.googlesource.com/23924 Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Reviewed-by:
Cherry Zhang <cherryyz@google.com>
-
- 20 Apr, 2017 1 commit
-
-
Keith Randall authored
At VARKILLs, zero a variable if it is ambiguously live. After the VARKILL anything this variable references might be collected. If it were to become live again later, the GC will see references to already-collected objects. We don't know a variable is ambiguously live until very late in compilation (after lowering, register allocation, ...), so it is hard to generate the code in an arch-independent way. We also have to be careful not to clobber any registers. Fortunately, this almost never happens so performance is ~irrelevant. There are only 2 instances where this triggers in the stdlib. Fixes #20029 Change-Id: Ia9585a91d7b823fad4a9d141d954464cc7af31f4 Reviewed-on: https://go-review.googlesource.com/41076 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
David Chase <drchase@google.com>
-
- 18 Apr, 2017 4 commits
-
-
Matthew Dempsky authored
Automated refactoring using github.com/mdempsky/unbed (to rewrite s.Foo to s.FuncInfo.Foo) and then gorename (to rename the FuncInfo field to just Func). Passes toolstash-check -all. Change-Id: I802c07a1239e0efea058a91a87c5efe12170083a Reviewed-on: https://go-review.googlesource.com/40670 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Josh Bleecher Snyder authored
A prior CL eliminated the last reference to Ctxt.Hash from the compiler. Change-Id: Ic97ff84ed1a14e0c93fb0e8ec0b2617c3397c0e8 Reviewed-on: https://go-review.googlesource.com/40699 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
It was a bit weird to have it at the top of pgen.go. This does half of the TODO at the top of the comment. Change-Id: I65140fa05673b2dbb6feddb8c1877f6d624a7844 Reviewed-on: https://go-review.googlesource.com/40698 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
The compiler handled gcargs and gclocals LSyms unusually. It generated placeholder symbols (makefuncdatasym), filled them in, and then renamed them for content-addressability. This is an important binary size optimization; the same locals information occurs over and over. This CL continues to treat these LSyms unusually, but in a slightly more explicit way, and importantly for concurrent compilation, in a way that does not require concurrent modification of Ctxt.Hash. Instead of creating gcargs and gclocals in the usual way, by creating a types.Sym and then an obj.LSym, we add them directly to obj.FuncInfo, initialize them in obj.InitTextSym, and deduplicate and add them to ctxt.Data at the end. Then the backend's job is simply to fill them in and rename them appropriately. Updates #15756 name old alloc/op new alloc/op delta Template 38.8MB ± 0% 38.7MB ± 0% -0.22% (p=0.016 n=5+5) Unicode 29.8MB ± 0% 29.8MB ± 0% ~ (p=0.690 n=5+5) GoTypes 113MB ± 0% 113MB ± 0% -0.24% (p=0.008 n=5+5) SSA 1.25GB ± 0% 1.24GB ± 0% -0.39% (p=0.008 n=5+5) Flate 25.3MB ± 0% 25.2MB ± 0% -0.43% (p=0.008 n=5+5) GoParser 31.7MB ± 0% 31.7MB ± 0% -0.22% (p=0.008 n=5+5) Reflect 78.2MB ± 0% 77.6MB ± 0% -0.80% (p=0.008 n=5+5) Tar 26.6MB ± 0% 26.3MB ± 0% -0.85% (p=0.008 n=5+5) XML 42.4MB ± 0% 41.9MB ± 0% -1.04% (p=0.008 n=5+5) name old allocs/op new allocs/op delta Template 378k ± 0% 377k ± 1% ~ (p=0.151 n=5+5) Unicode 321k ± 1% 321k ± 0% ~ (p=0.841 n=5+5) GoTypes 1.14M ± 0% 1.14M ± 0% -0.47% (p=0.016 n=5+5) SSA 9.71M ± 0% 9.67M ± 0% -0.33% (p=0.008 n=5+5) Flate 233k ± 1% 232k ± 1% ~ (p=0.151 n=5+5) GoParser 316k ± 0% 315k ± 0% -0.49% (p=0.016 n=5+5) Reflect 979k ± 0% 972k ± 0% -0.75% (p=0.008 n=5+5) Tar 250k ± 0% 247k ± 1% -0.92% (p=0.008 n=5+5) XML 392k ± 1% 389k ± 0% -0.67% (p=0.008 n=5+5) Change-Id: Idc36186ca9d2f8214b5f7720bbc27b6bb22fdc48 Reviewed-on: https://go-review.googlesource.com/40697 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 07 Apr, 2017 1 commit
-
-
Robert Griesemer authored
- created new package cmd/compile/internal/types - moved Pkg, Sym, Type to new package - to break cycles, for now we need the (ugly) types/utils.go file which contains a handful of functions that must be installed early by the gc frontend - to break cycles, for now we need two functions to convert between *gc.Node and *types.Node (the latter is a dummy type) - adjusted the gc's code to use the new package and the conversion functions as needed - made several Pkg, Sym, and Type methods functions as needed - renamed constructors typ, typPtr, typArray, etc. to types.New, types.NewPtr, types.NewArray, etc. Passes toolstash-check -all. Change-Id: I8adfa5e85c731645d0a7fd2030375ed6ebf54b72 Reviewed-on: https://go-review.googlesource.com/39855Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 24 Mar, 2017 1 commit
-
-
Josh Bleecher Snyder authored
Updates #15756 Change-Id: I5ad87ef44b8ee48e1294820e0b1ab0ec07c480eb Reviewed-on: https://go-review.googlesource.com/38590 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 23 Mar, 2017 1 commit
-
-
Matthew Dempsky authored
In livenessepilogue, if we save liveness information for instructions before updating liveout, we can avoid an extra bitvector temporary and some extra copying around. Passes toolstash-check -all. Change-Id: I10d5803167ef3eba2e9e95094adc7e3d33929cc7 Reviewed-on: https://go-review.googlesource.com/38408Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 21 Mar, 2017 4 commits
-
-
Matthew Dempsky authored
Must have been lost when rebasing the SSA liveness CLs. Change-Id: Iaac33158cc7c92ea44a023c242eb914a7d6979c6 Reviewed-on: https://go-review.googlesource.com/38427 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Josh Bleecher Snyder authored
It's easier to grep output than recompile the compiler anyway. For concurrent compilation. Updates #15756 Change-Id: I151cb5dc77056469cd9019d516f86454e931a197 Reviewed-on: https://go-review.googlesource.com/38424 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Josh Bleecher Snyder authored
I think this got lost in a rebase somewhere. Updates #15756 Change-Id: Ia3e7c60d1b9254f2877217073732b46c91059ade Reviewed-on: https://go-review.googlesource.com/38425 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Matthew Dempsky authored
During AllocFrame, we drop unused variables from Curfn.Func.Dcl, but there might still be OpVarFoo instructions that reference those variables. This wasn't a problem though because gvardefx used to emit ANOP for unused variables instead of AVARFOO. As an easy fix, if we see OpVarFoo (or OpKeepAlive) referencing an unused variable, we can ignore it. Fixes #19632. Change-Id: I4e9ffabdb4058f7cdcc4663b540f5a5a692daf8b Reviewed-on: https://go-review.googlesource.com/38400Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 20 Mar, 2017 3 commits
-
-
Matthew Dempsky authored
Change-Id: Id807c702ad71edddd23f2eb6f5e69e9a62e60bcd Reviewed-on: https://go-review.googlesource.com/38089 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Matthew Dempsky authored
Passes toolstash-check -all. Change-Id: I92c3c25d6c053f971f346f4fa3bbc76419b58183 Reviewed-on: https://go-review.googlesource.com/38087 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Keith Randall <khr@golang.org>
-
Matthew Dempsky authored
This CL changes the order that liveness analysis visits CFG blocks to PC order, rather than RPO. This doesn't meaningfully change anything except that the PCDATA_StackMapIndex values will be assigned in PC order too. However, this does have the benefit that the subsequent CL to port liveness analysis to the SSA CFG (which has blocks in PC order) will now pass toolstash-check. Change-Id: I1de5a2eecb8027723a6e422d46186d0c63d48c8d Reviewed-on: https://go-review.googlesource.com/38086 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
- 17 Mar, 2017 3 commits
-
-
Josh Bleecher Snyder authored
While we're here, also eliminate a few more Curfn uses. Passes toolstash -cmp. No compiler performance impact. Updates #15756 Change-Id: Ib8db9e23467bbaf16cc44bf62d604910f733d6b8 Reviewed-on: https://go-review.googlesource.com/38331 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Matthew Dempsky authored
Prepared using gorename. Change-Id: Id55dac9ae5446a8bfeac06e7995b35f4c249eeca Reviewed-on: https://go-review.googlesource.com/38302 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Josh Bleecher Snyder authored
Passes toolstash -cmp. Updates #15756 Change-Id: Ia071dbbd7f2ee0f8433d8c37af4f7b588016244e Reviewed-on: https://go-review.googlesource.com/38231Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
- 14 Mar, 2017 2 commits
-
-
Matthew Dempsky authored
In the SSA CFG, TEXT, RET, and JMP instructions correspond to Blocks, not Values. Rework liveness analysis so that progeffects only cares about Progs that result from Values, and handle Blocks separately. Passes toolstash-check -all. Change-Id: Ic23719c75b0421fdb51382a08dac18c3ba042b32 Reviewed-on: https://go-review.googlesource.com/38085 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Josh Bleecher Snyder <josharian@gmail.com>
-
Josh Bleecher Snyder authored
There were a surprising number of places in the tree that used yyerror for failed internal consistency checks. Switch them to Fatalf. Updates #15756 Updates #19250 Change-Id: Ie4278148185795a28ff3c27dacffc211cda5bbdd Reviewed-on: https://go-review.googlesource.com/38153 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-