1. 30 Aug, 2018 22 commits
  2. 29 Aug, 2018 6 commits
    • Alexey Alexandrov's avatar
      runtime/pprof: compute memory profile block size using sampled values · f9a4ae01
      Alexey Alexandrov authored
      Fixes #26638.
      
      Change-Id: I3c18d1298d99af8ea8c00916303efd2b5a5effc7
      Reviewed-on: https://go-review.googlesource.com/126336Reviewed-by: default avatarHyang-Ah Hana Kim <hyangah@gmail.com>
      Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      f9a4ae01
    • Alberto Donizetti's avatar
      bytes: note that NewBuffer's initial size can change · c64006ab
      Alberto Donizetti authored
      bytes.NewBuffer's documentation says it can be used to set the initial
      size of the buffer. The current wording is:
      
      > It can also be used to size the internal buffer for writing.
      
      This may led users to believe that the buffer (its backing array) is
      fixed in size and won't grow, which isn't true (subsequent Write calls
      will expand the backing array as needed).
      
      Change the doc to make it clearer that NewBuffer just sets the initial
      size of the buffer.
      
      Fixes #27242
      
      Change-Id: I2a8cb5bee02ca2c1657ef59e2cf1434c7a9bd397
      Reviewed-on: https://go-review.googlesource.com/132035Reviewed-by: default avatarDominik Honnef <dominik@honnef.co>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      c64006ab
    • Daniel Martí's avatar
      text/template: fix newline counting in raw strings · 6fa08c0f
      Daniel Martí authored
      lexRawQuote already uses the next method, which keeps track of newlines
      on a character by character basis. Adding up newlines in emit again
      results in the newlines being counted twice, which can mean bad position
      information in error messages.
      
      Fix that, and add a test.
      
      Fixes #27319.
      
      Change-Id: Id803be065c541412dc808d388bc6d8a86a0de41e
      Reviewed-on: https://go-review.googlesource.com/131996
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      6fa08c0f
    • Zheng Xu's avatar
      build: support frame-pointer for arm64 · 8f4fd3f3
      Zheng Xu authored
      Supporting frame-pointer makes Linux's perf and other profilers much more useful
      because it lets them gather a stack trace efficiently on profiling events. Major
      changes include:
      1. save FP on the word below where RSP is pointing to (proposed by Cherry and Austin)
      2. adjust some specific offsets in runtime assembly and wrapper code
      3. add support to FP in goroutine scheduler
      4. adjust link stack overflow check to take the extra word into account
      5. adjust nosplit test cases to enable frame sizes which are 16 bytes aligned
      
      Performance impacts on go1 benchmarks:
      
      Enable frame-pointer (by default)
      
      name                      old time/op    new time/op    delta
      BinaryTree17-46              5.94s ± 0%     6.00s ± 0%  +1.03%  (p=0.029 n=4+4)
      Fannkuch11-46                2.84s ± 1%     2.77s ± 0%  -2.58%  (p=0.008 n=5+5)
      FmtFprintfEmpty-46          55.0ns ± 1%    58.9ns ± 1%  +7.06%  (p=0.008 n=5+5)
      FmtFprintfString-46          102ns ± 0%     105ns ± 0%  +2.94%  (p=0.008 n=5+5)
      FmtFprintfInt-46             118ns ± 0%     117ns ± 1%  -1.19%  (p=0.000 n=4+5)
      FmtFprintfIntInt-46          181ns ± 0%     182ns ± 1%    ~     (p=0.444 n=5+5)
      FmtFprintfPrefixedInt-46     215ns ± 1%     214ns ± 0%    ~     (p=0.254 n=5+4)
      FmtFprintfFloat-46           292ns ± 0%     296ns ± 0%  +1.46%  (p=0.029 n=4+4)
      FmtManyArgs-46               720ns ± 0%     732ns ± 0%  +1.72%  (p=0.008 n=5+5)
      GobDecode-46                9.82ms ± 1%   10.03ms ± 2%  +2.10%  (p=0.008 n=5+5)
      GobEncode-46                8.14ms ± 0%    8.72ms ± 1%  +7.14%  (p=0.008 n=5+5)
      Gzip-46                      420ms ± 0%     424ms ± 0%  +0.92%  (p=0.008 n=5+5)
      Gunzip-46                   48.2ms ± 0%    48.4ms ± 0%  +0.41%  (p=0.008 n=5+5)
      HTTPClientServer-46          201µs ± 4%     201µs ± 0%    ~     (p=0.730 n=5+4)
      JSONEncode-46               17.1ms ± 0%    17.7ms ± 1%  +3.80%  (p=0.008 n=5+5)
      JSONDecode-46               88.0ms ± 0%    90.1ms ± 0%  +2.42%  (p=0.008 n=5+5)
      Mandelbrot200-46            5.06ms ± 0%    5.07ms ± 0%    ~     (p=0.310 n=5+5)
      GoParse-46                  5.04ms ± 0%    5.12ms ± 0%  +1.53%  (p=0.008 n=5+5)
      RegexpMatchEasy0_32-46       117ns ± 0%     117ns ± 0%    ~     (all equal)
      RegexpMatchEasy0_1K-46       332ns ± 0%     329ns ± 0%  -0.78%  (p=0.008 n=5+5)
      RegexpMatchEasy1_32-46       104ns ± 0%     113ns ± 0%  +8.65%  (p=0.029 n=4+4)
      RegexpMatchEasy1_1K-46       563ns ± 0%     569ns ± 0%  +1.10%  (p=0.008 n=5+5)
      RegexpMatchMedium_32-46      167ns ± 2%     177ns ± 1%  +5.74%  (p=0.008 n=5+5)
      RegexpMatchMedium_1K-46     49.5µs ± 0%    53.4µs ± 0%  +7.81%  (p=0.008 n=5+5)
      RegexpMatchHard_32-46       2.56µs ± 1%    2.72µs ± 0%  +6.01%  (p=0.008 n=5+5)
      RegexpMatchHard_1K-46       77.0µs ± 0%    81.8µs ± 0%  +6.24%  (p=0.016 n=5+4)
      Revcomp-46                   631ms ± 1%     627ms ± 1%    ~     (p=0.095 n=5+5)
      Template-46                 81.8ms ± 0%    86.3ms ± 0%  +5.55%  (p=0.008 n=5+5)
      TimeParse-46                 423ns ± 0%     432ns ± 0%  +2.32%  (p=0.008 n=5+5)
      TimeFormat-46                478ns ± 2%     497ns ± 1%  +3.89%  (p=0.008 n=5+5)
      [Geo mean]                  71.6µs         73.3µs       +2.45%
      
      name                      old speed      new speed      delta
      GobDecode-46              78.1MB/s ± 1%  76.6MB/s ± 2%  -2.04%  (p=0.008 n=5+5)
      GobEncode-46              94.3MB/s ± 0%  88.0MB/s ± 1%  -6.67%  (p=0.008 n=5+5)
      Gzip-46                   46.2MB/s ± 0%  45.8MB/s ± 0%  -0.91%  (p=0.008 n=5+5)
      Gunzip-46                  403MB/s ± 0%   401MB/s ± 0%  -0.41%  (p=0.008 n=5+5)
      JSONEncode-46              114MB/s ± 0%   109MB/s ± 1%  -3.66%  (p=0.008 n=5+5)
      JSONDecode-46             22.0MB/s ± 0%  21.5MB/s ± 0%  -2.35%  (p=0.008 n=5+5)
      GoParse-46                11.5MB/s ± 0%  11.3MB/s ± 0%  -1.51%  (p=0.008 n=5+5)
      RegexpMatchEasy0_32-46     272MB/s ± 0%   272MB/s ± 1%    ~     (p=0.190 n=4+5)
      RegexpMatchEasy0_1K-46    3.08GB/s ± 0%  3.11GB/s ± 0%  +0.77%  (p=0.008 n=5+5)
      RegexpMatchEasy1_32-46     306MB/s ± 0%   283MB/s ± 0%  -7.63%  (p=0.029 n=4+4)
      RegexpMatchEasy1_1K-46    1.82GB/s ± 0%  1.80GB/s ± 0%  -1.07%  (p=0.008 n=5+5)
      RegexpMatchMedium_32-46   5.99MB/s ± 0%  5.64MB/s ± 1%  -5.77%  (p=0.016 n=4+5)
      RegexpMatchMedium_1K-46   20.7MB/s ± 0%  19.2MB/s ± 0%  -7.25%  (p=0.008 n=5+5)
      RegexpMatchHard_32-46     12.5MB/s ± 1%  11.8MB/s ± 0%  -5.66%  (p=0.008 n=5+5)
      RegexpMatchHard_1K-46     13.3MB/s ± 0%  12.5MB/s ± 1%  -6.01%  (p=0.008 n=5+5)
      Revcomp-46                 402MB/s ± 1%   405MB/s ± 1%    ~     (p=0.095 n=5+5)
      Template-46               23.7MB/s ± 0%  22.5MB/s ± 0%  -5.25%  (p=0.008 n=5+5)
      [Geo mean]                82.2MB/s       79.6MB/s       -3.26%
      
      Disable frame-pointer (GOEXPERIMENT=noframepointer)
      
      name                      old time/op    new time/op    delta
      BinaryTree17-46              5.94s ± 0%     5.96s ± 0%  +0.39%  (p=0.029 n=4+4)
      Fannkuch11-46                2.84s ± 1%     2.79s ± 1%  -1.68%  (p=0.008 n=5+5)
      FmtFprintfEmpty-46          55.0ns ± 1%    55.2ns ± 3%    ~     (p=0.794 n=5+5)
      FmtFprintfString-46          102ns ± 0%     103ns ± 0%  +0.98%  (p=0.016 n=5+4)
      FmtFprintfInt-46             118ns ± 0%     115ns ± 0%  -2.54%  (p=0.029 n=4+4)
      FmtFprintfIntInt-46          181ns ± 0%     179ns ± 0%  -1.10%  (p=0.000 n=5+4)
      FmtFprintfPrefixedInt-46     215ns ± 1%     213ns ± 0%    ~     (p=0.143 n=5+4)
      FmtFprintfFloat-46           292ns ± 0%     300ns ± 0%  +2.83%  (p=0.029 n=4+4)
      FmtManyArgs-46               720ns ± 0%     739ns ± 0%  +2.64%  (p=0.008 n=5+5)
      GobDecode-46                9.82ms ± 1%    9.78ms ± 1%    ~     (p=0.151 n=5+5)
      GobEncode-46                8.14ms ± 0%    8.12ms ± 1%    ~     (p=0.690 n=5+5)
      Gzip-46                      420ms ± 0%     420ms ± 0%    ~     (p=0.548 n=5+5)
      Gunzip-46                   48.2ms ± 0%    48.0ms ± 0%  -0.33%  (p=0.032 n=5+5)
      HTTPClientServer-46          201µs ± 4%     199µs ± 3%    ~     (p=0.548 n=5+5)
      JSONEncode-46               17.1ms ± 0%    17.2ms ± 0%    ~     (p=0.056 n=5+5)
      JSONDecode-46               88.0ms ± 0%    88.6ms ± 0%  +0.64%  (p=0.008 n=5+5)
      Mandelbrot200-46            5.06ms ± 0%    5.07ms ± 0%    ~     (p=0.548 n=5+5)
      GoParse-46                  5.04ms ± 0%    5.07ms ± 0%  +0.65%  (p=0.008 n=5+5)
      RegexpMatchEasy0_32-46       117ns ± 0%     112ns ± 4%  -4.27%  (p=0.016 n=4+5)
      RegexpMatchEasy0_1K-46       332ns ± 0%     330ns ± 1%    ~     (p=0.095 n=5+5)
      RegexpMatchEasy1_32-46       104ns ± 0%     110ns ± 1%  +5.29%  (p=0.029 n=4+4)
      RegexpMatchEasy1_1K-46       563ns ± 0%     567ns ± 2%    ~     (p=0.151 n=5+5)
      RegexpMatchMedium_32-46      167ns ± 2%     166ns ± 0%    ~     (p=0.333 n=5+4)
      RegexpMatchMedium_1K-46     49.5µs ± 0%    49.6µs ± 0%    ~     (p=0.841 n=5+5)
      RegexpMatchHard_32-46       2.56µs ± 1%    2.49µs ± 0%  -2.81%  (p=0.008 n=5+5)
      RegexpMatchHard_1K-46       77.0µs ± 0%    75.8µs ± 0%  -1.55%  (p=0.008 n=5+5)
      Revcomp-46                   631ms ± 1%     628ms ± 0%    ~     (p=0.095 n=5+5)
      Template-46                 81.8ms ± 0%    84.3ms ± 1%  +3.05%  (p=0.008 n=5+5)
      TimeParse-46                 423ns ± 0%     425ns ± 0%  +0.52%  (p=0.008 n=5+5)
      TimeFormat-46                478ns ± 2%     478ns ± 1%    ~     (p=1.000 n=5+5)
      [Geo mean]                  71.6µs         71.6µs       -0.01%
      
      name                      old speed      new speed      delta
      GobDecode-46              78.1MB/s ± 1%  78.5MB/s ± 1%    ~     (p=0.151 n=5+5)
      GobEncode-46              94.3MB/s ± 0%  94.5MB/s ± 1%    ~     (p=0.690 n=5+5)
      Gzip-46                   46.2MB/s ± 0%  46.2MB/s ± 0%    ~     (p=0.571 n=5+5)
      Gunzip-46                  403MB/s ± 0%   404MB/s ± 0%  +0.33%  (p=0.032 n=5+5)
      JSONEncode-46              114MB/s ± 0%   113MB/s ± 0%    ~     (p=0.056 n=5+5)
      JSONDecode-46             22.0MB/s ± 0%  21.9MB/s ± 0%  -0.64%  (p=0.008 n=5+5)
      GoParse-46                11.5MB/s ± 0%  11.4MB/s ± 0%  -0.64%  (p=0.008 n=5+5)
      RegexpMatchEasy0_32-46     272MB/s ± 0%   285MB/s ± 4%  +4.74%  (p=0.016 n=4+5)
      RegexpMatchEasy0_1K-46    3.08GB/s ± 0%  3.10GB/s ± 1%    ~     (p=0.151 n=5+5)
      RegexpMatchEasy1_32-46     306MB/s ± 0%   290MB/s ± 1%  -5.21%  (p=0.029 n=4+4)
      RegexpMatchEasy1_1K-46    1.82GB/s ± 0%  1.81GB/s ± 2%    ~     (p=0.151 n=5+5)
      RegexpMatchMedium_32-46   5.99MB/s ± 0%  6.02MB/s ± 1%    ~     (p=0.063 n=4+5)
      RegexpMatchMedium_1K-46   20.7MB/s ± 0%  20.7MB/s ± 0%    ~     (p=0.659 n=5+5)
      RegexpMatchHard_32-46     12.5MB/s ± 1%  12.8MB/s ± 0%  +2.88%  (p=0.008 n=5+5)
      RegexpMatchHard_1K-46     13.3MB/s ± 0%  13.5MB/s ± 0%  +1.58%  (p=0.008 n=5+5)
      Revcomp-46                 402MB/s ± 1%   405MB/s ± 0%    ~     (p=0.095 n=5+5)
      Template-46               23.7MB/s ± 0%  23.0MB/s ± 1%  -2.95%  (p=0.008 n=5+5)
      [Geo mean]                82.2MB/s       82.3MB/s       +0.04%
      
      Frame-pointer is enabled on Linux by default but can be disabled by setting: GOEXPERIMENT=noframepointer.
      
      Fixes #10110
      
      Change-Id: I1bfaca6dba29a63009d7c6ab04ed7a1413d9479e
      Reviewed-on: https://go-review.googlesource.com/61511Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      8f4fd3f3
    • Than McIntosh's avatar
      cmd/compile: remove var sorting from DWARF inline generation · 7b88b22a
      Than McIntosh authored
      When generation DWARF inline info records, the current implementation
      includes a sorting pass that reorders a subprogram's child variable
      DIEs based on class (param/auto) and name. This sorting is no longer
      needed, and can cause problems for a debugger (if we want to use the
      DWARF info for creating a call to an optimized function); this patch
      removes it.
      
      Ordering of DWARF subprogram variable/parameter DIEs is still
      deterministic with this change, since it is keyed off the order in
      which vars appear in the pre-inlining function "Dcl" list.
      
      Updates #27039
      
      Change-Id: I3b91290d11bb3b9b36fb61271d80b801841401ee
      Reviewed-on: https://go-review.googlesource.com/131895Reviewed-by: default avatarHeschi Kreinick <heschi@google.com>
      7b88b22a
    • Ben Shi's avatar
      syscall: skip an unsupported test case on android · 225981f8
      Ben Shi authored
      Lookup is not supported on android, and the test
      syscall/exec_linux_test.go which relies on it will fail on
      android/arm64.
      
      Fixes #27327
      
      Change-Id: I6fdb8992d4634ac7e3689360ff114e9431b5e90c
      Reviewed-on: https://go-review.googlesource.com/131995Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      225981f8
  3. 28 Aug, 2018 12 commits
    • Alessandro Arzilli's avatar
      cmd/link: move type name mangling after deadcode elimination · 618bfb28
      Alessandro Arzilli authored
      Moves type name mangling after deadcode elimination. The motivation for
      doing this is to create a space between deadcode elimination and type name
      mangling where DWARF generation for types and variables can exist, to fix
      issue #23733.
      
      Change-Id: I9db8ecc0f4efe3df6c1e4025f02642fd452f9a39
      Reviewed-on: https://go-review.googlesource.com/111236Reviewed-by: default avatarHeschi Kreinick <heschi@google.com>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      Run-TryBot: Heschi Kreinick <heschi@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      618bfb28
    • Dave Brophy's avatar
      fmt: fix incorrect format of whole-number floats when using %#v · 7c7cecc1
      Dave Brophy authored
      This fixes the unwanted behaviour where printing a zero float with the
      #v fmt verb outputs "0" - e.g. missing the trailing decimal. This means
      that the output would be interpreted as an int rather than a float when
      parsed as Go source. After this change the the output is "0.0".
      
      Fixes #26363
      
      Change-Id: Ic5c060522459cd5ce077675d47c848b22ddc34fa
      GitHub-Last-Rev: adfb061363f0566acec134c81be9a3dcb1f4cac8
      GitHub-Pull-Request: golang/go#26383
      Reviewed-on: https://go-review.googlesource.com/123956Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
      Reviewed-by: default avatarRob Pike <r@golang.org>
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      7c7cecc1
    • Cherry Zhang's avatar
      cmd/compile: add a test for reproducible build with anonymous interfaces · cb7f9ec4
      Cherry Zhang authored
      Duplicated anonymous interfaces caused nondeterministic build.
      The fix is CL 129515. This CL adds a test.
      
      Updates #27013.
      
      Change-Id: I6b7e1bbfc943c22e8e6f32c145f7aebb567cef15
      Reviewed-on: https://go-review.googlesource.com/129680
      Run-TryBot: Cherry Zhang <cherryyz@google.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      cb7f9ec4
    • Than McIntosh's avatar
      cmd/link: improve comments for relocsym · c7271c0c
      Than McIntosh authored
      This patch contains the remnants of CL (122482), which was intended to
      reduce memory allocation in 'relocsym'. Another CL (113637) went in
      first that included pretty much all of the code changes in 122482,
      however there are some changes to comments that are worth preserving.
      
      Change-Id: Iacdbd2bfe3b7ca2656596570f06ce9a646211913
      Reviewed-on: https://go-review.googlesource.com/122482Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      c7271c0c
    • Taesu Pyo's avatar
      encoding/json: fix UnmarshalTypeError without field and struct values · 21e85c29
      Taesu Pyo authored
      Fixes #26444
      Fixes #27275
      
      Change-Id: I9e8cbff79f7643ca8964c572c1a98172b6831730
      GitHub-Last-Rev: 7eea2158b67ccab34b45a21e8f4289c36de02d93
      GitHub-Pull-Request: golang/go#26719
      Reviewed-on: https://go-review.googlesource.com/126897Reviewed-by: default avatarDaniel Martí <mvdan@mvdan.cc>
      Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      21e85c29
    • Than McIntosh's avatar
      cmd/link: fix a few typos in comments · 422151ad
      Than McIntosh authored
      Comment changes to fix typos, no code changes.
      
      Change-Id: I6c915f183025587fc479d14f5d2c885767348b1b
      Reviewed-on: https://go-review.googlesource.com/131615Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      422151ad
    • Fazlul Shahriar's avatar
      os/exec: pass ExitCode tests on Plan 9 · 2e234754
      Fazlul Shahriar authored
      Fixes #27294
      
      Change-Id: I8db5ca0f0c690bf532d3d33b8ed7d2633ad1702b
      Reviewed-on: https://go-review.googlesource.com/131855Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      2e234754
    • Tobias Klauser's avatar
      internal/syscall/unix: remove unnecessary empty.s · 975f1afd
      Tobias Klauser authored
      After CL 130736 there are no empty function declarations this package
      anymore, so empty.s is no longer needed.
      
      Change-Id: Ic4306f10ad8a31777a3337870ce19e14c1510f3b
      Reviewed-on: https://go-review.googlesource.com/131835
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      975f1afd
    • Yasuhiro Matsumoto's avatar
      syscall: implement Unix Socket for Windows · 76c45877
      Yasuhiro Matsumoto authored
      Add implementation of AF_UNIX. This works only on Windows 10.
      
      https://blogs.msdn.microsoft.com/commandline/2017/12/19/af_unix-comes-to-windows/
      
      Fixes #26072
      
      Change-Id: I76a96a472385a17901885271622fbe55d66bb720
      Reviewed-on: https://go-review.googlesource.com/125456
      Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarAlex Brainman <alex.brainman@gmail.com>
      76c45877
    • Eric Ponce's avatar
      math: add Round and RoundToEven examples · ded94115
      Eric Ponce authored
      Change-Id: Ibef5f96ea588d17eac1c96ee3992e01943ba0fef
      Reviewed-on: https://go-review.googlesource.com/131496
      Run-TryBot: Ian Lance Taylor <iant@golang.org>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
      ded94115
    • Ian Lance Taylor's avatar
      cmd/go: add GOMIPS value to build id for mipsle · 61318d7f
      Ian Lance Taylor authored
      Strip a trailing "le" from the GOARCH value when calculating the GOxxx
      environment variable that affects it.
      
      Fixes #27260
      
      Change-Id: I081f30d5dc19281901551823f4f56be028b5f71a
      Reviewed-on: https://go-review.googlesource.com/131379Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      61318d7f
    • Ben Shi's avatar
      cmd/compile: optimize arm64 with indexed FP load/store · 3ca3e89b
      Ben Shi authored
      The FP load/store on arm64 have register indexed forms. And this
      CL implements this optimization.
      
      1. The total size of pkg/android_arm64 (excluding cmd/compile)
      decreases about 400 bytes.
      
      2. There is no regression in the go1 benchmark, the test case
      GobEncode even gets slight improvement, excluding noise.
      
      name                     old time/op    new time/op    delta
      BinaryTree17-4              19.0s ± 0%     19.0s ± 1%    ~     (p=0.817 n=29+29)
      Fannkuch11-4                9.94s ± 0%     9.95s ± 0%  +0.03%  (p=0.010 n=24+30)
      FmtFprintfEmpty-4           233ns ± 0%     233ns ± 0%    ~     (all equal)
      FmtFprintfString-4          427ns ± 0%     427ns ± 0%    ~     (p=0.649 n=30+30)
      FmtFprintfInt-4             471ns ± 0%     471ns ± 0%    ~     (all equal)
      FmtFprintfIntInt-4          730ns ± 0%     730ns ± 0%    ~     (all equal)
      FmtFprintfPrefixedInt-4     889ns ± 0%     889ns ± 0%    ~     (all equal)
      FmtFprintfFloat-4          1.21µs ± 0%    1.21µs ± 0%  +0.04%  (p=0.012 n=20+30)
      FmtManyArgs-4              2.99µs ± 0%    2.99µs ± 0%    ~     (p=0.651 n=29+29)
      GobDecode-4                42.4ms ± 1%    42.3ms ± 1%  -0.27%  (p=0.001 n=29+28)
      GobEncode-4                37.8ms ±11%    36.0ms ± 0%  -4.67%  (p=0.000 n=30+26)
      Gzip-4                      1.98s ± 1%     1.96s ± 1%  -1.26%  (p=0.000 n=30+30)
      Gunzip-4                    175ms ± 0%     175ms ± 0%    ~     (p=0.988 n=29+29)
      HTTPClientServer-4          854µs ± 5%     860µs ± 5%    ~     (p=0.236 n=28+29)
      JSONEncode-4               88.8ms ± 0%    87.9ms ± 0%  -1.00%  (p=0.000 n=24+26)
      JSONDecode-4                390ms ± 1%     392ms ± 2%  +0.48%  (p=0.025 n=30+30)
      Mandelbrot200-4            19.5ms ± 0%    19.5ms ± 0%    ~     (p=0.894 n=24+29)
      GoParse-4                  20.3ms ± 0%    20.1ms ± 1%  -0.94%  (p=0.000 n=27+26)
      RegexpMatchEasy0_32-4       451ns ± 0%     451ns ± 0%    ~     (p=0.578 n=30+30)
      RegexpMatchEasy0_1K-4      1.63µs ± 0%    1.63µs ± 0%    ~     (p=0.298 n=30+28)
      RegexpMatchEasy1_32-4       431ns ± 0%     434ns ± 0%  +0.67%  (p=0.000 n=30+29)
      RegexpMatchEasy1_1K-4      2.60µs ± 0%    2.64µs ± 0%  +1.36%  (p=0.000 n=28+26)
      RegexpMatchMedium_32-4      744ns ± 0%     744ns ± 0%    ~     (p=0.474 n=29+29)
      RegexpMatchMedium_1K-4      223µs ± 0%     223µs ± 0%  -0.08%  (p=0.038 n=26+30)
      RegexpMatchHard_32-4       12.2µs ± 0%    12.3µs ± 0%  +0.27%  (p=0.000 n=29+30)
      RegexpMatchHard_1K-4        373µs ± 0%     373µs ± 0%    ~     (p=0.219 n=29+28)
      Revcomp-4                   2.84s ± 0%     2.84s ± 0%    ~     (p=0.130 n=28+28)
      Template-4                  394ms ± 1%     392ms ± 1%  -0.52%  (p=0.001 n=30+30)
      TimeParse-4                1.93µs ± 0%    1.93µs ± 0%    ~     (p=0.587 n=29+30)
      TimeFormat-4               2.00µs ± 0%    2.00µs ± 0%  +0.07%  (p=0.001 n=28+27)
      [Geo mean]                  306µs          305µs       -0.17%
      
      name                     old speed      new speed      delta
      GobDecode-4              18.1MB/s ± 1%  18.2MB/s ± 1%  +0.27%  (p=0.001 n=29+28)
      GobEncode-4              20.3MB/s ±10%  21.3MB/s ± 0%  +4.64%  (p=0.000 n=30+26)
      Gzip-4                   9.79MB/s ± 1%  9.91MB/s ± 1%  +1.28%  (p=0.000 n=30+30)
      Gunzip-4                  111MB/s ± 0%   111MB/s ± 0%    ~     (p=0.988 n=29+29)
      JSONEncode-4             21.8MB/s ± 0%  22.1MB/s ± 0%  +1.02%  (p=0.000 n=24+26)
      JSONDecode-4             4.97MB/s ± 1%  4.95MB/s ± 2%  -0.45%  (p=0.031 n=30+30)
      GoParse-4                2.85MB/s ± 1%  2.88MB/s ± 1%  +1.03%  (p=0.000 n=30+26)
      RegexpMatchEasy0_32-4    70.9MB/s ± 0%  70.9MB/s ± 0%    ~     (p=0.904 n=29+28)
      RegexpMatchEasy0_1K-4     627MB/s ± 0%   627MB/s ± 0%    ~     (p=0.156 n=30+30)
      RegexpMatchEasy1_32-4    74.2MB/s ± 0%  73.7MB/s ± 0%  -0.67%  (p=0.000 n=30+29)
      RegexpMatchEasy1_1K-4     393MB/s ± 0%   388MB/s ± 0%  -1.34%  (p=0.000 n=28+26)
      RegexpMatchMedium_32-4   1.34MB/s ± 0%  1.34MB/s ± 0%    ~     (all equal)
      RegexpMatchMedium_1K-4   4.59MB/s ± 0%  4.59MB/s ± 0%  +0.07%  (p=0.035 n=25+30)
      RegexpMatchHard_32-4     2.61MB/s ± 0%  2.61MB/s ± 0%  -0.11%  (p=0.002 n=28+30)
      RegexpMatchHard_1K-4     2.75MB/s ± 0%  2.75MB/s ± 0%  +0.15%  (p=0.001 n=30+24)
      Revcomp-4                89.4MB/s ± 0%  89.4MB/s ± 0%    ~     (p=0.140 n=28+28)
      Template-4               4.93MB/s ± 1%  4.95MB/s ± 1%  +0.51%  (p=0.001 n=30+30)
      [Geo mean]               18.4MB/s       18.4MB/s       +0.37%
      
      Change-Id: I9a6b521a971b21cfb51064e8e9b853cef8a1d071
      Reviewed-on: https://go-review.googlesource.com/124636
      Run-TryBot: Ben Shi <powerman1st@163.com>
      TryBot-Result: Gobot Gobot <gobot@golang.org>
      Reviewed-by: default avatarCherry Zhang <cherryyz@google.com>
      3ca3e89b