1. Nov 25, 2020
  2. Nov 24, 2020
    • Sam McCall's avatar
      [clangd] Mention when CXXThis is implicit in exposed AST. · 9e83d0bc
      Sam McCall authored
      Seeing an implicit this in the AST is pretty confusing I think.
      While here, also mention when `this` is const.
      
      Differential Revision: https://reviews.llvm.org/D91868
      9e83d0bc
    • Nico Weber's avatar
      Fix driver test from e16c0a9a · 5ce85e66
      Nico Weber authored
      The test failed silently if lld wasn't built alongside clang.
      But the test uses -###, so the "invalid linker name in -fuse-ld=lld"
      diag didn't make clang fail, and something else happened to match
      "-demangle", so the test passed.
      
      To fix, pass -B to a directory with two empty +x files (which works
      on non-Windows), and look for `"-demangle"` instead of just `-demangle`.
      Also force linker_version to 0 and pass a darwin triple.
      
      Differential Revision: https://reviews.llvm.org/D92028
      5ce85e66
    • Evgeny Leviant's avatar
      9c3b68dc
    • diggerlin's avatar
      [NFC][AIX][XCOFF] change function name from getNumofGPRsSaved to getNumOfGPRsSaved · c80fbdf2
      diggerlin authored
      change function name from getNumofGPRsSaved to getNumOfGPRsSaved for class XCOFFTracebackTable
      
      Reviewers: Jason Liu
      Differential Revision: https://reviews.llvm.org/D91882
      c80fbdf2
    • Evgeny Leviant's avatar
      [MC][ARM] Fix number of operands of tMOVSr · a6a6d11c
      Evgeny Leviant authored
      Differential revision: https://reviews.llvm.org/D92029
      a6a6d11c
    • Nicolas Vasilache's avatar
      [mlir] NFC - Expose an OffsetSizeAndStrideOpInterface · a8de412f
      Nicolas Vasilache authored
      This revision will make it easier to create new ops base on the strided memref abstraction outside of the std dialect.
      
      OffsetSizeAndStrideOpInterface is an interface for ops that allow specifying mixed dynamic and static offsets, sizes and strides variadic operands.
          Ops that implement this interface need to expose the following methods:
            1. `getArrayAttrRanks` to specify the length of static integer
                attributes.
            2. `offsets`, `sizes` and `strides` variadic operands.
            3. `static_offsets`, resp. `static_sizes` and `static_strides` integer
                array attributes.
      
          The invariants of this interface are:
            1. `static_offsets`, `static_sizes` and `static_strides` have length
                exactly `getArrayAttrRanks()`[0] (resp. [1], [2]).
            2. `offsets`, `sizes` and `strides` have each length at most
               `getArrayAttrRanks()`[0] (resp. [1], [2]).
            3. if an entry of `static_offsets` (resp. `static_sizes`,
               `static_strides`) is equal to a special sentinel value, namely
               `ShapedType::kDynamicStrideOrOffset` (resp. `ShapedType::kDynamicSize`,
               `ShapedType::kDynamicStrideOrOffset`), then the corresponding entry is
               a dynamic offset (resp. size, stride).
            4. a variadic `offset` (resp. `sizes`, `strides`) operand  must be present
               for each dynamic offset (resp. size, stride).
      
          This interface is useful to factor out common behavior and provide support
          for carrying or injecting static behavior through the use of the static
          attributes.
      
      Differential Revision: https://reviews.llvm.org/D92011
      a8de412f
    • Nico Weber's avatar
      clang+lld: Improve clang+ld.darwinnew.lld interaction, pass -demangle · e16c0a9a
      Nico Weber authored
      This patch:
      - adds an ld64.lld.darwinnew symlink for lld, to go with f2710d4b,
        so that `clang -fuse-ld=lld.darwinnew` can be used to test new
        Mach-O lld while it's in bring-up. (The expectation is that we'll
        remove this again once new Mach-O lld is the defauld and only Mach-O
        lld.)
      - lets the clang driver know if the linker is lld (currently
        only triggered if `-fuse-ld=lld` or `-fuse-ld=lld.darwinnew` is
        passed). Currently only used for the next point, but could be used
        to implement other features that need close coordination between
        compiler and linker, e.g. having a diag for calling `clang++` instead
        of `clang` when link errors are caused by a missing C++ stdlib.
      - lets the clang driver pass `-demangle` to Mach-O lld (both old and
        new), in addition to ld64
      - implements -demangle for new Mach-O lld
      - changes demangleItanium() to accept _Z, __Z, ___Z, ____Z prefixes
        (and updates one test added in D68014). Mach-O has an extra
        underscore for symbols, and the three (or, on Mach-O, four)
        underscores are used for block names.
      
      Differential Revision: https://reviews.llvm.org/D91884
      e16c0a9a
    • Ayal Zaks's avatar
      [LV] Keep Primary Induction alive when folding tail by masking · 32d9a386
      Ayal Zaks authored
      Fix PR47390.
      
      The primary induction should be considered alive when folding tail by masking,
      because it will be used by said masking; even when it may otherwise appear
      useless: feeding only its own 'bump', which is correctly considered dead, and
      as the 'bump' of another induction variable, which may wrongfully want to
      consider its bump = the primary induction, dead.
      
      Differential Revision: https://reviews.llvm.org/D92017
      32d9a386
    • Yaxun (Sam) Liu's avatar
      [HIP] Fix regressions due to fp contract change · cb08558c
      Yaxun (Sam) Liu authored
      Recently HIP toolchain made a change to use clang instead of opt/llc to do compilation
      (https://reviews.llvm.org/D81861). The intention is to make HIP toolchain canonical like
      other toolchains.
      
      However, this change introduced an unintentional change regarding backend fp fuse
      option, which caused regressions in some HIP applications.
      
      Basically before the change, HIP toolchain used clang to generate bitcode, then use
      opt/llc to optimize bitcode and generate ISA. As such, the amdgpu backend takes
      the default fp fuse mode which is 'Standard'. This mode respect contract flag of
      fmul/fadd instructions and do not fuse fmul/fadd instructions without contract flag.
      
      However, after the change, HIP toolchain now use clang to generate IR, do optimization,
      and generate ISA as one process. Now amdgpu backend fp fuse option is determined
      by -ffp-contract option, which is 'fast' by default. And this -ffp-contract=fast language option
      is translated to 'Fast' fp fuse option in backend. Suddenly backend starts to fuse fmul/fadd
      instructions without contract flag.
      
      This causes wrong result for some device library functions, e.g. tan(-1e20), which should
      return 0.8446, now returns -0.933. What is worse is that since backend with 'Fast' fp fuse
      option does not respect contract flag, there is no way to use #pragma clang fp contract
      directive to enforce fp contract requirements.
      
      This patch fixes the regression by introducing a new value 'fast-honor-pragmas' for -ffp-contract
      and use it for HIP by default. 'fast-honor-pragmas' is equivalent to 'fast' in frontend but
      let the backend to use 'Standard' fp fuse option. 'fast-honor-pragmas' is useful since 'Fast'
      fp fuse option in backend does not honor contract flag, it is of little use to HIP
      applications since all code with #pragma STDC FP_CONTRACT or any IR from a
      source compiled with -ffp-contract=on is broken.
      
      Differential Revision: https://reviews.llvm.org/D90174
      cb08558c
    • Hans Wennborg's avatar
    • Ulysse Beaugnon's avatar
      [MLIR] Fix TableGen generator for attribute interfaces. · 1eded173
      Ulysse Beaugnon authored
      Use the correct interface base type name when generating attribute interfaces
      with TabeGen.
      
      Reviewed By: ftynse
      
      Differential Revision: https://reviews.llvm.org/D92023
      1eded173
    • Fraser Cormack's avatar
      [RISCV] Combine GREVI sequences · ca1f2f27
      Fraser Cormack authored
      This combine step performs the following type of transformation:
      
          rev.p a0, a0   # grevi a0, a0, 0b01
          rev2.n a0, a0  # grevi a0, a0, 0b10
          -->
          rev.n a0, a0   # grevi a0, a0, 0b11
      
      Reviewed By: craig.topper
      
      Differential Revision: https://reviews.llvm.org/D91877
      ca1f2f27
    • Kadir Cetinkaya's avatar
      [clangd] Fix shared-lib builds · f726101b
      Kadir Cetinkaya authored
      Differential Revision: https://reviews.llvm.org/D91859
      f726101b
    • Simon Pilgrim's avatar
      [IR] Constant::getAggregateElement - early-out for ScalableVectorType · 49e463ff
      Simon Pilgrim authored
      We can't call getNumElements() for ScalableVectorType types - just bail for now, although ConstantAggregateZero/UndefValue could return a reasonable value.
      
      Fixes crash shown in OSS-Fuzz #25272 https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25272
      49e463ff
    • Eugene Zhulenev's avatar
      [mlir] AsyncRuntime: fix concurrency bugs + fix exports in methods definitions · 3d95d1b4
      Eugene Zhulenev authored
      1. Move ThreadPool ownership to the runtime, and wait for the async tasks completion in the destructor.
      2. Remove MLIR_ASYNCRUNTIME_EXPORT from method definitions because they are unnecessary in .cpp files, as only function declarations need to be exported, not their definitions.
      3. Fix concurrency bugs in group emplace and potential use-after-free in token emplace.
      
      Tested internally 10k runs in `async.mlir` and `async-group.mlir`.
      
      Fixed: https://bugs.llvm.org/show_bug.cgi?id=48267
      
      Reviewed By: mehdi_amini
      
      Differential Revision: https://reviews.llvm.org/D91988
      3d95d1b4
    • Max Kazantsev's avatar
      Revert "[NFC][SCEV] Generalize monotonicity check for full and limited iteration space" · 02fdbc35
      Max Kazantsev authored
      This reverts commit 2734a9eb.
      
      This patch appeared to not be a NFC. It introduced an execution path where
      monotonicity check on limited space started relying in existing nsw/nuw
      flags, which is illegal. The motivating test will follow-up.
      02fdbc35
    • Evgeny Leviant's avatar
      [SchedModels] Improve diagnostics. NFC · a2b59048
      Evgeny Leviant authored
      a2b59048
    • Alexander Belyaev's avatar
    • AndreyChurbanov's avatar
      [OpenMP] fix asm code for for arm64 (AARCH64) for Darwin/macOS · 7b525422
      AndreyChurbanov authored
      Adjusted external reference for Darwin/AARCH64 link compatibility.
      Made size directive conditional only if __ELF__ defined.
      
      Patch by Michael_Pique <mpique@icloud.com>
      
      Differential Revision: https://reviews.llvm.org/D88252
      7b525422