1. 22 Mar, 2016 1 commit
    • Keith Randall's avatar
      cmd/compile: allow naming of subexpressions · 259b7edf
      Keith Randall authored
      Allow names to be used for subexpressions of match rules.
      For example:
      
      (OpA x:(OpB y)) -> ..use x here to refer to the OpB value..
      
      This gets rid of the .Args[0].Args[0]... way of naming we
      used to use.
      
      While we're here, give all subexpression matches names instead
      of recomputing them with .Args[i] sequences each time they
      are referenced.  Makes the generated rule code a bit smaller.
      
      Change-Id: Ie42139f6f208933b75bd2ae8bd34e95419bc0e4e
      Reviewed-on: https://go-review.googlesource.com/20997
      Run-TryBot: Todd Neal <todd@tneal.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarTodd Neal <todd@tneal.org>
      259b7edf
  2. 21 Mar, 2016 33 commits
  3. 20 Mar, 2016 6 commits
    • Richard Miller's avatar
      net/http: adaptive wait time in PersistConnLeak tests · 34f0c0b3
      Richard Miller authored
      In tests TransportPersistConnLeak and TransportPersistConnLeakShortBody,
      there's a fixed wait time (100ms and 400ms respectively) to allow
      goroutines to exit after CloseIdleConnections is called. This
      is sometimes too short on a slow host running many simultaneous
      tests.
      
      This CL replaces the fixed sleep in each test with a sequence of
      shorter sleeps, testing the number of remaining goroutines until
      it reaches the threshold or an overall time limit of 500ms expires.
      This prevents some failures in the plan9_arm builder, while reducing
      the test time on faster machines.
      
      Fixes #14887
      
      Change-Id: Ia5c871062df139e2667cdfb2ce8283e135435318
      Reviewed-on: https://go-review.googlesource.com/20922
      Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      34f0c0b3
    • Alexandru Moșoi's avatar
      cmd/compile: add rules to simplify AddPtr · a7a19994
      Alexandru Moșoi authored
      Fixes #14849
      
      Change-Id: I86e2dc27ca73bb6b24261a68cbf0094a63167414
      Reviewed-on: https://go-review.googlesource.com/20833Reviewed-by: default avatarKeith Randall <khr@golang.org>
      Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a7a19994
    • Ian Lance Taylor's avatar
      cmd/compile: fix varexpr handling of ODOT · a9407b57
      Ian Lance Taylor authored
      For a long time varexpr has handled ODOT incorrectly: it has always
      returned false.  Before https://golang.org/cl/20890 this has been
      because an ODOT had a Right field with an ONAME with no Class, for which
      varexpr returns false.  CL 20890 preserved the behavior of varexpr for
      ODOT, so that the change would pass toolstash -cmp.
      
      This CL fixes varexpr so that ODOT can return true in some cases.  This
      breaks toolstash -cmp.  While the changed compiler allocates temporary
      variables in a different order, I have not been able to find any
      examples where the generated code is different, other than using
      different stack offsets and, in some cases, registers.  It seems that
      other parts of the compiler will force the ODOT into a temporary anyhow.
      
      Still, this change is clearly correct, and is a minor compiler cleanup.
      
      Change-Id: I71506877aa3c13966bb03c281aa16271ee7fe80a
      Reviewed-on: https://go-review.googlesource.com/20907
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      a9407b57
    • Shahar Kohanim's avatar
      cmd/link: patch up symbols only once per object file · 93098de0
      Shahar Kohanim authored
      name       old s/op   new s/op   delta
      LinkCmdGo  0.57 ± 5%  0.55 ± 6%  -2.37%  (p=0.000 n=97+98)
      
      GOGC=off:
      
      name       old s/op   new s/op   delta
      LinkCmdGo  0.48 ± 3%  0.47 ± 3%  -2.90%  (p=0.000 n=100+100)
      
      Change-Id: I1a36dbf84914cacb79842bc0ddb1e26b4c5a5828
      Reviewed-on: https://go-review.googlesource.com/20917Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      93098de0
    • Ian Lance Taylor's avatar
      cmd/compile: don't penalize ODOT and friends when inlining · 060038bd
      Ian Lance Taylor authored
      Historically ODOT and friends have been considered to cost an extra
      budget point when deciding whether they should be inlined, because they
      had an ONAME node that represented the name to the right of the dot.
      This doesn't really make sense, as in general that symbol does not add
      any extra instructions; it just affects the offset of the load or store
      instruction.  And the ONAME node is gone now.  So, remove the extra
      cost.
      
      This does not pass toolstash -cmp, as it changes inlining decisions.
      For example, mspan.init in runtime/mheap.go is now considered to be an
      inlining candidate.
      
      Change-Id: I5ad27f08c66fd5daa4c8472dd0795df989183f5e
      Reviewed-on: https://go-review.googlesource.com/20891Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      060038bd
    • Shahar Kohanim's avatar
      cmd/link: use encbuf when writing integers · d6d33f67
      Shahar Kohanim authored
      name       old s/op   new s/op   delta
      LinkCmdGo  0.59 ± 6%  0.58 ± 5%  -1.61%  (p=0.000 n=99+99)
      
      GOGC=off:
      name       old s/op   new s/op   delta
      LinkCmdGo  0.50 ± 3%  0.49 ± 3%  -1.28%  (p=0.000 n=98+99)
      
      Change-Id: I737ae056214999441a210c69ec0cf4febc39a715
      Reviewed-on: https://go-review.googlesource.com/20914Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
      Run-TryBot: David Crawshaw <crawshaw@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      d6d33f67