1. Dec 11, 2020
  2. Dec 10, 2020
    • Utkarsh Saxena's avatar
      [clangd] Find relations in Dex exploration tool. · 4ce242a1
      Utkarsh Saxena authored
      Reviewed By: hokein
      
      Differential Revision: https://reviews.llvm.org/D93029
      4ce242a1
    • Peter Steinfeld's avatar
      [flang] Fix bogus message on index-names in the presence of associated entities · 9168a0f5
      Peter Steinfeld authored
      The semantic analysis of index-names of FORALL statements looks up symbols with
      the same name as the index-name.  This is needed to exclude symbols that are
      not objects.  But if the symbol found is host-, use-, or construct-associated
      with another entity, the check fails.
      
      I fixed this by getting the root symbol of the symbol found and doing the check
      on the root symbol.  This required creating a non-const version of
      "GetAssociationRoot()".
      
      Differential Revision: https://reviews.llvm.org/D92970
      9168a0f5
    • clementval's avatar
      Revert "[openmp] Remove clause from OMPKinds.def and use OMP.td info" · 456c885d
      clementval authored
      This reverts commit a7b28472.
      
      failing buildbot on warnings
      456c885d
    • Nuno Lopes's avatar
      AA: make AliasAnalysis.h compatible with C++20 (NFC) · d2a7b83c
      Nuno Lopes authored
      can't mix arithmetic with different enums
      d2a7b83c
    • Nico Weber's avatar
      [gn build] fix build after a7b28472 · 985739ec
      Nico Weber authored
      Ports 6e42a417 since it's now needed, and undo an accidental
      deletion from d69762c4 while here (this part is not needed to fix
      the build, it's just in the vicinity).
      985739ec
    • Pavel Labath's avatar
      [lldb/test] Change base class of lldb-server tests · b505142f
      Pavel Labath authored
      lldb-server tests are a very special subclass of "api" tests. As they
      communicate with lldb-server directly, they don't actually need most of
      facilities provided by our TestBase class. In particular, they don't
      need the ability to fork debug info flavours of tests (but they could
      use debug server flavours).
      
      This makes them inherit from "Base" instead. This avoids the need to
      explicitly mark these tests as NO_DEBUG_INFO_TEST_CASE. Two additional
      necessary tweaks were:
      - move run_platform_command to the base (Base) class. This is used in
        one test, and can be generally useful when running tests remotely.
      - add a "build" method, forwarding to buildDefault. This is to avoid
        updating each test case to use buildDefault (also, "build" sounds
        better). It might be interesting to refactor the (Test)Base classes so
        that all debug info flavour handling happens in TestBase, and the Base
        class provides a simple build method automatically.
      b505142f
    • Pavel Labath's avatar
      [lldb/test] Replace ad-hoc server test choice with test categories · db842082
      Pavel Labath authored
      This makes things consistent, and enables further simplifications down
      the road.
      db842082
    • Valentin Clement's avatar
      [openmp] Remove clause from OMPKinds.def and use OMP.td info · a7b28472
      Valentin Clement authored
      Remove the OpenMP clause information from the OMPKinds.def file and use the
      information from the new OMP.td file. There is now a single source of truth for the
      directives and clauses.
      
      To avoid generate lots of specific small code from tablegen, the macros previously
      used in OMPKinds.def are generated almost as identical. This can be polished and
      possibly removed in a further patch.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D92955
      a7b28472
    • Nathan James's avatar
      [clangd][NFC] Remove unnecessary vector. · a0cf2b8f
      Nathan James authored
      As pointed out in D92788.
      
      Reviewed By: kbobyrev
      
      Differential Revision: https://reviews.llvm.org/D92986
      a0cf2b8f
    • Nathan James's avatar
      [clang-tidy] Use a MemoryBufferRef when parsing configuration files. · 34d2688a
      Nathan James authored
      Using a MemoryBufferRef, If there is an error parsing, we can point the user to the location of the file.
      
      Reviewed By: aaron.ballman
      
      Differential Revision: https://reviews.llvm.org/D93024
      34d2688a
    • Krzysztof Parzyszek's avatar
      [Hexagon] Fix gcc6 compilation issue · 7c9afe91
      Krzysztof Parzyszek authored
      7c9afe91
    • Michał Górny's avatar
      [lldb] [docs] Add a manpage for lldb-server · 25c40a45
      Michał Górny authored
      Differential Revision: https://reviews.llvm.org/D92872
      25c40a45
    • Kerry McLaughlin's avatar
      [SVE][CodeGen] Extend index of masked gathers · abe7775f
      Kerry McLaughlin authored
      This patch changes performMSCATTERCombine to also promote the indices of
      masked gathers where the element type is i8 or i16, and adds various tests
      for gathers with illegal types.
      
      Reviewed By: sdesmalen
      
      Differential Revision: https://reviews.llvm.org/D91433
      abe7775f
    • Haojian Wu's avatar
      2fc4afda
    • Kazushi (Jam) Marukawa's avatar
      [VE] Add vector reduce intrinsic instructions · 4b1e3292
      Kazushi (Jam) Marukawa authored
      Add vrmax, vrmin, vfrmax, vfrmin, vrand, vror, and vrxor intrinsic
      instructions and regression tests.
      
      Reviewed By: simoll
      
      Differential Revision: https://reviews.llvm.org/D92941
      4b1e3292
    • Sjoerd Meijer's avatar
      [AArch64] Cortex-R82: remove crypto · 99ad078b
      Sjoerd Meijer authored
      Remove target features crypto for Cortex-R82, because it doesn't have any, and
      add LSE which was missing while we are at it.
      This also removes crypto from the v8-R architecture description because that
      aligns better with GCC and so far none of the R-cores have implemented crypto,
      so is probably a more sensible default.
      
      Differential Revision: https://reviews.llvm.org/D91994
      99ad078b
    • Jan Kratochvil's avatar
    • Peter Waller's avatar
      [AArch64][Driver][SVE] Push missing SVE feature error from driver to frontend · 2315e987
      Peter Waller authored
      ... and give more guidance to users.
      
      If specifying -msve-vector-bits on a non-SVE target, clang would say:
      
          error: '-msve-vector-bits' is not supported without SVE enabled
      
      1. The driver lacks logic for "implied features".
         This would result in this error being raised for -march=...+sve2,
         even though +sve2 implies +sve.
      
      2. Feature implication is well modelled in LLVM, so push the error down
         the stack.
      
      3. Hint to the user what flag they need to consider setting.
      
      Now clang fails later, when the feature is used, saying:
      
        aarch64-sve-vector-bits.c:42:41: error: 'arm_sve_vector_bits' attribute is not supported on targets missing 'sve'; specify an appropriate -march= or -mcpu=
        typedef svint32_t noflag __attribute__((arm_sve_vector_bits(256)));
      
      Move clang/test/Sema/{neon => arm}-vector-types-support.c and put tests for
      this warning together in one place.
      
      Reviewed By: sdesmalen
      
      Differential Revision: https://reviews.llvm.org/D92487
      2315e987
    • Raphael Isemann's avatar
      [lldb] Fix that symbols.clang-modules-cache-path is never initialized · 208e3f5d
      Raphael Isemann authored
      LLDB is supposed to ask the Clang Driver what the default module cache path is
      and then use that value as the default for the
      `symbols.clang-modules-cache-path` setting. However, we use the property type
      `String` to change `symbols.clang-modules-cache-path` even though the type of
      that setting is `FileSpec`, so the setter will simply do nothing and return
      `false`. We also don't check the return value of the setter, so this whole code
      ends up not doing anything at all.
      
      This changes the setter to use the correct property type and adds an assert that
      we actually successfully set the default path. Also adds a test that checks that
      the default value for this setting is never unset/empty path as this would
      effectively disable the import-std-module feature from working by default.
      
      Reviewed By: JDevlieghere, shafik
      
      Differential Revision: https://reviews.llvm.org/D92772
      208e3f5d
    • Kirill Bobyrev's avatar
      [clangd] NFC: Use SmallVector<T> where possible · ee02e20c
      Kirill Bobyrev authored
      SmallVector<T> with default size is now the recommended version (D92522).
      
      Reviewed By: sammccall
      
      Differential Revision: https://reviews.llvm.org/D92788
      ee02e20c
    • David Green's avatar
      [ARM][RegAlloc] Add t2LoopEndDec · 0447f350
      David Green authored
      We currently have problems with the way that low overhead loops are
      specified, with LR being spilled between the t2LoopDec and the t2LoopEnd
      forcing the entire loop to be reverted late in the backend. As they will
      eventually become a single instruction, this patch introduces a
      t2LoopEndDec which is the combination of the two, combined before
      registry allocation to make sure this does not fail.
      
      Unfortunately this instruction is a terminator that produces a value
      (and also branches - it only produces the value around the branching
      edge). So this needs some adjustment to phi elimination and the register
      allocator to make sure that we do not spill this LR def around the loop
      (needing to put a spill after the terminator). We treat the loop very
      carefully, making sure that there is nothing else like calls that would
      break it's ability to use LR. For that, this adds a
      isUnspillableTerminator to opt in the new behaviour.
      
      There is a chance that this could cause problems, and so I have added an
      escape option incase. But I have not seen any problems in the testing
      that I've tried, and not reverting Low overhead loops is important for
      our performance. If this does work then we can hopefully do the same for
      t2WhileLoopStart and t2DoLoopStart instructions.
      
      This patch also contains the code needed to convert or revert the
      t2LoopEndDec in the backend (which just needs a subs; bne) and the code
      pre-ra to create them.
      
      Differential Revision: https://reviews.llvm.org/D91358
      0447f350
    • Martin Storsjö's avatar
      [llvm-rc] Handle driveless absolute windows paths when loading external files · 879c15e8
      Martin Storsjö authored
      When llvm-rc loads an external file, it looks for it relative to
      a number of include directories and the current working directory.
      If the path is considered absolute, llvm-rc tries to open the
      filename as such, and doesn't try to open it relative to other
      paths.
      
      On Windows, a path name like "\dir\file" isn't considered absolute
      as it lacks the drive name, but by appending it on top of the search
      dirs, it's not found.
      
      LLVM's sys::path::append just appends such a path (same with a properly
      absolute posix path) after the paths it's supposed to be relative to.
      
      This fix doesn't handle the case if the resource script and the
      external file are on a different drive than the current working
      directory; to fix that, we'd have to make LLVM's sys::path::append
      handle appending fully absolute and partially absolute paths (ones
      lacking a drive prefix but containing a root directory), or switch
      to C++17's std::filesystem.
      
      Differential Revision: https://reviews.llvm.org/D92558
      879c15e8
    • Alexey Lapshin's avatar
      [dsymutil][DWARFLinker][NFC] Make interface of AddressMap more general. · 693da9df
      Alexey Lapshin authored
      Current interface of AddressMap assumes that relocations exist.
      That is correct for not-linked object file but is not correct
      for linked executable. This patch changes interface in such way
      that AddressMap could be used not only with not-linked object files:
      
      hasValidRelocationAt()
      
      replaced with:
      
      hasLiveMemoryLocation()
      hasLiveAddressRange()
      
      Differential Revision: https://reviews.llvm.org/D87723
      693da9df
    • Mirko Brkusanin's avatar
      [AMDGPU] Resolve issues when picking between ds_read/write and ds_read2/write2 · 0c7cce54
      Mirko Brkusanin authored
      Both ds_read_b128 and ds_read2_b64 are valid for 128bit 16-byte aligned
      loads but the one that will be selected is determined either by the order in
      tablegen or by the AddedComplexity attribute. Currently ds_read_b128 has
      priority.
      
      While ds_read2_b64 has lower alignment requirements, we cannot always
      restrict ds_read_b128 to 16-byte alignment because of unaligned-access-mode
      option. This was causing ds_read_b128 to be selected for 8-byte aligned
      loads regardles of chosen access mode.
      
      To resolve this we use two patterns for selecting ds_read_b128. One
      requires alignment of 16-byte and the other requires
      unaligned-access-mode option.
      
      Same goes for ds_write2_b64 and ds_write_b128.
      
      Differential Revision: https://reviews.llvm.org/D92767
      0c7cce54
    • Nathan James's avatar
      [clang-tidy][NFC] Use moves instead of copies when constructing OptionsProviders. · bedf3a0f
      Nathan James authored
      Reviewed By: aaron.ballman
      
      Differential Revision: https://reviews.llvm.org/D92267
      bedf3a0f
    • Raphael Isemann's avatar
      [lldb] Allow LLDB to automatically retry a failed expression with an imported std C++ module · 95860828
      Raphael Isemann authored
      By now LLDB can import the 'std' C++ module to improve expression evaluation,
      but there are still a few problems to solve before we can do this by default.
      One is that importing the C++ module is slightly slower than normal expression
      evaluation (mostly because the disk access and loading the initial lookup data
      is quite slow in comparison to the barebone Clang setup the rest of the LLDB
      expression evaluator is usually doing). Another problem is that some complicated
      types in the standard library aren't fully supported yet by the ASTImporter, so
      we end up types that fail to import (which usually appears to the user as if the
      type is empty or there is just no result variable).
      
      To still allow people to adopt this mode in their daily debugging, this patch
      adds a setting that allows LLDB to automatically retry failed expression with a
      loaded C++ module. All success expressions will behave exactly as they would do
      before this patch. Failed expressions get a another parse attempt if we find a
      usable C++ module in the current execution context. This way we shouldn't have
      any performance/parsing regressions in normal debugging workflows, while the
      debugging workflows involving STL containers benefit from the C++ module type
      info.
      
      This setting is off by default for now with the intention to enable it by
      default on macOS soon-ish.
      
      The implementation is mostly just extracting the existing parse logic into its
      own function and then calling the parse function again if the first evaluation
      failed and we have a C++ module to retry the parsing with.
      
      Reviewed By: shafik, JDevlieghere, aprantl
      
      Differential Revision: https://reviews.llvm.org/D92784
      95860828
    • mydeveloperday's avatar
      [clang-format] NFC Add release note for IndentPragmas · 95616a03
      mydeveloperday authored
      Add additional release note to announce new clang-format option added during {D92753}
      95616a03
    • mydeveloperday's avatar
      [clang-format] Add IndentPragma style to eliminate common clang-format off scenario · e9e6e3b3
      mydeveloperday authored
      A quick search of github.com, shows one common scenario for excessive use of //clang-format off/on is the indentation of #pragma's, especially around the areas of loop optimization or OpenMP
      
      This revision aims to help that by introducing an `IndentPragmas` style, the aim of which is to keep the pragma at the current level of scope
      
      ```
          for (int i = 0; i < 5; i++) {
      // clang-format off
              #pragma HLS UNROLL
              // clang-format on
              for (int j = 0; j < 5; j++) {
      // clang-format off
                  #pragma HLS UNROLL
                  // clang-format on
           ....
      ```
      
      can become
      
      ```
          for (int i = 0; i < 5; i++) {
              #pragma HLS UNROLL
              for (int j = 0; j < 5; j++) {
                  #pragma HLS UNROLL
              ....
      ```
      
      This revision also support working alongside the `IndentPPDirective` of `BeforeHash` and `AfterHash` (see unit tests for examples)
      
      Reviewed By: curdeius
      
      Differential Revision: https://reviews.llvm.org/D92753
      e9e6e3b3
    • mydeveloperday's avatar
      [clang-format] PR42434 Remove preprocessor and pragma lines from ObjectiveC guess · 7b2d62fd
      mydeveloperday authored
      clang-format see the `disable:` in   __pragma(warning(disable:)) as ObjectiveC method call
      
      Remove any line starting with `#` or __pragma line from being part of the ObjectiveC guess
      
      https://bugs.llvm.org/show_bug.cgi?id=42434
      
      Reviewed By: curdeius, krasimir
      
      Differential Revision: https://reviews.llvm.org/D92922
      7b2d62fd
    • mydeveloperday's avatar
      [clang-format] [NFC] Fix spelling and grammatical errors in IncludeBlocks text · 254677e9
      mydeveloperday authored
      Fix spelling mistake
      Leave space after `.` and before beginning of next sentence
      Reword it slightly to try and make it more readable.
      Ensure RST is updated correctly (it generated a change)
      
      Reviewed By: HazardyKnusperkeks, curdeius
      
      Differential Revision: https://reviews.llvm.org/D92822
      254677e9
    • David Green's avatar
      [ARM] Additional test for Min loop. NFC · 5abbf20f
      David Green authored
      5abbf20f
    • David Green's avatar
      [ARM] Remove copies from low overhead phi inductions. · b0ce615b
      David Green authored
      The phi created in a low overhead loop gets created with a default
      register class it seems. There are then copied inserted between the low
      overhead loop pseudo instructions (which produce/consume GPRlr
      instructions) and the phi holding the induction. This patch removes
      those as a step towards attempting to make t2LoopDec and t2LoopEnd a
      single instruction, and appears useful in it's own right as shown in the
      tests.
      
      Differential Revision: https://reviews.llvm.org/D91267
      b0ce615b
    • Alex Zinenko's avatar
      [mlir] Explicitly track branch instructions in translation to LLVM IR · db884daf
      Alex Zinenko authored
      The current implementation of the translation to LLVM IR relies on the
      existence of a one-to-one mapping between MLIR blocks and LLVM IR basic blocks
      in order to configure PHI nodes with appropriate source blocks. The one-to-one
      mapping model is broken in presence of OpenMP operations that use LLVM's
      OpenMPIRBuilder, which produces multiple blocks under the hood. This can lead
      to invalid LLVM IR being emitted if OpenMPIRBuilder moved the branch operation
      into a basic block different from the one it was originally created in;
      specifically, a block that is not a direct predecessor could be used in the PHI
      node. Instead, keep track of the mapping between MLIR LLVM dialect branch
      operations and their LLVM IR counterparts and take the parent basic block of
      the LLVM IR instruction at the moment of connecting the PHI nodes to
      predecessors.
      
      This behavior cannot be triggered as of now, but will be once we introduce the
      conversion of OpenMP workshare loops.
      
      Reviewed By: kiranchandramohan
      
      Differential Revision: https://reviews.llvm.org/D92845
      db884daf
    • Jun Ma's avatar
      [TruncInstCombine] Remove scalable vector restriction · 137674f8
      Jun Ma authored
      Differential Revision: https://reviews.llvm.org/D92819
      137674f8