Permalink
Switch branches/tags
weekly.2012-03-27 weekly.2012-03-22 weekly.2012-03-13 weekly.2012-03-04 weekly.2012-02-22 weekly.2012-02-14 weekly.2012-02-07 weekly.2012-01-27 weekly.2012-01-20 weekly.2012-01-15 weekly.2011-12-22 weekly.2011-12-14 weekly.2011-12-06 weekly.2011-12-02 weekly.2011-12-01 weekly.2011-11-18 weekly.2011-11-09 weekly.2011-11-08 weekly.2011-11-02 weekly.2011-11-01 weekly.2011-10-26 weekly.2011-10-25 weekly.2011-10-18 weekly.2011-10-06 weekly.2011-09-21 weekly.2011-09-16 weekly.2011-09-07 weekly.2011-09-01 weekly.2011-08-17 weekly.2011-08-10 weekly.2011-07-29 weekly.2011-07-19 weekly.2011-07-07 weekly.2011-06-23 weekly.2011-06-16 weekly.2011-06-09 weekly.2011-06-02 weekly.2011-05-22 weekly.2011-04-27 weekly.2011-04-13 weekly.2011-04-04 weekly.2011-03-28 weekly.2011-03-15 weekly.2011-03-07.1 weekly.2011-03-07 weekly.2011-02-24 weekly.2011-02-15 weekly.2011-02-01.1 weekly.2011-02-01 weekly.2011-01-20 weekly.2011-01-19 weekly.2011-01-12 weekly.2011-01-06 weekly.2010-12-22 weekly.2010-12-15.1 weekly.2010-12-15 weekly.2010-12-08 weekly.2010-12-02 weekly.2010-11-23 weekly.2010-11-10 weekly.2010-11-02 weekly.2010-10-27 weekly.2010-10-20 weekly.2010-10-13.1 weekly.2010-10-13 weekly.2010-09-29 weekly.2010-09-22 weekly.2010-09-15 weekly.2010-09-06 weekly.2010-08-25 weekly.2010-08-11 weekly.2010-08-04 weekly.2010-07-29 weekly.2010-07-14 weekly.2010-07-01 weekly.2010-06-21 weekly.2010-06-09 weekly.2010-05-27 weekly.2010-05-04 weekly.2010-04-27 weekly.2010-04-13 weekly.2010-03-30 weekly.2010-03-22 weekly.2010-03-15 weekly.2010-03-04 weekly.2010-02-23 weekly.2010-02-17 weekly.2010-02-04 weekly.2010-01-27 weekly.2010-01-13 weekly.2010-01-05 weekly.2009-12-22 weekly.2009-12-09 weekly.2009-12-07 weekly.2009-11-17 weekly.2009-11-12 weekly.2009-11-10.1 weekly.2009-11-10 weekly.2009-11-06 weekly
Nothing to show
Commits on Oct 19, 2018
  1. cmd/compile: remove compiling_wrappers

    mdempsky committed Oct 18, 2018
    It's no longer needed after removing safemode.
    
    Change-Id: I7581d77a86342e3b6d7c632839f5eb7a5c20902e
    Reviewed-on: https://go-review.googlesource.com/c/143397
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Oct 18, 2018
  1. cmd/compile: extract gc.eqtype as types.Identical

    mdempsky committed Oct 18, 2018
    For symmetry with go/types.Identical.
    
    Passes toolstash-check.
    
    Change-Id: Id19c3956e44ed8e2d9f203d15824322cc5842d3d
    Reviewed-on: https://go-review.googlesource.com/c/143180
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
Commits on Oct 17, 2018
  1. cmd/compile: remove obsolete "safe" mode

    mdempsky committed Oct 16, 2018
    Nowadays there are better ways to safely run untrusted Go programs, like
    NaCl and gVisor.
    
    Change-Id: I20c45f13a50dbcf35c343438b720eb93e7b4e13a
    Reviewed-on: https://go-review.googlesource.com/c/142717
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: Russ Cox <rsc@golang.org>
Commits on Oct 16, 2018
  1. cmd/compile: remove -dolinkobj flag

    mdempsky committed Oct 16, 2018
    This used to be used by cmd/vet and some assembly generation tests, but
    those were removed in CL 37691 and CL 107336. No point in keeping an
    unneeded flag around.
    
    Fixes #28220.
    
    Change-Id: I59f8546954ab36ea61ceba81c10d6e16d74b966a
    Reviewed-on: https://go-review.googlesource.com/c/142677
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  2. cmd/compile/internal/gc: simplify typechecking definitions

    mdempsky committed Oct 16, 2018
    There are only a handful of nodes that we need to pass to
    typecheckdef (OLITERAL, ONAME, OTYPE, and ONONAME), but typecheck1
    takes the awkward approach of calling typecheckdef on every node with
    Sym != nil, and then excluding a long list of uninteresting Ops that
    have a non-nil Sym.
    
    Passes toolstash-check.
    
    Change-Id: I0271d2faff0208ad57ddc1f1a540a5fbed870234
    Reviewed-on: https://go-review.googlesource.com/c/142657
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Oct 12, 2018
  1. cmd/compile: remove ineffectual -i flag

    mdempsky committed Oct 12, 2018
    This flag lost its usefulness in CL 34273.
    
    Change-Id: I033c29f105937139b4e359a340906be439f1ed07
    Reviewed-on: https://go-review.googlesource.com/c/141646
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    Reviewed-by: Robert Griesemer <gri@golang.org>
Commits on Oct 11, 2018
  1. cmd/compile/internal/gc: remove OCMPIFACE/OCMPSTR placeholders

    mdempsky committed Oct 11, 2018
    Change-Id: If05f6146a1fd97f61fc71629c5c29df43220d0c8
    Reviewed-on: https://go-review.googlesource.com/c/141638
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  2. cmd/compile/internal/gc: remove OCMPIFACE and OCMPSTR

    mdempsky committed Oct 10, 2018
    Interface and string comparisons don't need separate Ops any more than
    struct or array comparisons do.
    
    Removing them requires shuffling some code around in walk (and a
    little in order), but overall allows simplifying things a bit.
    
    Passes toolstash-check.
    
    Change-Id: I084b8a6c089b768dc76d220379f4daed8a35db15
    Reviewed-on: https://go-review.googlesource.com/c/141637
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Oct 10, 2018
  1. cmd/compile/internal/types: regen stringer file

    mdempsky committed Oct 10, 2018
    Forgot to do this for golang.org/cl/76312.
    
    Change-Id: Ic20fef3eeff14a805f608221aff1fa03934be3ca
    Reviewed-on: https://go-review.googlesource.com/c/141357
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    Reviewed-by: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on Oct 9, 2018
  1. cmd/compile/internal/gc: major evconst cleanup

    mdempsky committed Oct 4, 2018
    Major cleanup to structure the code more similarly to go/constant.
    
    Passes "toolstash -cmp" on std cmd.
    
    Change-Id: I3ec7a7a24e313f119b0da4095001aad02e317894
    Reviewed-on: https://go-review.googlesource.com/c/139901
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
Commits on Oct 4, 2018
  1. cmd/compile: merge TPTR32 and TPTR64 as TPTR

    mdempsky committed Nov 6, 2017
    Change-Id: I0490098a7235458c5aede1135426a9f19f8584a7
    Reviewed-on: https://go-review.googlesource.com/c/76312
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
  2. cmd/compile: handle TPTR32 like TPTR64 in smallintconst

    mdempsky committed Oct 3, 2018
    In preparation for followup CL merging TPTR32 and TPTR64, move TPTR32
    from the small-types fast path to the generic 64-bit fallback code so
    that it's in the same case clause as TPTR64.
    
    This should be safe, but theoretically it could change semantics
    because TPTR32 used to always be assumed to be "small", whereas now it
    will only be considered small for values less than 1<<31.
    
    This change is done in a separate CL so that it's more easily
    identified by git bisection in case it does introduce regressions.
    
    Change-Id: I6c7bb253d4e4d95c530a6e05a1147905674b55ca
    Reviewed-on: https://go-review.googlesource.com/c/139517
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
  3. cmd/compile: remove pointer arithmetic

    mdempsky committed Nov 6, 2017
    Change-Id: Ie4bab0b74d5a4e1aecd8501a48176b2e9a3d8c42
    Reviewed-on: https://go-review.googlesource.com/c/76311
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    Reviewed-by: Robert Griesemer <gri@golang.org>
Commits on Oct 3, 2018
  1. cmd/compile/internal/gc: remove binary package export format

    mdempsky committed Oct 3, 2018
    This CL removes all unused code from bimport.go and bexport.go.
    
    In the interest of keeping this CL strictly delete-only and easier to
    review, the task of consolidating the vestigial code elsewhere is left
    to future CLs.
    
    Change-Id: Ib757cc27e3fe814cbf534776d026e4d4cddfc6db
    Reviewed-on: https://go-review.googlesource.com/c/139338
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
  2. cmd/compile/internal/gc: disable binary package export format

    mdempsky committed Oct 3, 2018
    The new indexed package export format appears stable, and no reports
    of needing to revert back to binary package export.
    
    This CL disables the binary package export format by mechanically
    replacing 'flagiexport' with 'true', and then superficial code
    cleanups to keep the resulting code idiomatic. The resulting dead code
    is removed in a followup CL.
    
    Change-Id: Ic30d85f78778a31d279a56b9ab14e80836d50135
    Reviewed-on: https://go-review.googlesource.com/c/139337
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
  3. cmd/compile: use IsPtr instead of types.Tptr

    mdempsky committed Nov 6, 2017
    Produced using gofmt -r.
    
    Change-Id: I4184940618a3a1dac563a9d20aafe1d9f705300c
    Reviewed-on: https://go-review.googlesource.com/c/76310
    Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Sep 4, 2018
  1. cmd/compile: use "N variables but M values" error for OAS

    mdempsky committed Aug 24, 2018
    Makes the error message more consistent between OAS and OAS2.
    
    Fixes #26616.
    
    Change-Id: I07ab46c5ef8a37efb2cb557632697f5d1bf789f7
    Reviewed-on: https://go-review.googlesource.com/131280
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
Commits on Jul 12, 2018
  1. cmd/compile: fix ICE due to missing inline function body

    mdempsky committed Jul 11, 2018
    For golang.org/cl/74110, I forgot that you can use range-based for
    loops to extract key values from a map value.
    
    This wasn't a problem for the binary format importer, because it was
    more tolerant about missing inline function bodies. However, the
    indexed importer is more particular about this.
    
    We could potentially just make it more lenient like the binary
    importer, but tweaking the logic here is easy enough and seems like
    the preferable solution.
    
    Fixes #26341.
    
    Change-Id: I54564dcd0be60ea393f8a0f6954b7d3d61e96ee5
    Reviewed-on: https://go-review.googlesource.com/123475
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Heschi Kreinick <heschi@google.com>
Commits on Jul 6, 2018
  1. cmd/compile: fix "width not calculated" ICE

    mdempsky committed Jul 6, 2018
    Expanding interface method sets is handled during width calculation,
    which can't be performed concurrently. Make sure that we eagerly
    expand interfaces in the frontend when importing them, even if they're
    not actually used by code, because we might need to generate a type
    description of them.
    
    Fixes #25055.
    
    Change-Id: I6fd2756de2c7d5dbc33056f70b3028ca3aebab41
    Reviewed-on: https://go-review.googlesource.com/122517
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Commits on Jun 22, 2018
  1. cmd/compile: fix compile failure for lazily resolved shadowed types

    mdempsky committed Jun 21, 2018
    If expanding an inline function body required lazily expanding a
    package-scoped type whose identifier was shadowed within the function
    body, the lazy expansion would instead overwrite the local symbol
    definition instead of the package-scoped symbol. This was due to
    importsym using s.Def instead of s.PkgDef.
    
    Unfortunately, this is yet another consequence of the current awkward
    scope handling code.
    
    Passes toolstash-check.
    
    Fixes #25984.
    
    Change-Id: Ia7033e1749a883e6e979c854d4b12b0b28083dd8
    Reviewed-on: https://go-review.googlesource.com/120456
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
    Reviewed-by: Robert Griesemer <gri@golang.org>
Commits on Jun 21, 2018
  1. cmd/compile: fix recursive inimport handling

    mdempsky committed Jun 21, 2018
    expandDecl can be called recursively, so it's not an appropriate place
    to clean inimport. Instead, move this up to resolve, along with an
    appropriate recursion check.
    
    Passes toolstash-check.
    
    Change-Id: I138d37b057dcc6525c780b4b3fbaa5e97f99655b
    Reviewed-on: https://go-review.googlesource.com/120455
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
Commits on May 3, 2018
  1. cmd: re-generate SymKind.String for SDWARFMISC

    mdempsky committed May 3, 2018
    SDWARFMISC was added in golang.org/cl/93664.
    
    Change-Id: Ifab0a5effd8e64a2b7916004aa35d51030f23d15
    Reviewed-on: https://go-review.googlesource.com/111261
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    Reviewed-by: Heschi Kreinick <heschi@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
Commits on May 1, 2018
  1. cmd/compile: explicitly disallow mixing -iexport={false,true}

    mdempsky committed May 1, 2018
    flagiexport currently controls not just whether to use the indexed
    export format when writing out package data, but also how symbol
    import logic works. In particular, it enables lazy loading logic that
    currently doesn't work with packages imported via bimport.
    
    We could change the import logic to base decisions on the export data
    format used by the packages that individual symbols were loaded from,
    but since we expect to deprecate and remove bimport anyway and there's
    no need for mixing bimport and iimport, it's simpler to just disallow
    mixing them.
    
    Change-Id: I02dbac45062e9dd85a1a647ee46bfa0efbb67e9d
    Reviewed-on: https://go-review.googlesource.com/110715
    Reviewed-by: Robert Griesemer <gri@golang.org>
  2. cmd/compile: update liveness comments

    mdempsky committed Nov 7, 2017
    The explanation about VARDEF/VARKILL is from when liveness analysis
    was performed on Progs. Now that it's performed on SSA, it should
    reference their corresponding SSA ops (OpVarDef/OpVarKill) instead.
    
    Change-Id: Icc4385b52768f6987cda162824b75340aee0b223
    Reviewed-on: https://go-review.googlesource.com/76313
    Reviewed-by: Robert Griesemer <gri@golang.org>
  3. runtime: eliminate scase.receivedp

    mdempsky committed Mar 7, 2017
    Make selectgo return recvOK as a result parameter instead.
    
    Change-Id: Iffd436371d360bf666b76d4d7503e7c3037a9f1d
    Reviewed-on: https://go-review.googlesource.com/37935
    Reviewed-by: Austin Clements <austin@google.com>
  4. cmd/compile: open code select{send,recv,default}

    mdempsky committed Mar 7, 2017
    Registration now looks like:
    
            var cases [4]runtime.scases
            var order [8]uint16
    	cases[0].kind = caseSend
    	cases[0].c = c1
    	cases[0].elem = &v1
    	if raceenabled || msanenabled {
    		selectsetpc(&cases[0])
    	}
    	cases[1].kind = caseRecv
    	cases[1].c = c2
    	cases[1].elem = &v2
    	if raceenabled || msanenabled {
    		selectsetpc(&cases[1])
    	}
    	...
    
    Change-Id: Ib9bcf426a4797fe4bfd8152ca9e6e08e39a70b48
    Reviewed-on: https://go-review.googlesource.com/37934
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Austin Clements <austin@google.com>
  5. runtime: eliminate runtime.hselect

    mdempsky committed Mar 7, 2017
    Now the registration phase looks like:
    
        var cases [4]runtime.scases
        var order [8]uint16
        selectsend(&cases[0], c1, &v1)
        selectrecv(&cases[1], c2, &v2, nil)
        selectrecv(&cases[2], c3, &v3, &ok)
        selectdefault(&cases[3])
        chosen := selectgo(&cases[0], &order[0], 4)
    
    Primarily, this is just preparation for having the compiler open-code
    selectsend, selectrecv, and selectdefault.
    
    As a minor benefit, order can now be layed out separately on the stack
    in the pointer-free segment, so it won't take up space in the
    function's stack pointer maps.
    
    Change-Id: I5552ba594201efd31fcb40084da20b42ea569a45
    Reviewed-on: https://go-review.googlesource.com/37933
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Austin Clements <austin@google.com>
Commits on Apr 26, 2018
  1. cmd/compile: cleaner solution for importing init functions

    mdempsky committed Apr 26, 2018
    Using oldname+resolve is how typecheck handles this anyway.
    
    Passes toolstash -cmp, with both -iexport enabled and disabled.
    
    Change-Id: I12b0f0333d6b86ce6bfc4d416c461b5f15c1110d
    Reviewed-on: https://go-review.googlesource.com/109715
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
  2. cmd/compile: allow SSA of multi-field structs while instrumenting

    mdempsky committed Apr 25, 2018
    When we moved racewalk to buildssa, we disabled SSA of structs with
    2-4 fields while instrumenting because it caused false dependencies
    because for "x.f" we would emit
    
        (StructSelect (Load (Addr x)) "f")
    
    Even though we later simplify this to
    
        (Load (OffPtr (Addr x) "f"))
    
    the instrumentation saw a load of x in its entirety and would issue
    appropriate race/msan calls.
    
    The fix taken here is to directly emit the OffPtr form when x.f is
    addressable and can't be represented in SSA form.
    
    Change-Id: I0caf37bced52e9c16937466b0ac8cab6d356e525
    Reviewed-on: https://go-review.googlesource.com/109360
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Cherry Zhang <cherryyz@google.com>
Commits on Apr 25, 2018
  1. cmd/compile/internal/types: remove Field.Funarg

    mdempsky committed Apr 25, 2018
    Passes toolstash-check.
    
    Change-Id: Idc00f15e369cad62cb8f7a09fd0ef09abd3fcdef
    Reviewed-on: https://go-review.googlesource.com/109356
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
  2. go/types: fix lhs/rhs mixup in docs

    mdempsky committed Apr 24, 2018
    Change-Id: Ifd51636c9254de51b8a21371d7507a9481bcca0a
    Reviewed-on: https://go-review.googlesource.com/109142
    Reviewed-by: Robert Griesemer <gri@golang.org>
Commits on Apr 24, 2018
  1. cmd/compile/internal/types: replace Type.Val with Type.Elem

    mdempsky committed Apr 24, 2018
    This reduces the API surface of Type slightly (for #25056), but also
    makes it more consistent with the reflect and go/types APIs.
    
    Passes toolstash-check.
    
    Change-Id: Ief9a8eb461ae6e88895f347e2a1b7b8a62423222
    Reviewed-on: https://go-review.googlesource.com/109138
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
  2. cmd/compile/internal/types: remove ElemType wrapper

    mdempsky committed Apr 24, 2018
    This was an artifact from when we had a separate ssa.Type interface to
    break circular dependency between packages ssa and gc. It's no longer
    needed now that package ssa directly uses package types.
    
    Change-Id: I6a93e5d79082815f7f0eb89507381969cc6cb403
    Reviewed-on: https://go-review.googlesource.com/109137
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
  3. cmd/compile: enable indexed export format by default

    mdempsky committed Apr 12, 2018
    Change-Id: Id018eeb79afbe2c695a583b3845cfbc1aab08388
    Reviewed-on: https://go-review.googlesource.com/106797
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>
  4. cmd/compile: add indexed export format

    mdempsky committed Apr 1, 2018
    This CL introduces a new indexed data format for package export
    data. This improves on the previous (sequential) binary format by
    allowing the compiler to selectively (and lazily) load only the data
    that's actually needed for compilation.
    
    In large Go projects, the package export data can become very large
    due to transitive type declaration dependencies and inline
    function/method bodies. By lazily loading these declarations and
    bodies as needed, we avoid wasting time and memory processing
    unnecessary and/or redundant data.
    
    In the benchmarks below, "old" is -iexport=false and "new" is
    -iexport=true. The suffixes indicate the compiler concurrency (-c) and
    inlining (-l) settings used for the build (using -gcflags=all=-foo).
    Benchmarks were run on an HP Z620.
    
    Juju is "go build -a github.com/juju/juju/cmd/...":
    
    name          old real-time/op  new real-time/op  delta
    Juju/c=1/l=0        44.0s ± 1%        38.7s ± 9%  -11.97%  (p=0.001 n=7+7)
    Juju/c=1/l=4        53.7s ± 3%        45.3s ± 4%  -15.53%  (p=0.001 n=7+7)
    Juju/c=4/l=0        39.7s ± 8%        32.0s ± 4%  -19.38%  (p=0.001 n=7+7)
    Juju/c=4/l=4        46.3s ± 4%        38.0s ± 4%  -18.06%  (p=0.001 n=7+7)
    
    name          old user-time/op  new user-time/op  delta
    Juju/c=1/l=0         371s ± 1%         300s ± 0%  -19.07%  (p=0.001 n=7+6)
    Juju/c=1/l=4         482s ± 0%         374s ± 1%  -22.37%  (p=0.001 n=7+7)
    Juju/c=4/l=0         410s ± 1%         340s ± 1%  -17.19%  (p=0.001 n=7+7)
    Juju/c=4/l=4         532s ± 1%         424s ± 1%  -20.26%  (p=0.001 n=7+7)
    
    name          old sys-time/op   new sys-time/op   delta
    Juju/c=1/l=0        33.4s ± 1%        28.4s ± 2%  -15.02%  (p=0.001 n=7+7)
    Juju/c=1/l=4        40.7s ± 2%        32.8s ± 3%  -19.51%  (p=0.001 n=7+7)
    Juju/c=4/l=0        39.8s ± 2%        34.4s ± 2%  -13.74%  (p=0.001 n=7+7)
    Juju/c=4/l=4        48.4s ± 2%        40.4s ± 2%  -16.50%  (p=0.001 n=7+7)
    
    Kubelet is "go build -a k8s.io/kubernetes/cmd/kubelet":
    
    name             old real-time/op  new real-time/op  delta
    Kubelet/c=1/l=0        42.0s ± 1%        34.8s ± 1%  -17.27%  (p=0.008 n=5+5)
    Kubelet/c=1/l=4        55.4s ± 3%        45.4s ± 3%  -18.06%  (p=0.002 n=6+6)
    Kubelet/c=4/l=0        37.4s ± 3%        29.9s ± 1%  -20.25%  (p=0.004 n=6+5)
    Kubelet/c=4/l=4        48.1s ± 2%        39.0s ± 5%  -18.93%  (p=0.002 n=6+6)
    
    name             old user-time/op  new user-time/op  delta
    Kubelet/c=1/l=0         291s ± 1%         233s ± 1%  -19.96%  (p=0.002 n=6+6)
    Kubelet/c=1/l=4         385s ± 1%         298s ± 1%  -22.51%  (p=0.002 n=6+6)
    Kubelet/c=4/l=0         325s ± 0%         268s ± 1%  -17.48%  (p=0.004 n=5+6)
    Kubelet/c=4/l=4         429s ± 1%         343s ± 1%  -20.08%  (p=0.002 n=6+6)
    
    name             old sys-time/op   new sys-time/op   delta
    Kubelet/c=1/l=0        25.1s ± 2%        20.9s ± 4%  -16.69%  (p=0.002 n=6+6)
    Kubelet/c=1/l=4        31.2s ± 3%        24.4s ± 0%  -21.67%  (p=0.010 n=6+4)
    Kubelet/c=4/l=0        30.2s ± 2%        25.6s ± 1%  -15.34%  (p=0.002 n=6+6)
    Kubelet/c=4/l=4        37.3s ± 1%        30.9s ± 2%  -17.11%  (p=0.002 n=6+6)
    
    Change-Id: Ie43eb3bbe1392cbb61c86792a17a57b33b9561f0
    Reviewed-on: https://go-review.googlesource.com/106796
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: Robert Griesemer <gri@golang.org>