1. Jun 14, 2019
  2. Jun 13, 2019
    • Cameron McInally's avatar
      [NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll · aeb89f8b
      Cameron McInally authored
      Patch 2 of n.
      
      llvm-svn: 363275
      aeb89f8b
    • Joseph Tremoulet's avatar
      [EarlyCSE] Ensure equal keys have the same hash value · 3bc6e2a7
      Joseph Tremoulet authored
      Summary:
      The logic in EarlyCSE that looks through 'not' operations in the
      predicate recognizes e.g. that `select (not (cmp sgt X, Y)), X, Y` is
      equivalent to `select (cmp sgt X, Y), Y, X`.  Without this change,
      however, only the latter is recognized as a form of `smin X, Y`, so the
      two expressions receive different hash codes.  This leads to missed
      optimization opportunities when the quadratic probing for the two hashes
      doesn't happen to collide, and assertion failures when probing doesn't
      collide on insertion but does collide on a subsequent table grow
      operation.
      
      This change inverts the order of some of the pattern matching, checking
      first for the optional `not` and then for the min/max/abs patterns, so
      that e.g. both expressions above are recognized as a form of `smin X, Y`.
      
      It also adds an assertion to isEqual verifying that it implies equal
      hash codes; this fires when there's a collision during insertion, not
      just grow, and so will make it easier to notice if these functions fall
      out of sync again.  A new flag --earlycse-debug-hash is added which can
      be used when changing the hash function; it forces hash collisions so
      that any pair of values inserted which compare as equal but hash
      differently will be caught by the isEqual assertion.
      
      Reviewers: spatel, nikic
      
      Reviewed By: spatel, nikic
      
      Subscribers: lebedev.ri, arsenm, craig.topper, efriedma, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62644
      
      llvm-svn: 363274
      3bc6e2a7
    • Dmitri Gribenko's avatar
      [clang-tidy] Made abseil-faster-strsplit-delimiter tests pass on C++17 · 558369b5
      Dmitri Gribenko authored
      Reviewers: hokein, gribozavr
      
      Reviewed By: hokein, gribozavr
      
      Subscribers: xazax.hun, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63253
      
      Patch by Johan Vikström.
      
      llvm-svn: 363273
      558369b5
    • Dmitri Gribenko's avatar
      [clang-tidy] Fixed abseil-time-subtraction to work on C++17 · 00303065
      Dmitri Gribenko authored
      Summary: Fixed abseil-time-subtraction to work on C++17
      
      Reviewers: hokein, gribozavr
      
      Subscribers: xazax.hun, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63261
      
      Patch by Johan Vikström.
      
      llvm-svn: 363272
      00303065
    • Stefan Granitz's avatar
    • Dmitri Gribenko's avatar
      [clang-tidy] Made abseil-upgrade-duration-conversions tests pass on c++17 · 93f96b2b
      Dmitri Gribenko authored
      Summary: Made abseil-upgrade-duration-conversions tests pass on c++17
      
      Reviewers: hokein, gribozavr
      
      Reviewed By: gribozavr
      
      Subscribers: xazax.hun, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63262
      
      Patch by Johan Vikström.
      
      llvm-svn: 363270
      93f96b2b
    • Michael Liao's avatar
      Fix GCC compiler warning. NFC. · 08a4a0e9
      Michael Liao authored
      llvm-svn: 363269
      08a4a0e9
    • Simon Pilgrim's avatar
      [X86] Use fresh MemOps when emitting VAARG64 · 757a2f13
      Simon Pilgrim authored
      Previously it copied over MachineMemOperands verbatim which caused MOV32rm to have store flags set, and MOV32mr to have load flags set. This fixes some assertions being thrown with EXPENSIVE_CHECKS on.
      
      Committed on behalf of @luke (Luke Lau)
      
      Differential Revision: https://reviews.llvm.org/D62726
      
      llvm-svn: 363268
      757a2f13
    • David Stenberg's avatar
      Remove ';' after namespace's closing bracket [NFC] · 1278a192
      David Stenberg authored
      llvm-svn: 363267
      1278a192
    • James Henderson's avatar
      [docs][llvm-symbolizer] Fix formatting issue with --functions · e6820dac
      James Henderson authored
      Reviewed by: rupprecht
      
      Differential Revision: https://reviews.llvm.org/D63195
      
      llvm-svn: 363266
      e6820dac
    • Diogo N. Sampaio's avatar
      [FIX] Forces shrink wrapping to consider any memory access as aliasing with the stack · 0be2d25e
      Diogo N. Sampaio authored
      Summary:
      Relate bug: https://bugs.llvm.org/show_bug.cgi?id=37472
      
      The shrink wrapping pass prematurally restores the stack, at a point where the stack might still be accessed.
      Taking an exception can cause the stack to be corrupted.
      
      As a first approach, this patch is overly conservative, assuming that any instruction that may load or store could access
      the stack.
      
      Reviewers: dmgreen, qcolombet
      
      Reviewed By: qcolombet
      
      Subscribers: simpal01, efriedma, eli.friedman, javed.absar, llvm-commits, eugenis, chill, carwil, thegameg
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D63152
      
      llvm-svn: 363265
      0be2d25e
    • James Henderson's avatar
      [docs][llvm-dwarfdump] Add missing options and behaviour to documentation · 86b510aa
      James Henderson authored
      This fixes https://bugs.llvm.org/show_bug.cgi?id=42185.
      
      llvm-dwarfdump's documentation was missing a number of options and other
      behaviours. This change tries to fix up the documentation by adding
      these missing items.
      
      Reviewed by: JDevlieghere
      
      Differential Revision: https://reviews.llvm.org/D63217
      
      llvm-svn: 363264
      86b510aa
    • Dmitri Gribenko's avatar
      [clang-tidy] Fixed abseil-duration-unnecessary-conversion tests for c++17 · ab240c5e
      Dmitri Gribenko authored
      Summary: Fixed abseil-duration-unnecessary-conversion tests for c++17
      
      Reviewers: hokein, gribozavr
      
      Reviewed By: gribozavr
      
      Subscribers: xazax.hun, cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63263
      
      Patch by Johan Vikström.
      
      llvm-svn: 363263
      ab240c5e
    • Dmitri Gribenko's avatar
      Added AST matcher for ignoring elidable constructors · 31d68804
      Dmitri Gribenko authored
      Summary: Added AST matcher for ignoring elidable move constructors
      
      Reviewers: hokein, gribozavr
      
      Reviewed By: hokein, gribozavr
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D63149
      
      Patch by Johan Vikström.
      
      llvm-svn: 363262
      31d68804
    • Eugene Leviant's avatar
      [lld][ELF] Add tests for bad subsection length in .ARM.attributes · 0eb763c5
      Eugene Leviant authored
      Differential revision: https://reviews.llvm.org/D63191
      
      llvm-svn: 363261
      0eb763c5
    • Eugene Leviant's avatar
      Extra error checking to ARMAttributeParser · 407c8f1f
      Eugene Leviant authored
      The patch checks for subsection length as discussed in D63191
      
      llvm-svn: 363260
      407c8f1f
    • Jeremy Morse's avatar
      [NFC] Sink a function call into LiveDebugValues::process · d2cd9c23
      Jeremy Morse authored
      This was requested in D62904, which I successfully missed. This is just
      a refactor and shouldn't change any behaviour.
      
      llvm-svn: 363259
      d2cd9c23
    • Simon Tatham's avatar
      [ARM] Set up infrastructure for MVE vector instructions. · 286e1d2c
      Simon Tatham authored
      This commit prepares the way to start adding the main collection of
      MVE instructions, which operate on the 128-bit vector registers.
      
      The most obvious thing that's needed, and the simplest, is to add the
      MQPR register class, which is like the existing QPR except that it has
      fewer registers in it.
      
      The more complicated part: MVE defines a system of vector predication,
      in which instructions operating on 128-bit vector registers can be
      constrained to operate on only a subset of the lanes, using a system
      of prefix instructions similar to the existing Thumb IT, in that you
      have one prefix instruction which designates up to 4 following
      instructions as subject to predication, and within that sequence, the
      predicate can be inverted by means of T/E suffixes ('Then' / 'Else').
      
      To support instructions of this type, we've added two new Tablegen
      classes `vpred_n` and `vpred_r` for standard clusters of MC operands
      to add to a predicated instruction. Both include a flag indicating how
      the instruction is predicated at all (options are T, E and 'not
      predicated'), and an input register field for the register controlling
      the set of active lanes. They differ from each other in that `vpred_r`
      also includes an input operand for the previous value of the output
      register, for instructions that leave inactive lanes unchanged.
      `vpred_n` lacks that extra operand; it will be used for instructions
      that don't preserve inactive lanes in their output register (either
      because inactive lanes are zeroed, as the MVE load instructions do, or
      because the output register isn't a vector at all).
      
      This commit also adds the family of prefix instructions themselves
      (VPT / VPST), and all the machinery needed to work with them in
      assembly and disassembly (e.g. generating the 't' and 'e' mnemonic
      suffixes on disassembled instructions within a predicated block)
      
      I've added a couple of demo instructions that derive from the new
      Tablegen base classes and use those two operand clusters. The bulk of
      the vector instructions will come in followup commits small enough to
      be manageable. (One exception is that I've added the full version of
      `isMnemonicVPTPredicable` in the AsmParser, because it seemed
      pointless to carefully split it up.)
      
      Reviewers: dmgreen, samparker, SjoerdMeijer, t.p.northover
      
      Subscribers: javed.absar, kristof.beyls, hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62669
      
      llvm-svn: 363258
      286e1d2c
    • Simon Pilgrim's avatar
      [CodeGen] Add getMachineMemOperand + MachineMemOperand::Flags allocator helper wrapper. NFCI. · 6b56ad16
      Simon Pilgrim authored
      Pre-commit for D62726 on behalf of @luke (Luke Lau)
      
      llvm-svn: 363257
      6b56ad16
    • Jeremy Morse's avatar
      [DebugInfo] Honour variable fragments in LiveDebugValues · bf2b2f08
      Jeremy Morse authored
      This patch makes the LiveDebugValues pass consider fragments when propagating
      DBG_VALUE insts between blocks, fixing PR41979. Fragment info for a variable
      location is added to the open-ranges key, which allows distinct fragments to be
      tracked separately. To handle overlapping fragments things become slightly
      funkier. To avoid excessive searching for overlaps in the data-flow part of
      LiveDebugValues, this patch:
       * Pre-computes pairings of fragments that overlap, for each DILocalVariable
       * During data-flow, whenever something happens that causes an open range to
         be terminated (via erase), any fragments pre-determined to overlap are
         also terminated.
      
      The effect of which is that when encountering a DBG_VALUE fragment that
      overlaps others, the overlapped fragments do not get propagated to other
      blocks. We still rely on later location-list building to correctly handle
      overlapping fragments within blocks.
      
      It's unclear whether a mixture of DBG_VALUEs with and without fragmented
      expressions are legitimate. To avoid suprises, this patch interprets a
      DBG_VALUE with no fragment as overlapping any DBG_VALUE _with_ a fragment.
      
      Differential Revision: https://reviews.llvm.org/D62904
      
      llvm-svn: 363256
      bf2b2f08
    • Dmitry Preobrazhensky's avatar
      [AMDGPU][MC] Enabled constant expressions as operands of s_getreg/s_setreg · 1fca3b19
      Dmitry Preobrazhensky authored
      See bug 40820: https://bugs.llvm.org/show_bug.cgi?id=40820
      
      Reviewers: artem.tamazov, arsenm
      
      Differential Revision: https://reviews.llvm.org/D61125
      
      llvm-svn: 363255
      1fca3b19
    • Eugene Leviant's avatar
      [ThinLTO][Bitcode] Add 'entrycount' to FS_COMBINED_PROFILE. NFC · b00dbcbb
      Eugene Leviant authored
      Differential revision: https://reviews.llvm.org/D63078
      
      llvm-svn: 363254
      b00dbcbb
    • Kadir Cetinkaya's avatar
      [Clangd] Fixed clangd diagnostics priority · 88e636df
      Kadir Cetinkaya authored
      Summary:
      - Fixed diagnostics where zero width inserted ranges were being used instead of the whole token
      - Added unit tests
      
      Patch by @SureYeaah !
      
      Reviewers: sammccall, kadircet
      
      Reviewed By: kadircet
      
      Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits
      
      Tags: #clang-tools-extra, #clang
      
      Differential Revision: https://reviews.llvm.org/D63222
      
      llvm-svn: 363253
      88e636df
    • Simon Pilgrim's avatar
      [X86][AVX] Add broadcast(v4f64 hadd) test · a284f4fa
      Simon Pilgrim authored
      llvm-svn: 363252
      a284f4fa
    • Simon Pilgrim's avatar
      [X86][SSE] Avoid assert for broadcast(horiz-op()) cases for non-f64 cases. · 0baf136a
      Simon Pilgrim authored
      Based on fuzz test from @craig.topper
      
      llvm-svn: 363251
      0baf136a
    • Pavel Labath's avatar
      DWARF: Don't create lldb CompileUnits for DWARF type units · ad17e289
      Pavel Labath authored
      Summary:
      Type units don't represent actual compilations and a lot of the
      operations that we do with lldb compile units (getting their line
      tables, variables, etc.) don't make sense for them. There is also a lot
      more of them (sometimes over 100x), so making them more lightweight pays
      off.
      
      The main change in this patch is that we stop creating lldb CompileUnits
      for DWARF type units. The trickiest part here is that the SymbolFile
      interface requires that we assign consecutive sequence IDs to the
      compile units we create. As DWARF type and compile units can come in any
      order (in v5), this means we can no longer use 1-1 mapping between DWARF
      and lldb compile units. Instead I build a translation table between the
      two indices. To avoid pessimizing the case where there are no type
      units, I build the translation table only in case we have at least one
      type unit.
      
      Additionaly, I also tried to strenghted type safete by replacing
      DWARFUnit with DWARFCompileUnit where applicable. Though that was not
      stricly necessary, I found it a good way to ensure that the
      transformations I am doing here make sense. In the places where I was
      changing the function signatures, and where it was obvious that the
      objects being handled were not null, I also replaced pointers with
      references.
      
      There shouldn't be any major functional change with this patch. The only
      change I observed is that now the types in the type units will not be
      parsed when one calls Module::ParseAllDebugSymbols, unless they are
      referenced from other compile units. This makes sense, given how
      ParseAllDebugSymbols is implemented (it iterates over all compile
      units), and it only matters for one hand-writted test where I did not
      bother to reference the types from the compile units (which I now do).
      
      Reviewers: clayborg, JDevlieghere, aprantl
      
      Subscribers: jdoerfert, lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D63005
      
      llvm-svn: 363250
      ad17e289
    • Simon Pilgrim's avatar
      [X86][SSE] Add tests for underaligned nt stores · a6b87aa7
      Simon Pilgrim authored
      Test both 'unaligned' (which we should scalarize) and 'subvector aligned' (which we should split)
      
      llvm-svn: 363249
      a6b87aa7
    • Chris Jackson's avatar
      [llvm-nm] Additional lit tests for command line options · 7b395133
      Chris Jackson authored
          Differential Revision: https://reviews.llvm.org/D62955
      
      llvm-svn: 363248
      7b395133
    • Simon Pilgrim's avatar
      [X86][SSE] Add SSE4A nt store tests on X86 as well as X64 · e1aea858
      Simon Pilgrim authored
      We should be able to use MOVNTSD (f64) instead of MOVNTI (i32) to reduce the number of ops 32-bit targets
      
      Pulled out of D63246
      
      llvm-svn: 363247
      e1aea858
    • Nikola Prica's avatar
      [DebugInfo] Move Value struct out of DebugLocEntry as DbgValueLoc (NFC) · 076ae0d2
      Nikola Prica authored
      Since the DebugLocEntry::Value is used as part of DwarfDebug and
      DebugLocEntry make it as the separate class.
      
      Reviewers: aprantl, dstenb
      
      Reviewed By: aprantl
      
      Differential Revision: https://reviews.llvm.org/D63213
      
      llvm-svn: 363246
      076ae0d2
    • Jeremy Morse's avatar
      [DebugInfo] Use FrameDestroy to extend stack locations to end-of-function · 181bf0ce
      Jeremy Morse authored
      We aim to ignore changes in variable locations during the prologue and
      epilogue of functions, to avoid using space documenting location changes
      that aren't visible. However in D61940 / r362951 this got ripped out as
      the previous implementation was unsound.
      
      Instead, use the FrameDestroy flag to identify when we're in the epilogue
      of a function, and ignore variable location changes accordingly. This fits
      in with existing code that examines the FrameSetup flag.
      
      Some variable locations get shuffled in modified tests as they now cover
      greater ranges, which is what would be expected. Some additional
      single-location variables are generated too. Two tests are un-xfailed,
      they were only xfailed due to r362951 deleting functionality they depended
      on.
      
      Apparently some out-of-tree backends don't accurately maintain FrameDestroy
      flags -- if you're an out-of-tree maintainer and see changes in variable
      locations disappear due to a faulty FrameDestroy flag, it's safe to back
      this change out. The impact is just slightly more debug info than necessary.
      
      Differential Revision: https://reviews.llvm.org/D62314
      
      llvm-svn: 363245
      181bf0ce