and though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here

  1. 15 Mar, 2019 1 commit
    • Hans Wennborg's avatar
      Re-generate DiagnosticsReference.rst (PR41080) · d2298e74
      Hans Wennborg authored
        $ bin/clang-tblgen -gen-diag-docs -I../cfe.src/include
        -I../cfe.src/include/clang/Basic/
        ../cfe.src/include/clang/Basic/Diagnostic.td -o
        ../cfe.src/docs/DiagnosticsReference.rst
      
      llvm-svn: 356240
      d2298e74
  2. 13 Mar, 2019 2 commits
  3. 12 Mar, 2019 2 commits
    • Hans Wennborg's avatar
      ReleaseNotes: SystemZ, by Ulrich Weigand. · a73e76ab
      Hans Wennborg authored
      llvm-svn: 355916
      a73e76ab
    • Hans Wennborg's avatar
      Merging r355743: · 25292d1c
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r355743 | ericwf | 2019-03-08 23:06:48 +0100 (Fri, 08 Mar 2019) | 26 lines
      
      [8.0 Regression] Fix handling of `__builtin_constant_p` inside template arguments, enumerators, case statements, and the enable_if attribute.
      
      Summary:
      The following code is accepted by Clang 7 and prior but rejected by the upcoming 8 release and in trunk [1]
      
      ```
      // error {{never produces a constant expression}}
      void foo(const char* s) __attribute__((enable_if(__builtin_constant_p(*s) == false, "trap"))) {}
      void test() { foo("abc"); }
      ```
      
      Prior to Clang 8, the call to `__builtin_constant_p` was a constant expression returning false. Currently, it's not a valid constant expression.
      
      The bug is caused because we failed to set `InConstantContext` when attempting to evaluate unevaluated constant expressions.
      
      [1]  https://godbolt.org/z/ksAjmq
      
      Reviewers: rsmith, hans, sbenza
      
      Reviewed By: rsmith
      
      Subscribers: kristina, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D59038
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 355898
      25292d1c
  4. 08 Mar, 2019 4 commits
    • Hans Wennborg's avatar
      Merging r355489: · 60c05513
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r355489 | hans | 2019-03-06 10:38:04 +0100 (Wed, 06 Mar 2019) | 1 line
      
      clang-cl: Parse /Qspectre and a few other missing options (PR40964)
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 355677
      60c05513
    • Hans Wennborg's avatar
      Merging r352119: · 2a1c7bde
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r352119 | rnk | 2019-01-24 23:26:51 +0100 (Thu, 24 Jan 2019) | 7 lines
      
      [clang-cl] Ignore space-separated /AI arguments
      
      The /AI flag is for #using directives, which I don't think we support.
      This is consistent with how the /I flag is handled by MSVC.  Add a test
      for it.
      
      Differential Revision: https://reviews.llvm.org/D57189
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 355675
      2a1c7bde
    • Hans Wennborg's avatar
      Merging r355491: · 2cc470aa
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r355491 | hans | 2019-03-06 11:26:19 +0100 (Wed, 06 Mar 2019) | 9 lines
      
      Inline asm constraints: allow ICE-like pointers for the "n" constraint (PR40890)
      
      Apparently GCC allows this, and there's code relying on it (see bug).
      
      The idea is to allow expression that would have been allowed if they
      were cast to int. So I based the code on how such a cast would be done
      (the CK_PointerToIntegral case in IntExprEvaluator::VisitCastExpr()).
      
      Differential Revision: https://reviews.llvm.org/D58821
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 355674
      2cc470aa
    • Hans Wennborg's avatar
      Merging r354937: · 76819754
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354937 | joerg | 2019-02-27 01:40:59 +0100 (Wed, 27 Feb 2019) | 9 lines
      
      Fix inline assembler constraint validation
      
      The current constraint logic is both too lax and too strict. It fails
      for input outside the [INT_MIN..INT_MAX] range, but it also implicitly
      accepts 0 as value when it should not. Adjust logic to handle both
      correctly.
      
      Differential Revision: https://reviews.llvm.org/D58649
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 355673
      76819754
  5. 07 Mar, 2019 1 commit
  6. 05 Mar, 2019 1 commit
    • Hans Wennborg's avatar
      Merging r355227 and r355228: · d39b590a
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r355227 | ctopper | 2019-03-01 22:02:34 +0100 (Fri, 01 Mar 2019) | 3 lines
      
      [X86] Add test case for D58805. NFC
      
      This demonstrates dead store elimination removing a store that may alias a gather that uses null as its base.
      ```
      
      ---------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r355228 | ctopper | 2019-03-01 22:02:40 +0100 (Fri, 01 Mar 2019) | 7 lines
      
      [X86] Remove IntrArgMemOnly from target specific gather/scatter intrinsics
      
      IntrArgMemOnly implies that only memory pointed to by pointer typed arguments will be accessed. But these intrinsics allow you to pass null to the pointer argument and put the full address into the index argument. Other passes won't be able to understand this.
      
      A colleague found that ISPC was creating gathers like this and then dead store elimination removed some stores because it didn't understand what the gather was doing since the pointer argument was null.
      
      Differential Revision: https://reviews.llvm.org/D58805
      ------------------------------------------------------------------------
      
      llvm-svn: 355383
      d39b590a
  7. 04 Mar, 2019 3 commits
    • Hans Wennborg's avatar
      Merging r355136: · d1786389
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r355136 | efriedma | 2019-02-28 21:38:45 +0100 (Thu, 28 Feb 2019) | 12 lines
      
      [AArch64] [Windows] Don't skip constructing UnwindHelp.
      
      In certain cases, the first non-frame-setup instruction in a function is
      a branch.  For example, it could be a cbz on an argument.  Make sure we
      correctly allocate the UnwindHelp, and find an appropriate register to
      use to initialize it.
      
      Fixes https://bugs.llvm.org/show_bug.cgi?id=40184
      
      Differential Revision: https://reviews.llvm.org/D58752
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 355313
      d1786389
    • Hans Wennborg's avatar
      Merging r352465: · 502c6557
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r352465 | mstorsjo | 2019-01-29 10:36:48 +0100 (Tue, 29 Jan 2019) | 17 lines
      
      [COFF, ARM64] Don't put jump table into a separate COFF section for EK_LabelDifference32
      
      Windows ARM64 has PIC relocation model and uses jump table kind
      EK_LabelDifference32. This produces jump table entry as
      ".word LBB123 - LJTI1_2" which represents the distance between the block
      and jump table.
      
      A new relocation type (IMAGE_REL_ARM64_REL32) is needed to do the fixup
      correctly if they are in different COFF section.
      
      This change saves the jump table to the same COFF section as the
      associated code. An ideal fix could be utilizing IMAGE_REL_ARM64_REL32
      relocation type.
      
      Patch by Tom Tan!
      
      Differential Revision: https://reviews.llvm.org/D57277
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 355311
      502c6557
    • Hans Wennborg's avatar
      Merging r355116 and r355117: · e65cd4e7
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r355116 | ctopper | 2019-02-28 19:49:29 +0100 (Thu, 28 Feb 2019) | 7 lines
      
      [X86] Don't peek through bitcasts before checking ISD::isBuildVectorOfConstantSDNodes in combineTruncatedArithmetic
      
      We don't have any combines that can look through a bitcast to truncate a build vector of constants. So the truncate will stick around and give us something like this pattern (binop (trunc X), (trunc (bitcast (build_vector)))) which has two truncates in it. Which will be reversed by hoistLogicOpWithSameOpcodeHands in the generic DAG combiner. Thus causing an infinite loop.
      
      Even if we had a combine for (truncate (bitcast (build_vector))), I think it would need to be implemented in getNode otherwise DAG combiner visit ordering would probably still visit the binop first and reverse it. Or combineTruncatedArithmetic would need to do its own constant folding.
      
      Differential Revision: https://reviews.llvm.org/D58705
      ```
      
      ---------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r355117 | ctopper | 2019-02-28 19:50:16 +0100 (Thu, 28 Feb 2019) | 1 line
      
      [X86] Add test case that was supposed to go with r355116.
      ------------------------------------------------------------------------
      
      llvm-svn: 355310
      e65cd4e7
  8. 27 Feb, 2019 16 commits
    • Hans Wennborg's avatar
      Added release notes for clangd 8 · 95e1c294
      Hans Wennborg authored
      By Dmitri Gribenko!
      
      Differential revision: https://reviews.llvm.org/D58721
      
      llvm-svn: 355004
      95e1c294
    • Hans Wennborg's avatar
      Merging r354777, r354778, r354779, r354786, r354865, and r354992 · f7be79e5
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354777 | gribozavr | 2019-02-25 13:48:52 +0100 (Mon, 25 Feb 2019) | 9 lines
      
      Removed an unhelpful comment in index.rst
      
      Reviewers: ilya-biryukov
      
      Subscribers: arphaman, jdoerfert, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58602
      ```
      
      ---------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r354778 | gribozavr | 2019-02-25 13:49:27 +0100 (Mon, 25 Feb 2019) | 7 lines
      
      Fixed grammar in index.rst
      
      Subscribers: arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58601
      ------------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r354779 | gribozavr | 2019-02-25 14:03:44 +0100 (Mon, 25 Feb 2019) | 9 lines
      
      Updated the documentation build instructions for the current CMake build system
      
      Reviewers: ilya-biryukov
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58603
      ------------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r354786 | gribozavr | 2019-02-25 14:43:48 +0100 (Mon, 25 Feb 2019) | 9 lines
      
      Moved clangd docs to a separate directory in preparation to restructure them into multiple files
      
      Reviewers: ilya-biryukov
      
      Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58607
      ------------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r354865 | kadircet | 2019-02-26 12:08:04 +0100 (Tue, 26 Feb 2019) | 11 lines
      
      [clangd] Update docs to mention YCM integration and new LSP features
      
      Reviewers: gribozavr
      
      Reviewed By: gribozavr
      
      Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D56718
      ------------------------------------------------------------------------
      
      ------------------------------------------------------------------------
      r354992 | gribozavr | 2019-02-27 16:53:05 +0100 (Wed, 27 Feb 2019) | 13 lines
      
      Added more detailed documentation for clangd
      
      Summary:
      The text was written mostly by Sam McCall, screenshots are mostly made
      by me.
      
      Reviewers: ilya-biryukov
      
      Subscribers: ioeric, MaskRay, jkorous, arphaman, kadircet, jdoerfert, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58710
      ------------------------------------------------------------------------
      
      llvm-svn: 354997
      f7be79e5
    • Hans Wennborg's avatar
      ReleaseNotes: tidy up · 8c0e32b8
      Hans Wennborg authored
      llvm-svn: 354986
      8c0e32b8
    • Hans Wennborg's avatar
      ReleaseNotes: remove another empty section · 06a9d7d2
      Hans Wennborg authored
      llvm-svn: 354985
      06a9d7d2
    • Hans Wennborg's avatar
      Merging r354957: · e811d118
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354957 | ibiryukov | 2019-02-27 11:16:03 +0100 (Wed, 27 Feb 2019) | 11 lines
      
      [clangd] Set thread priority on Windows
      
      Reviewers: kadircet, gribozavr
      
      Reviewed By: kadircet, gribozavr
      
      Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58683
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354984
      e811d118
    • Hans Wennborg's avatar
      Merging r354765: · c6a1d491
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354765 | kadircet | 2019-02-25 10:19:26 +0100 (Mon, 25 Feb 2019) | 9 lines
      
      [clangd] Add thread priority lowering for MacOS as well
      
      Reviewers: ilya-biryukov
      
      Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58492
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354983
      c6a1d491
    • Hans Wennborg's avatar
      Merging r354505: · 3043a72f
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354505 | ibiryukov | 2019-02-20 20:08:06 +0100 (Wed, 20 Feb 2019) | 13 lines
      
      [clangd] Store index in '.clangd/index' instead of '.clangd-index'
      
      Summary: To take up the .clangd folder for other potential uses in the future.
      
      Reviewers: kadircet, sammccall
      
      Reviewed By: kadircet
      
      Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58440
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354982
      3043a72f
    • Hans Wennborg's avatar
      Merging r354505: · c57a1fcc
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354505 | ibiryukov | 2019-02-20 20:08:06 +0100 (Wed, 20 Feb 2019) | 13 lines
      
      [clangd] Store index in '.clangd/index' instead of '.clangd-index'
      
      Summary: To take up the .clangd folder for other potential uses in the future.
      
      Reviewers: kadircet, sammccall
      
      Reviewed By: kadircet
      
      Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D58440
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354981
      c57a1fcc
    • Hans Wennborg's avatar
      Merging r353422: · a4fc3887
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r353422 | kadircet | 2019-02-07 17:04:30 +0100 (Thu, 07 Feb 2019) | 18 lines
      
      [clangd] Reduce number of threads used by BackgroundIndex to number of physical cores.
      
      Summary:
      clangd is using as many threads as logical cores for BackgroundIndex
      by default. We observed that it increases latency of foreground tasks.
      
      This patch aims to change that default to number of physical cores to get rid of
      that extra latency.
      
      Reviewers: ilya-biryukov
      
      Reviewed By: ilya-biryukov
      
      Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D57819
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354980
      a4fc3887
    • Hans Wennborg's avatar
      ReleaseNotes: tidy up (clangd notes are still expected) · b02e2366
      Hans Wennborg authored
      llvm-svn: 354979
      b02e2366
    • Hans Wennborg's avatar
      ReleaseNotes: tidy up · 56660831
      Hans Wennborg authored
      llvm-svn: 354977
      56660831
    • Hans Wennborg's avatar
      ReleaseNotes: add Known Issues, clean up, etc. · ec4aab61
      Hans Wennborg authored
      llvm-svn: 354973
      ec4aab61
    • Hans Wennborg's avatar
      Re-generate AttributeReference.rst again · 8e077e9f
      Hans Wennborg authored
      llvm-svn: 354971
      8e077e9f
    • Hans Wennborg's avatar
      Merging r354968: · 6b486a44
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354968 | hans | 2019-02-27 14:11:37 +0100 (Wed, 27 Feb 2019) | 1 line
      
      AttrDocs.td: fix broken bullet-point indentation
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354970
      6b486a44
    • Hans Wennborg's avatar
      Re-generate attribute docs · 1733050f
      Hans Wennborg authored
      llvm-svn: 354967
      1733050f
    • Hans Wennborg's avatar
      Merging r354207: · 992552ed
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354207 | whitequark | 2019-02-16 23:33:10 +0100 (Sat, 16 Feb 2019) | 16 lines
      
      [bindings/go] Fix building on 32-bit systems (ARM etc.)
      
      Summary:
      The patch in https://reviews.llvm.org/D53883 (by me) fails to build on 32-bit systems like ARM. Fix the array size to be less ridiculously large. 2<<20 should still be enough for all practical purposes.
      
      Bug: https://bugs.llvm.org/show_bug.cgi?id=40426
      
      Reviewers: whitequark, pcc
      
      Reviewed By: whitequark
      
      Subscribers: javed.absar, kristof.beyls, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D58030
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354956
      992552ed
  9. 26 Feb, 2019 7 commits
    • Hans Wennborg's avatar
      Add note on libFuzzer for Windows to release notes · 8eb2ef13
      Hans Wennborg authored
      By Jonathan Metzman!
      
      Differential revision: https://reviews.llvm.org/D58676
      
      llvm-svn: 354892
      8eb2ef13
    • Hans Wennborg's avatar
      Merging r354733: · e56517b2
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354733 | nikic | 2019-02-23 19:59:01 +0100 (Sat, 23 Feb 2019) | 10 lines
      
      [WebAssembly] Fix select of and (PR40805)
      
      Fixes https://bugs.llvm.org/show_bug.cgi?id=40805 introduced by
      patterns added in D53676.
      
      I'm removing the patterns entirely here, as they are not correct
      in the general case. If necessary something more specific can be
      added in the future.
      
      Differential Revision: https://reviews.llvm.org/D58575
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354860
      e56517b2
    • Hans Wennborg's avatar
      Merging r354723: · 35782c56
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354723 | brad | 2019-02-23 08:21:19 +0100 (Sat, 23 Feb 2019) | 3 lines
      
      Remove OpenBSD case for old system libstdc++ header path as OpenBSD
      has switched to libc++.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354859
      35782c56
    • Hans Wennborg's avatar
      Merging r354721: · 319e7dfd
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354721 | brad | 2019-02-23 07:19:28 +0100 (Sat, 23 Feb 2019) | 4 lines
      
      Remove sanitizer context workaround no longer necessary
      
      The base linker is now lld.
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354858
      319e7dfd
    • Hans Wennborg's avatar
      Merging r354756: · e745d6dd
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354756 | ctopper | 2019-02-24 20:33:37 +0100 (Sun, 24 Feb 2019) | 36 lines
      
      [X86] Fix tls variable lowering issue with large code model
      
      Summary:
      The problem here is the lowering for tls variable. Below is the DAG for the code.
      SelectionDAG has 11 nodes:
      
      t0: ch = EntryToken
            t8: i64,ch = load<(load 8 from `i8 addrspace(257)* null`, addrspace 257)> t0, Constant:i64<0>, undef:i64
              t10: i64 = X86ISD::WrapperRIP TargetGlobalTLSAddress:i64<i32* @x> 0 [TF=10]
            t11: i64,ch = load<(load 8 from got)> t0, t10, undef:i64
          t12: i64 = add t8, t11
        t4: i32,ch = load<(dereferenceable load 4 from @x)> t0, t12, undef:i64
      t6: ch = CopyToReg t0, Register:i32 %0, t4
      And when mcmodel is large, below instruction can NOT be folded.
      
        t10: i64 = X86ISD::WrapperRIP TargetGlobalTLSAddress:i64<i32* @x> 0 [TF=10]
      t11: i64,ch = load<(load 8 from got)> t0, t10, undef:i64
      So "t11: i64,ch = load<(load 8 from got)> t0, t10, undef:i64" is lowered to " Morphed node: t11: i64,ch = MOV64rm<Mem:(load 8 from got)> t10, TargetConstant:i8<1>, Register:i64 $noreg, TargetConstant:i32<0>, Register:i32 $noreg, t0"
      
      When llvm start to lower "t10: i64 = X86ISD::WrapperRIP TargetGlobalTLSAddress:i64<i32* @x> 0 [TF=10]", it fails.
      
      The patch is to fold the load and X86ISD::WrapperRIP.
      
      Fixes PR26906
      
      Patch by LuoYuanke
      
      Reviewers: craig.topper, rnk, annita.zhang, wxiao3
      
      Reviewed By: rnk
      
      Subscribers: llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D58336
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354857
      e745d6dd
    • Hans Wennborg's avatar
      Merging r354764: · ee57e9e1
      Hans Wennborg authored
      ```---------------------------------------------------------------------
      r354764 | lebedevri | 2019-02-25 08:39:07 +0100 (Mon, 25 Feb 2019) | 123 lines
      
      [XRay][tools] Revert "Use Support/JSON.h in llvm-xray convert"
      
      Summary:
      This reverts D50129 / rL338834: [XRay][tools] Use Support/JSON.h in llvm-xray convert
      
      Abstractions are great.
      Readable code is great.
      JSON support library is a *good* idea.
      
      However unfortunately, there is an internal detail that one needs
      to be aware of in `llvm::json::Object` - it uses `llvm::DenseMap`.
      So for **every** `llvm::json::Object`, even if you only store a single `int`
      entry there, you pay the whole price of `llvm::DenseMap`.
      
      Unfortunately, it matters for `llvm-xray`.
      
      I was trying to analyse the `llvm-exegesis` analysis mode performance,
      and for that i wanted to view the LLVM X-Ray log visualization in Chrome
      trace viewer. And the `llvm-xray convert` is sluggish, and sometimes
      even ended up being killed by OOM.
      
      `xray-log.llvm-exegesis.lwZ0sT` was acquired from `llvm-exegesis`
      (compiled with ` -fxray-instruction-threshold=128`)
      analysis mode over `-benchmarks-file` with 10099 points (one full
      latency measurement set), with normal runtime of 0.387s.
      
      Timings:
      Old: (copied from D58580)
      ```
      $ perf stat -r 5 ./bin/llvm-xray convert -sort -symbolize -instr_map=./bin/llvm-exegesis -output-format=trace_event -output=/tmp/trace.yml xray-log.llvm-exegesis.lwZ0sT
      
       Performance counter stats for './bin/llvm-xray convert -sort -symbolize -instr_map=./bin/llvm-exegesis -output-format=trace_event -output=/tmp/trace.yml xray-log.llvm-exegesis.lwZ0sT' (5 runs):
      
                21346.24 msec task-clock                #    1.000 CPUs utilized            ( +-  0.28% )
                     314      context-switches          #   14.701 M/sec                    ( +- 59.13% )
                       1      cpu-migrations            #    0.037 M/sec                    ( +-100.00% )
                 2181354      page-faults               # 102191.251 M/sec                  ( +-  0.02% )
             85477442102      cycles                    # 4004415.019 GHz                   ( +-  0.28% )  (83.33%)
             14526427066      stalled-cycles-frontend   #   16.99% frontend cycles idle     ( +-  0.70% )  (83.33%)
             32371533721      stalled-cycles-backend    #   37.87% backend cycles idle      ( +-  0.27% )  (33.34%)
             67896890228      instructions              #    0.79  insn per cycle
                                                        #    0.48  stalled cycles per insn  ( +-  0.03% )  (50.00%)
             14592654840      branches                  # 683631198.653 M/sec               ( +-  0.02% )  (66.67%)
               212207534      branch-misses             #    1.45% of all branches          ( +-  0.94% )  (83.34%)
      
                 21.3502 +- 0.0585 seconds time elapsed  ( +-  0.27% )
      ```
      New:
      ```
      $ perf stat -r 9 ./bin/llvm-xray convert -sort -symbolize -instr_map=./bin/llvm-exegesis -output-format=trace_event -output=/tmp/trace.yml xray-log.llvm-exegesis.lwZ0sT
      
       Performance counter stats for './bin/llvm-xray convert -sort -symbolize -instr_map=./bin/llvm-exegesis -output-format=trace_event -output=/tmp/trace.yml xray-log.llvm-exegesis.lwZ0sT' (9 runs):
      
                 7178.38 msec task-clock                #    1.000 CPUs utilized            ( +-  0.26% )
                     182      context-switches          #   25.402 M/sec                    ( +- 28.84% )
                       0      cpu-migrations            #    0.046 M/sec                    ( +- 70.71% )
                   33701      page-faults               # 4694.994 M/sec                    ( +-  0.88% )
             28761053971      cycles                    # 4006833.933 GHz                   ( +-  0.26% )  (83.32%)
              2028297997      stalled-cycles-frontend   #    7.05% frontend cycles idle     ( +-  1.61% )  (83.32%)
             10773154901      stalled-cycles-backend    #   37.46% backend cycles idle      ( +-  0.38% )  (33.36%)
             36199132874      instructions              #    1.26  insn per cycle
                                                        #    0.30  stalled cycles per insn  ( +-  0.03% )  (50.02%)
              6434504227      branches                  # 896420204.421 M/sec               ( +-  0.03% )  (66.68%)
                73355176      branch-misses             #    1.14% of all branches          ( +-  1.46% )  (83.33%)
      
                  7.1807 +- 0.0190 seconds time elapsed  ( +-  0.26% )
      ```
      
      So using `llvm::json` nearly triples run-time on that test case.
      (+3x is times, not percent.)
      
      Memory:
      Old:
      ```
      total runtime: 39.88s.
      bytes allocated in total (ignoring deallocations): 79.07GB (1.98GB/s)
      calls to allocation functions: 33267816 (834135/s)
      temporary memory allocations: 5832298 (146235/s)
      peak heap memory consumption: 9.21GB
      peak RSS (including heaptrack overhead): 147.98GB
      total memory leaked: 1.09MB
      ```
      New:
      ```
      total runtime: 17.42s.
      bytes allocated in total (ignoring deallocations): 5.12GB (293.86MB/s)
      calls to allocation functions: 21382982 (1227284/s)
      temporary memory allocations: 232858 (13364/s)
      peak heap memory consumption: 350.69MB
      peak RSS (including heaptrack overhead): 2.55GB
      total memory leaked: 79.95KB
      ```
      Diff:
      ```
      total runtime: -22.46s.
      bytes allocated in total (ignoring deallocations): -73.95GB (3.29GB/s)
      calls to allocation functions: -11884834 (529155/s)
      temporary memory allocations: -5599440 (249307/s)
      peak heap memory consumption: -8.86GB
      peak RSS (including heaptrack overhead): 0B
      total memory leaked: -1.01MB
      ```
      So using `llvm::json` increases *peak* memory consumption on *this* testcase ~+27x.
      And total allocation count +15x. Both of these numbers are times, *not* percent.
      
      And note that memory usage is clearly unbound with `llvm::json`, it directly depends
      on the length of the log, so peak memory consumption is always increasing.
      This isn't so with the dumb code, there is no accumulating memory consumption,
      peak memory consumption is fixed. Naturally, that means it will handle *much*
      larger logs without OOM'ing.
      
      Readability is good, but the price is simply unacceptable here.
      Too bad none of this analysis was done as part of the development/review D50129 itself.
      
      Reviewers: dberris, kpw, sammccall
      
      Reviewed By: dberris
      
      Subscribers: riccibruno, hans, courbet, jdoerfert, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D58584
      ```
      
      ---------------------------------------------------------------------
      
      llvm-svn: 354856
      ee57e9e1
    • Hans Wennborg's avatar
      ReleaseNotes: ARM64 SEH, pointed out by David Major · 0777c34a
      Hans Wennborg authored
      llvm-svn: 354855
      0777c34a
  10. 25 Feb, 2019 2 commits
  11. 22 Feb, 2019 1 commit