1. May 28, 2019
    • Don Hinton's avatar
      [test] Fix plugin tests · fe5eaab2
      Don Hinton authored
      Summary:
      The following changes were required to fix these tests:
      
      1) Change LLVM_ENABLE_PLUGINS to an option and move it to
         llvm/CMakeLists.txt with an appropriate default -- which matches
         the original default behavior.
      
      2) Move the plugins directory from clang/test/Analysis
         clang/lib/Analysis.  It's not enough to add an exclude to the
         lit.local.cfg file because add_lit_testsuites recurses the tree and
         automatically adds the appropriate `check-` targets, which don't
         make sense for the plugins because they aren't tests and don't
         have `RUN` statements.
      
         Here's a list of the `clang-check-anlysis*` targets with this
         change:
      
      ```
        $ ninja -t targets all| sed -n "s/.*\/\(check[^:]*\):.*/\1/p" | sort -u | grep clang-analysis
        check-clang-analysis
        check-clang-analysis-checkers
        check-clang-analysis-copypaste
        check-clang-analysis-diagnostics
        check-clang-analysis-engine
        check-clang-analysis-exploration_order
        check-clang-analysis-html_diagnostics
        check-clang-analysis-html_diagnostics-relevant_lines
        check-clang-analysis-inlining
        check-clang-analysis-objc
        check-clang-analysis-unified-sources
        check-clang-analysis-z3
      ```
      
      3) Simplify the logic and only include the subdirectories under
         clang/lib/Analysis/plugins if LLVM_ENABLE_PLUGINS is set.
      
      Reviewed By: NoQ
      
      Tags: #clang, #llvm
      
      Differential Revision: https://reviews.llvm.org/D62445
      
      llvm-svn: 361790
      fe5eaab2
    • Rui Ueyama's avatar
      Merge ELFFileBase::{initSymtab,parseHeader} as ELFFileBase:init. NFC. · 92069605
      Rui Ueyama authored
      This patch simplifies ELFFile instance initialization by merging
      two similar functions into a single function and call it from the
      ctor.
      
      llvm-svn: 361789
      92069605
    • Craig Topper's avatar
      [CostModel] Add really basic support for being able to query the cost of the FNeg instruction. · 50d50282
      Craig Topper authored
      Summary:
      This reuses the getArithmeticInstrCost, but passes dummy values of the second
      operand flags.
      
      The X86 costs are wrong and can be improved in a follow up. I just wanted to
      stop it from reporting an unknown cost first.
      
      Reviewers: RKSimon, spatel, andrew.w.kaylor, cameron.mcinally
      
      Reviewed By: spatel
      
      Subscribers: hiraditya, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62444
      
      llvm-svn: 361788
      50d50282
    • Nico Weber's avatar
      llvm-undname: Remove unreachable statement · f83c39e5
      Nico Weber authored
      llvm-svn: 361786
      f83c39e5
    • Sanjay Patel's avatar
      [x86] add test to show volatile store splitting; NFC · 165663ae
      Sanjay Patel authored
      From the LangRef:
      "the backend should never split or merge target-legal
      volatile load/store instructions."
      
      See also:
      D62498
      
      llvm-svn: 361785
      165663ae
    • Petr Hosek's avatar
      [Driver] Change layout of per-target runtimes to resemble multiarch · 61a5e283
      Petr Hosek authored
      This is a follow up to r361432, changing the layout of per-target
      runtimes to more closely resemble multiarch. While before, we used
      the following layout:
      
      [RESOURCE_DIR]/<target>/lib/libclang_rt.<runtime>.<ext>
      
      Now we use the following layout:
      
      [RESOURCE_DIR]/lib/<target>/libclang_rt.<runtime>.<ext>
      
      This also more closely resembles the existing "non-per-target" layout:
      
      [RESOURCE_DIR]/lib/<os>/libclang_rt.<runtime>-<arch>.<ext>
      
      This change will enable further simplification of the driver logic
      in follow up changes.
      
      Differential Revision: https://reviews.llvm.org/D62469
      
      llvm-svn: 361784
      61a5e283
    • Nico Weber's avatar
      llvm-undname: Extract demangleMD5Name() method; no behavior change · 82dc06c3
      Nico Weber authored
      llvm-svn: 361783
      82dc06c3
    • Lang Hames's avatar
      [RuntimeDyld][ARM] Fix an incorrect assertion condition. · 23343c5d
      Lang Hames authored
      Fixes https://llvm.org/PR42036
      
      llvm-svn: 361782
      23343c5d
    • Matt Arsenault's avatar
      RegAllocFast: Set MayLiveAcrossBlocks when allocating uses · ca84c4be
      Matt Arsenault authored
      Setting mayLiveOut based only on use instructions after allocating the
      def block did not work if the use block was allocated before the def
      block, since the virtual register uses were already removed.
      
      Fixes bug 41973.
      
      llvm-svn: 361781
      ca84c4be
    • Sanjay Patel's avatar
      [SelectionDAG] fold concat of extract subvectors · 2f99d009
      Sanjay Patel authored
      This is derived from the related fold for build vectors.
      We also have a version of this in DAGCombiner. The benefit of
      having this fold at node creation time is (1) efficiency and
      (2) preventing infinite looping from creating patterns that
      should not exist in the first place.
      
      Currently, the inf-loop could happen with MergeConsecutiveStores()
      because it naively creates concat of extracts when forming a wider
      vector store. That could fight with target-specific store narrowing.
      
      llvm-svn: 361780
      2f99d009
    • Volodymyr Sapsai's avatar
      [Preprocessor] Fix crash emitting note with framework location for "file not found" error. · e32ff096
      Volodymyr Sapsai authored
      A filename can be remapped with a header map to point to a framework
      header and we can find the corresponding framework without the header.
      But if the original filename doesn't have a remapped framework name,
      we'll fail to find its location and will dereference a null pointer
      during diagnostics emission.
      
      Fix by tracking remappings better and emit the note only if a framework
      is found before any of the remappings.
      
      rdar://problem/48883447
      
      Reviewers: arphaman, erik.pilkington, jkorous
      
      Reviewed By: arphaman
      
      Subscribers: dexonsmith, cfe-commits
      
      Differential Revision: https://reviews.llvm.org/D61707
      
      llvm-svn: 361779
      e32ff096
    • Sanjay Patel's avatar
      [SelectionDAG] fix formatting and redundant comments; NFC · e13ae3e4
      Sanjay Patel authored
      There's a possible missing fold here for extracting from the
      same source vector. It's similar to a check that we use to
      squash a build vector with all extracted elements from the
      same source vector.
      
      llvm-svn: 361778
      e13ae3e4
    • Michael Liao's avatar
      [SelectionDAG] Enhance the simplification of `copyto` from `implicit-def`. · 9c70c574
      Michael Liao authored
      Summary:
      - The current implementation simplifies the case where the source of
        `copyto` is `implicit-def`ed. However, it only works when that
        `implicit-def` is single-used since it detects that from
        `implicit-def` and cannot determine which destination vreg should be
        used if there are multiple uses.
      - This patch changes that detection when `copyto` is being emitted. If
        that `copyto`'s source is defined from `implicit-def`, it simplifies
        it. Hence, it works even that `implicit-def` is multi-used.
      - Except it simplifies the internal IR, it won't improve the quality of
        code generation. However, it helps to detect 'implicit-def` in a
        straight-forward manner in some passes, such as `si-i1-copies`. A test
        case is added.
      
      Reviewers: sunfish, nhaehnle
      
      Subscribers: jvesely, hiraditya, asbirlea, llvm-commits, yaxunl
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62342
      
      llvm-svn: 361777
      9c70c574
    • Alexander Timofeev's avatar
      [AMDGPU] Fix for the address sanitizer failure. Fixing typo · f4040a0d
      Alexander Timofeev authored
      llvm-svn: 361776
      f4040a0d
    • Jacques Pienaar's avatar
      NFC: Change usage of 'DenseSet' to 'DenseSetImpl' in DenseSetImpl::ConstIterator. · 00a538a2
      Jacques Pienaar authored
      Summary:
      Change usage of 'DenseSet' to 'DenseSetImpl' in a friend declaration within DenseSetImpl::ConstIterator. 'ConstIterator' was never updated when DenseSet was split into an impl when adding support for DenseSetImpl.
      
      This fixes build errors on MSVC when forward declaring DenseSet as this friend decl does not declare the template arguments as well.
      
      Reviewers: jpienaar
      
      Reviewed By: jpienaar
      
      Subscribers: jpienaar, lebedev.ri, dexonsmith, kristina, llvm-commits
      
      Tags: #llvm
      
      Differential Revision: https://reviews.llvm.org/D62467
      
      llvm-svn: 361775
      00a538a2
    • Dmitri Gribenko's avatar
      Include what you use in AArch64AsmBackend.cpp · 5379f1a6
      Dmitri Gribenko authored
      AArch64AsmBackend.cpp was not using any APIs from AArch64.h, and was
      only including it for transitive dependencies.  Doing so is problematic
      from include-what-you-use perspective, but it is also a layering issue
      (it creates a dependency cycle between the primary AArch64 target
      library and the MCTargetDesc library).
      
      llvm-svn: 361774
      5379f1a6
    • Simon Pilgrim's avatar
      [SelectionDAG] GetDemandedBits - add demanded elements wrapper implementation · ebb053b1
      Simon Pilgrim authored
      The DemandedElts variable is pretty much inert at the moment - the original GetDemandedBits implementation calls it with an 'all ones' DemandedElts value so the function is active and behaves exactly as it used to.
      
      llvm-svn: 361773
      ebb053b1
    • Simon Pilgrim's avatar
      [LLParser] Fix uninitialized flag variable warnings. NFCI. · d99f9373
      Simon Pilgrim authored
      Fixes a large number of warnings in the scan-build report on llvm builds.
      
      llvm-svn: 361772
      d99f9373
    • Kadir Cetinkaya's avatar
      [clang] Respect TerseOutput when printing lambdas · 20c3c4fe
      Kadir Cetinkaya authored
      Reviewers: ilya-biryukov, hokein, sammccall
      
      Subscribers: cfe-commits
      
      Tags: #clang
      
      Differential Revision: https://reviews.llvm.org/D62487
      
      llvm-svn: 361771
      20c3c4fe
  2. May 27, 2019