1. Aug 06, 2022
    • Craig Topper's avatar
      [RISCV] Don't use li+sh3add for constants that can use lui+add. · 75c64c7c
      Craig Topper authored
      If we're adding a constant that can't use addi we try a few tricks,
      one of which is using li+sh3add. We should not do this if lui+add
      would work. For example adding 8192. Using sh3add prevents folding
      a sext.w to form addw, thus increasing instruction count.
      75c64c7c
    • Tobias Hieta's avatar
      [llvm][macos] Fix usage of std::shared_mutex on old macOS SDK versions · 4b8db17c
      Tobias Hieta authored
      When setting CMAKE_CXX_STANDARD to 17 and targeting a macOS version
      under 10.12 the ifdefs would try to use std::shared_mutex because
      the of the C++ standard. This should also check the targeted SDK.
      
      See discussion in: https://reviews.llvm.org/D130689
      
      Reviewed By: nikic
      
      Differential Revision: https://reviews.llvm.org/D131063
      4b8db17c
    • Rashmi Mudduluru's avatar
      fixes clang-tidy/checks/list.rst: a line was accidentally removed in... · 13bc7131
      Rashmi Mudduluru authored
      fixes clang-tidy/checks/list.rst: a line was accidentally removed in 95a92995
      13bc7131
    • Ben Langmuir's avatar
      [clang][modules] Don't depend on sharing FileManager during module build · fb89cc0d
      Ben Langmuir authored
      Sharing the FileManager between the importer and the module build should
      only be an optimization. Add a cc1 option -fno-modules-share-filemanager
      to allow us to test this. Fix the path to modulemap files, which
      previously depended on the shared FileManager when using path mapped to
      an external file in a VFS.
      
      Differential Revision: https://reviews.llvm.org/D131076
      fb89cc0d
    • Ben Langmuir's avatar
      [clang] Fix redirection behaviour for cached FileEntryRef · d038bb19
      Ben Langmuir authored
      In 6a79e2ff we changed Filemanager::getEntryRef() to return the
      redirecting FileEntryRef instead of looking through the redirection.
      This commit fixes the case when looking up a cached file path to also
      return the redirecting FileEntryRef. This mainly affects the behaviour
      of calling getNameAsRequested() on the resulting entry ref.
      
      Differential Revision: https://reviews.llvm.org/D131273
      d038bb19
    • Jack Kirk's avatar
      [CUDA] Fixed sm version constrain for __bmma_m8n8k128_mma_and_popc_b1. · 3e0e5568
      Jack Kirk authored
      As stated in
      https://docs.nvidia.com/cuda/parallel-thread-execution/index.html#warp-level-matrix-instructions-wmma-mma:
      ".and operation in single-bit wmma requires sm_80 or higher."
      
      tra@: Fixed a bug in builtins-nvptx-mma.py test generator and regenerated the tests.
      
      Differential Revision: https://reviews.llvm.org/D131265
      3e0e5568
    • Philip Reames's avatar
      [RISCVInsertVSETVLI] Remove an unsound optimization · 9a9848f4
      Philip Reames authored
      This fixes a bug reported privately by @craig.topper. Here's an example which illustrates the problem:
      
      vsetivli a1, a0, e32, m1, ta, mu # both DefInfo and PrevInfo
      vsetivli a2, a1, e32, m4, ta, mu
      
      With the unsound result being:
      
      vsetivli a1, a0, e32, m1, ta, mu
      vsetivli a2, a0, e32, m4, ta, mu
      
      Consider the case where this is running on a machine with VLEN=512,. For this case, the VLMAXs are 16 and 64 respectively.
      
      Consider for a0 = 33. The correct result is: a1 = 16, and a2 = 16
      
      After the unsound optimization: a1 = 16 and a2 = 33
      
      This particular example used VLMAXs which differed by more than a power of two. With a difference of only one power of two, there's another form of this bug which involves the AVL < 2 x VLMAX special case, but that ones more complicated to construct as many examples turn out accidentally sound.
      
      This patch takes the approach of simply removing the unsound optimization, but there are multiple sound sub-cases of it. I plan to return to at least a couple of them, but figured it was cleaner to remove the unsound optimization (for ease of backporting), and then review the new optimizations on their own.
      
      Differential Revision: https://reviews.llvm.org/D131264
      9a9848f4
    • Zhaoshi Zheng's avatar
      [WinEH][ARM64] Split Unwind Info for Fucntions Larger than 1MB · 99e50e58
      Zhaoshi Zheng authored
      Create function segments and emit unwind info of them.
      
      A segment must be less than 1MB and no prolog or epilog is splitted between two
      segments.
      
      This patch should generate correct, though not optimal, unwind info for large
      functions. Currently it only generate pacted info (.pdata) only for functions
      that are less than 1MB (single-segment functions). This is NFC from before this
      patch.
      
      The next step is to enable (.pdata) only unwind info for the first segment or
      segments that have neither prolog or epilog in a multi-segment function.
      
      Another future work item is to further split segments that require more than 255
      code words or have more than 65535 epilogs.
      
      Reference:
      https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling#function-fragments
      
      Differential Revision: https://reviews.llvm.org/D130049
      99e50e58
    • Slava Zakharin's avatar
      [flang] Propagate lowering options from driver. · f1eb945f
      Slava Zakharin authored
      This commit addresses concerns raised in D129497.
      
      Propagate lowering options from driver to expressions lowering
      via AbstractConverter instance. A single use case so far is
      using optimized TRANSPOSE lowering with O1/O2/O3.
      
      bbc does not support optimization level switches, so it uses
      default LoweringOptions (e.g. optimized TRANSPOSE lowering
      is enabled by default, but an engineering -opt-transpose=false
      option can still override this).
      
      Differential Revision: https://reviews.llvm.org/D130204
      f1eb945f
    • Jonas Devlieghere's avatar
      [lldb] Improve EXC_RESOURCE exception reason · 9c81b743
      Jonas Devlieghere authored
      Jason noted that the stop message we print for a memory high water mark
      notification (EXC_RESOURCE) could be clearer. Currently, the stop
      reason looks like this:
      
        * thread #3, queue = 'com.apple.CFNetwork.LoaderQ', stop reason =
          EXC_RESOURCE RESOURCE_TYPE_MEMORY (limit=14 MB, unused=0x0)
      
      It's hard to read the message because the exception and the type
      (EXC_RESOURCE RESOURCE_TYPE_MEMORY) blend together. Additionally, the
      "observed=0x0" should not be printed for memory limit exceptions.
      
      I wanted to continue to include the resource type from
      <kern/exc_resource.h> while also explaining what it actually is. I used
      the wording from the comments in the header. With this path, the stop
      reason now looks like this:
      
        * thread #5, stop reason = EXC_RESOURCE (RESOURCE_TYPE_MEMORY: high
          watermark memory limit exceeded) (limit=14 MB)
      
      rdar://40466897
      
      Differential revision: https://reviews.llvm.org/D131130
      9c81b743
    • Jeff Bailey's avatar
      [libc] Update look and feel of libc.llvm.org · f493b21e
      Jeff Bailey authored
      This design is borrowed from the lldb folks (thank you!) to declutter
      the page.
      
       * The version number at the top is removed.
       * Links are pushed over to a sidebar
       * The sidebar has headings
      
      There are other minor changes:
      
      * The warning about this project not being ready is now an RST "warning"
      * Links to the Bug Reports and the Source Code are Added
      * Refer to this project as either "The LLVM C LIbrary" or "The libc"
      
      Tested:
      Built locally
      
      Reviewed By: sivachandra
      
      Differential Revision: https://reviews.llvm.org/D131242
      f493b21e
    • Jim Ingham's avatar
      Reapply the commits to enable accurate hit-count detection for watchpoints. · 0948f1cf
      Jim Ingham authored
      This commit combines the initial commit (7c240de609af), a fix for x86_64 Linux
      (3a0581501e76) and a fix for thinko in a last minute rewrite that I really
      should have run the testsuite on.
      
      Also, make sure that all the "I need to step over watchpoint" plans execute
      before we call a public stop.  Otherwise, e.g. if you have N watchpoints and
      a Signal, the signal stop info will get us to stop with the watchpoints in a
      half-done state.
      
      Differential Revision: https://reviews.llvm.org/D130674
      0948f1cf
    • Eugene Zhulenev's avatar
      [mlir] Use SymbolUserOpInterface in LLVM::AddressOfOp verifier · 292e8ed4
      Eugene Zhulenev authored
      Reviewed By: Mogball
      
      Differential Revision: https://reviews.llvm.org/D131271
      292e8ed4
    • Lei Zhang's avatar
      [mlir][spirv] Add default Vulkan memory space to storage class mapping · 1f7544a6
      Lei Zhang authored
      Reviewed By: ThomasRaoux, kuhar
      
      Differential Revision: https://reviews.llvm.org/D131128
      1f7544a6
    • Lei Zhang's avatar
      [mlir][spirv] Add a pass to map memref memory space · 713f85d5
      Lei Zhang authored
      MemRef types now can carry an attribute to represent the memory
      space. Still, upper layers in the compilation stack mostly use
      nuemric values. They don't mean much (other than differentiating
      separate memory domains) in MLIR's multi-level settings. Those
      numeric memory space inside MemRef types need to be translated
      into concrete SPIR-V storage classes during lowering to pin down
      to concrete memory types.
      
      Thus far we have been hardcoding an arbitrary mapping from memory
      space to storage class for converting MemRef types. This works fine
      for only targeting Vulkan; it falls apart if we want to target other
      SPIR-V consumers like OpenCL, as different consumers might want
      different storage classes for the buffer/variable of the same
      lifetime. For example, StorageClass in Vulkan vs. CrossWorkgroup
      in OpenCL.
      
      So putting up a new pass to let the user to control how to map
      MemRef memory spaces into SPIR-V storage classes. This provides
      more flexibility and can address the awkwardness in the current
      SPIR-V type converter. This pass should be the prelimiary step
      towards lowering MemRef related types/ops into SPIR-V.
      
      Reviewed By: mravishankar
      
      Differential Revision: https://reviews.llvm.org/D130317
      713f85d5
    • Sanjay Patel's avatar
      [InstSimplify] make uses of isImpliedCondition more efficient (NFCI) · b63fc26d
      Sanjay Patel authored
      As suggested in the post-commit comments for 019d7619,
      this makes the usage symmetric with the 'and' patterns and should
      be more efficient.
      b63fc26d
    • Paul Walker's avatar
      [SVE] Expand DUPM patterns to handle all integer vector types. · 0533c39a
      Paul Walker authored
      NOTE: i8 vector splats are ignored because the immediate range of
      DUP already has full coverage.
      
      Differential Revision: https://reviews.llvm.org/D131078
      0533c39a
  2. Aug 05, 2022