1. Mar 09, 2018
    • Haojian Wu's avatar
      [clangd] Fix failing lit test. · 06eeb5c0
      Haojian Wu authored
      This test is missed in r327129.
      
      llvm-svn: 327131
      06eeb5c0
    • Eric Liu's avatar
      [clangd-vscode] Add package-lock.json to .gitignore · ff56b9c7
      Eric Liu authored
      llvm-svn: 327130
      ff56b9c7
    • Haojian Wu's avatar
      [clangd] Use identifier range as the definition range. · 5f100262
      Haojian Wu authored
      Summary: This also matches the range in symbol index.
      
      Reviewers: sammccall
      
      Subscribers: klimek, ilya-biryukov, jkorous-apple, ioeric, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D44247
      
      llvm-svn: 327129
      5f100262
    • Andrea Di Biagio's avatar
      0cc66c79
    • Sam McCall's avatar
      [clangd] Don't index template specializations. · 824913bd
      Sam McCall authored
      Summary:
      These have different USRs than the underlying entity, but are not typically
      interesting in their own right and can be numerous (e.g. generated traits).
      
      Reviewers: ioeric
      
      Subscribers: klimek, ilya-biryukov, jkorous-apple, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D44298
      
      llvm-svn: 327127
      824913bd
    • David Zarzycki's avatar
      [CMake] Properly conditionalize installation of lld libraries · 3e77b20d
      David Zarzycki authored
      In what appears to be a copy-and-paste error, lld currently only
      installs libraries if the lld tools are configured to build.
      
      Instead, lld should allow the libraries to be installed even if the lld
      tools are not being built. Additionally, if users want to only install
      the tools and not the libraries, the LLVM way of doing that is by
      checking for LLVM_INSTALL_TOOLCHAIN_ONLY.
      
      This fixes PR35960.
      
      llvm-svn: 327126
      3e77b20d
    • Andrea Di Biagio's avatar
      [llvm-mca] Run clang-format on the source code. NFC · 53e6ade9
      Andrea Di Biagio authored
      llvm-svn: 327125
      53e6ade9
    • Nico Weber's avatar
      [lld-link] Add support for /ignore:4037. · 0771c604
      Nico Weber authored
      Fixes PR36657.
      https://reviews.llvm.org/D44286
      
      llvm-svn: 327124
      0771c604
    • Pavel Labath's avatar
      [elf] Remove one copy of the section merging code · 3ef4eebc
      Pavel Labath authored
      Summary:
      Besides being superfluous, this double merging was actually wrong and
      causing some sections to be added twice. The reason for that was that
      the code assumes section IDs are unique in the section list, but this is
      only true if all sections in the list come from the same object file.
      
      Reviewers: fjricci, jankratochvil
      
      Subscribers: emaste, lldb-commits, arichardson
      
      Differential Revision: https://reviews.llvm.org/D44157
      
      llvm-svn: 327123
      3ef4eebc
    • Dan Liew's avatar
      [asan] Try to unbreak arm build bots by only running the test on · 3aa75a7f
      Dan Liew authored
      x86_64 and x86_64H (and not in the iOS simulator) where it seems
      to work. We need to properly fix the test when time permits.
      
      llvm-svn: 327122
      3aa75a7f
    • Nicolai Haehnle's avatar
      TableGen: Add a defset statement · fcd6525a
      Nicolai Haehnle authored
      Allows capturing a list of concrete instantiated defs.
      
      This can be combined with foreach to create parallel sets of def
      instantiations with less repetition in the source. This purpose is
      largely also served by multiclasses, but in some cases multiclasses
      can't be used.
      
      The motivating example for this change is having a large set of
      intrinsics, which are generated from the IntrinsicsBackend.td file
      included by Intrinsics.td, and a corresponding set of instruction
      selection patterns, which are generated via the backend's .td files.
      
      Multiclasses cannot be used to eliminate the redundancy in this case,
      because a multiclass cannot span both LLVM's common .td files and
      the backend .td files at the same time.
      
      Change-Id: I879e35042dceea542a5e6776fad23c5e0e69e76b
      
      Differential revision: https://reviews.llvm.org/D44109
      
      llvm-svn: 327121
      fcd6525a
    • Nicolai Haehnle's avatar
      TableGen: Allow arbitrary list values as ranges of foreach · 8aa9d583
      Nicolai Haehnle authored
      The changes to FieldInit are required to make field references (Def.field)
      work inside a ForeachDeclaration: previously, Def.field wasn't resolved
      immediately when Def was already a fully resolved DefInit.
      
      Change-Id: I9875baec2fc5aac8c2b249e45b9cf18c65ae699b
      llvm-svn: 327120
      8aa9d583
    • Nicolai Haehnle's avatar
      TableGen: Remove unused ParseForeachMode · 2435855a
      Nicolai Haehnle authored
      Use the default ParseValueMode instead of ParseForeachMode when
      parsing the rule
      
        ForeachDeclaration ::= ID '=' '[' ValueList ']'
      
      because the only difference between the two is how an open brace '{'
      is handled at the end. In the context of foreach, the 'in' keyword
      will appear after the ForeachDeclaration, so this special handling
      of '{' is not required.
      
      Change-Id: I4d86bb73bab9ec26752e1273e5213df77cf28d1d
      llvm-svn: 327119
      2435855a
    • Nicolai Haehnle's avatar
      TableGen: More helpful error messages · 64da6990
      Nicolai Haehnle authored
      Change-Id: Ic78afd0cd765fdb4cf1b7ecfb6bba22653ce6d29
      llvm-svn: 327118
      64da6990
    • Nicolai Haehnle's avatar
      TableGen: add !isa operation · b5376059
      Nicolai Haehnle authored
      Change-Id: Iddb724c3ae706d82933a2d82c91d07e0e36b30e3
      
      Differential revision: https://reviews.llvm.org/D44105
      
      llvm-svn: 327117
      b5376059
    • Pavel Labath's avatar
      [DebugInfo/AccelTable] Fix inconsistency in getDIEOffset implementations · 47c3472c
      Pavel Labath authored
      Summary:
      Even though the getDIEOffset offset function was common for the two
      accelerator table implementations, it was doing two different things:
      for the Apple tables, it was returning the die offset relative to the
      start of the section, whereas for DWARF v5 tables, it was relative to
      the start of the CU.
      
      I resolve this by renaming the function to getDIESectionOffset to make
      it obvious what the function returns, and change the DWARF
      implementation to return the section offset. I also keep the CU-relative
      accessor, but only in the DWARF implementation (there is no way to get
      this information for the Apple tables). This was not caught by existing
      tests because the hand-written inputs also erroneously used section
      offsets instead of CU-relative ones.
      
      While looking at this, I noticed that the Apple implementation was not
      fully correct either -- the header contains a DIEOffsetBase field, which
      should be added to offsets encoded with the DW_FORM_ref*** family, but
      this was not being used. This went unnoticed because all current writers
      set this field to zero anyway. I fix this as well and add a hand-written
      test which demonstrates the issue.
      
      Reviewers: JDevlieghere, dblaikie
      
      Subscribers: aprantl, llvm-commits
      
      Differential Revision: https://reviews.llvm.org/D44202
      
      llvm-svn: 327116
      47c3472c
    • Sam McCall's avatar
      [clang-tidy] fix header guard · 893cbc25
      Sam McCall authored
      llvm-svn: 327115
      893cbc25
    • Haojian Wu's avatar
      [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWith · 40571b7c
      Haojian Wu authored
      Patch by Niko Weh!
      
      Reviewers: hokein
      
      Subscribers: klimek, cfe-commits, ioeric, ilya-biryukov, ahedberg
      
      Differential Revision: https://reviews.llvm.org/D43847
      
      llvm-svn: 327111
      40571b7c
    • Pavel Labath's avatar
      Move option parsing out of the Args class · 5f56fca4
      Pavel Labath authored
      Summary:
      The args class is used in plenty of places (a lot of them in the lower lldb
      layers) for representing a list of arguments, and most of these places don't
      care about option parsing. Moving the option parsing out of the class removes
      the largest external dependency (there are a couple more, but these are in
      static functions), and brings us closer to being able to move it to the
      Utility module).
      
      The new home for these functions is the Options class, which was already used
      as an argument to the parse calls, so this just inverts the dependency between
      the two.
      
      The functions are themselves are mainly just copied -- the biggest functional
      change I've made to them is to avoid modifying the input Args argument (getopt
      likes to permute the argument vector), as it was weird to have another class
      reorder the entries in Args class. So now the functions don't modify the input
      arguments, and (for those where it makes sense) return a new Args vector
      instead. I've also made the addition of a "fake arg0" (required for getopt
      compatibility) an implementation detail rather than a part of interface.
      
      While doing that I noticed that ParseForCompletion function was recording the
      option indexes in the shuffled vector, but then the consumer was looking up the
      entries in the unshuffled one. This manifested itself as us not being able to
      complete "watchpoint set variable foo --" (because getopt would move "foo" to
      the end). Surprisingly all other completions (e.g. "watchpoint set variable foo
      --w") were not affected by this. However, I couldn't find a comprehensive test
      for command argument completion, so I consolidated the existing tests and added
      a bunch of new ones.
      
      Reviewers: davide, jingham, zturner
      
      Subscribers: lldb-commits
      
      Differential Revision: https://reviews.llvm.org/D43837
      
      llvm-svn: 327110
      5f56fca4
    • Renato Golin's avatar
      [LV] Fix vectorizer's isUniform() abuse triggers assert in SCEV · 6b62039b
      Renato Golin authored
      Fixes PR36311.
      
      See more detailed analysis in
      https://bugs.llvm.org/show_bug.cgi?id=36311.
      
      isUniform() information is recomputed after LV started transforming the
      underlying IR and that triggered an assert in SCEV.
      
      From vectorizer's architectural perspective, such information, while
      still useful in vector code gen, should not be recomputed after the
      start of transforming the LLVM IR. Instead, we should collect and cache
      such information during the analysis phase of LV and use the cached info
      during code gen.
      
      From the symptom perspective, this assert as it stands right now is not
      very useful. Legality already rejected loops that would trigger the
      assert. As such, commenting out the assert is NFC from vectorizer's
      functionality perspective. On top of that, just above the assertion, we
      check for unit-strided load/store or
      gather scatter. Addresses can't be uniform below that check.
      
      From vectorization theory point of view, we don't have to reject all
      cases of stores to uniform addresses. Eventually, we should support
      safe/profitable cases.
      
      This patch resolves the issue by removing the useless assertion that is
      invoking LAA's isUniform() that requires up-to-date DomTree ---- once
      vector code gen starts modifying CFG, we don't have an up-to-date
      DomTree.
      
      Patch by Hideki Saito <hideki.saito@intel.com>.
      
      llvm-svn: 327109
      6b62039b
    • Jonas Devlieghere's avatar
      [Support] Move syntax highlighting into support · 69217539
      Jonas Devlieghere authored
      Move the DWARF syntax highlighting into support. This has several
      advantages, most notably that this makes the WithColor RAII wrapper
      available outside libDebugInfo. Furthermore, several projects all have
      their own code for handling colored output. This provides a place to
      centralize it.
      
      Differential revision: https://reviews.llvm.org/D44215
      
      llvm-svn: 327108
      69217539
    • Martin Storsjo's avatar
      [AArch64] Fix use of a regex in the win-alloca.ll test. NFC. · ccac66da
      Martin Storsjo authored
      Check that the variable actually is the same as the one previously
      matched.
      
      llvm-svn: 327107
      ccac66da
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Fixed V_DIV_FIXUP_F16 selection on GFX9 · c8127fc6
      Stanislav Mekhanoshin authored
      GFX9 should select opsel version.
      
      Differential Revision: https://reviews.llvm.org/D44279
      
      llvm-svn: 327106
      c8127fc6
    • Saleem Abdulrasool's avatar
      CodeGen: simplify and validate exception personalities · 3e701327
      Saleem Abdulrasool authored
      Simplify the dispatching for the personality routines.  This really had
      no test coverage previously, so add test coverage for the various cases.
      This turns out to be pretty complicated as the various languages and
      models interact to change personalities around.
      
      You really should feel bad for the compiler if you are using exceptions.
      There is no reason for this type of cruelty.
      
      llvm-svn: 327105
      3e701327
    • Craig Topper's avatar
      [X86] Remove duplicate isel pattern. NFC · e7060b20
      Craig Topper authored
      llvm-svn: 327104
      e7060b20
    • Julie Hockett's avatar
      Revert "[clang-doc] Setup clang-doc frontend framework" · c8922c16
      Julie Hockett authored
      This reverts commit r327102, since it was breaking the linux-abi-test on
      x86.
      
      llvm-svn: 327103
      c8922c16
    • Julie Hockett's avatar
      [clang-doc] Setup clang-doc frontend framework · 67181246
      Julie Hockett authored
      Setting up the mapper part of the frontend framework for a clang-doc
      tool. It creates a series of relevant matchers for declarations, and
      uses the ToolExecutor to traverse the AST and extract the matching
      declarations and comments. The mapper serializes the extracted
      information to individual records for reducing and eventually doc
      generation.
      
      For a more detailed overview of the tool, see the design document on the
      mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056203.html
      
      Differential Revision: https://reviews.llvm.org/D41102
      
      llvm-svn: 327102
      67181246
    • Rafael Espindola's avatar
      Don't treat .symver as a regular alias definition. · 81e911cd
      Rafael Espindola authored
      This patch starts simplifying the handling of .symver.
      
      For now it just moves the responsibility for creating an alias down to
      the streamer. With that the asm streamer can pass a .symver unchanged,
      which is nice since gas cannot parse "foo@bar = zed".
      
      In a followup I hope to move the handling down to the writer so that
      we don't need special hacks for avoiding breaking names with @@@ on
      windows.
      
      llvm-svn: 327101
      81e911cd
    • Matt Morehouse's avatar
      Attempt to fix vecreduce-propagate-sd-flags.ll test. · 5a91fc6f
      Matt Morehouse authored
      Buildbots have been failing since r327079.
      
      llvm-svn: 327100
      5a91fc6f
    • Richard Smith's avatar
      PR36645: Go looking for an appropriate array bound when constant-evaluating a · 69cf59ed
      Richard Smith authored
      name of an array object.
      
      llvm-svn: 327099
      69cf59ed
    • Artem Dergachev's avatar
      [analyzer] MmapWriteExecChecker: Add support for mprotect(). · ce5f2d3d
      Artem Dergachev authored
      mprotect() allows setting memory access flags similarly to mmap(),
      causing similar security issues if these flags are needlessly broad.
      
      Patch by David Carlier!
      
      Differential Revision: https://reviews.llvm.org/D44250
      
      llvm-svn: 327098
      ce5f2d3d
    • Jason Molenda's avatar
      250524f7
    • Artem Dergachev's avatar
      [CFG] [analyzer] Add construction context for implicit constructor conversions. · 13f9664d
      Artem Dergachev authored
      Implicit constructor conversions such as A a = B() are represented by
      surrounding the constructor for B() with an ImplicitCastExpr of
      CK_ConstructorConversion kind, similarly to how explicit constructor conversions
      are surrounded by a CXXFunctionalCastExpr. Support this syntax pattern when
      extracting the construction context for the implicit constructor that
      performs the conversion.
      
      Differential Revision: https://reviews.llvm.org/D44051
      
      llvm-svn: 327096
      13f9664d
    • Jason Molenda's avatar
      More cleanups of debugserver project file and the libpmenergy/libpmsample · 4b7ea1f3
      Jason Molenda authored
      stuff.  Activate it when an internal SDK is selected.  Update the name of
      the LDFLAGS to match the rest of the settings.  Update the default arch for 
      ios builds.
      
      llvm-svn: 327095
      4b7ea1f3
    • Eric Christopher's avatar
      Revert "[ThinLTO] Keep available_externally symbols live" · 3caa0fd0
      Eric Christopher authored
      This reverts commit r327041 and the followup attempts at fixing the testcase as they're still failing.
      
      llvm-svn: 327094
      3caa0fd0
    • Craig Topper's avatar
      [X86] Remove SRAs from v16i8 multiply lowering on sse2 targets · 784f1bbf
      Craig Topper authored
      Previously we unpacked the even bytes of each input into the high byte of 16-bit elements then did an v8i16 arithmetic shift right by 8 bits to fill the upper bits of each word with sign bits. Then we did the v8i16 multiply and then masked to zero the upper 8-bits of each result. The similar was done for all the odd bytes. The results are then packed together with packuswb
      
      Since we are masking each multiply result element to 8-bits, and those 8-bits are determined only by the lower 8-bits of each of the inputs, we don't need to fill the upper bits with sign bits. So we can just unpack into the low byte of each element and treat the upper bits as garbage. This is what gcc also does.
      
      Differential Revision: https://reviews.llvm.org/D44267
      
      llvm-svn: 327093
      784f1bbf
    • Adrian Prantl's avatar
      LowerDbgDeclare: ignore dbg.declares for allocas with volatile access · 5b477be7
      Adrian Prantl authored
      There is no point in lowering a dbg.declare describing an alloca that
      has volatile loads or stores as users, since the alloca cannot be
      elided. Lowering the dbg.declare will result in larger debug info that
      may also have worse coverage than just describing the alloca.
      
      rdar://problem/34496278
      
      llvm-svn: 327092
      5b477be7
    • Kuba Mracek's avatar
      Mark the -overlap tests are "UNSUPPORTED: android". Android test harness... · ffb5014d
      Kuba Mracek authored
      Mark the -overlap tests are "UNSUPPORTED: android". Android test harness doesn't know how to handle suppression files.
      
      llvm-svn: 327091
      ffb5014d
    • Douglas Yung's avatar
      [DOXYGEN] Fix doxygen and content issues in mmintrin.h · 17d2ef90
      Douglas Yung authored
      - Fix instruction mappings/listings for various intrinsics
      
      This patch was made by Craig Flores
      
      Differential Revision: https://reviews.llvm.org/D41517
      
      llvm-svn: 327090
      17d2ef90
    • Vedant Kumar's avatar
      [test] Skip a test which sporadically fails in its dsym variant · e96dc753
      Vedant Kumar authored
      There is a mailing list discussion re: r325927 about why this test fails
      in the dsym variant. I've marked it skipped for now, until the issue is
      resolved.
      
      llvm-svn: 327089
      e96dc753