1. Apr 22, 2022
    • Fangrui Song's avatar
      [LegacyPM] Remove GCOVProfilerLegacyPass · 409eb5dc
      Fangrui Song authored
      Using the legacy PM for the optimization pipeline was deprecated in 13.0.0.
      Following recent changes to remove non-core features of the legacy
      PM/optimization pipeline, remove GCOVProfilerLegacyPass.
      
      I have checked many LLVM users and only llvm-hs[1] uses the legacy gcov pass.
      
      [1]: https://github.com/llvm-hs/llvm-hs/issues/392
      
      Reviewed By: nikic
      
      Differential Revision: https://reviews.llvm.org/D123829
      409eb5dc
    • Ulrich Weigand's avatar
      Support z16 processor name · 1283ccb6
      Ulrich Weigand authored
      The recently announced IBM z16 processor implements the architecture
      already supported as "arch14" in LLVM.  This patch adds support for
      "z16" as an alternate architecture name for arch14.
      1283ccb6
    • Sam McCall's avatar
      [Frontend] avoid copy of PCH data when PrecompiledPreamble stores it in memory · 6e22dac2
      Sam McCall authored
      Instead of unconditionally copying the PCHBuffer into an ostream which can be
      backed either by a string or a file, just make the PCHBuffer itself the
      in-memory storage.
      
      Differential Revision: https://reviews.llvm.org/D124180
      6e22dac2
    • Haojian Wu's avatar
    • Ulrich Weigand's avatar
      [sanitizer] Fix prctl unit test on non-SMT systems · e4085a01
      Ulrich Weigand authored
      On systems where the kernel supports the PR_SCHED_CORE
      interface, but there is no SMT, the prctl call will set
      errno to ENODEV, which currently causes the test to fail.
      
      Fix by accepting ENODEV in addition to EINVAL.
      e4085a01
    • Fangrui Song's avatar
      [LegacyPM] Remove MemorySanitizerLegacyPass · d133538b
      Fangrui Song authored
      Using the legacy PM for the optimization pipeline was deprecated in 13.0.0.
      Following recent changes to remove non-core features of the legacy
      PM/optimization pipeline, remove MemorySanitizerLegacyPass.
      
      Differential Revision: https://reviews.llvm.org/D123894
      d133538b
    • Vasileios Porpodas's avatar
      [SLP] Refactoring isLegalBroadcastLoad() to use `ElementCount`. · 889588ee
      Vasileios Porpodas authored
      Replacing `unsigned` with `ElementCount` in the argument of `isLegalBroadcastLoad()`.
      This helps reduce the diff of a future SLP patch for AArch64.
      889588ee
    • Wael Yehia's avatar
      f296b4c4
    • chenglin.bi's avatar
      25aba1ab
    • Alex Zinenko's avatar
      0edb262d
    • Craig Topper's avatar
      [RISCV] Add special case to constant materialization to remove trailing zeros first. · 98b86689
      Craig Topper authored
      If there are fewer than 12 trailing zeros, we'll try to use an ADDI
      at the end of the sequence. If we strip trailing zeros and end the
      sequence with a SLLI we might find a shorter sequence.
      
      Differential Revision: https://reviews.llvm.org/D124148
      98b86689
    • Stanislav Mekhanoshin's avatar
      [AMDGPU] Refine 64 bit misaligned LDS ops selection · ac94073d
      Stanislav Mekhanoshin authored
      Here is the performance data:
      ```
      Using platform: AMD Accelerated Parallel Processing
      Using device: gfx900:xnack-
      
      ds_write_b64                       aligned by  8:  3.2 sec
      ds_write2_b32                      aligned by  8:  3.2 sec
      ds_write_b16 * 4                   aligned by  8:  7.0 sec
      ds_write_b8 * 8                    aligned by  8: 13.2 sec
      ds_write_b64                       aligned by  1:  7.3 sec
      ds_write2_b32                      aligned by  1:  7.5 sec
      ds_write_b16 * 4                   aligned by  1: 14.0 sec
      ds_write_b8 * 8                    aligned by  1: 13.2 sec
      ds_write_b64                       aligned by  2:  7.3 sec
      ds_write2_b32                      aligned by  2:  7.5 sec
      ds_write_b16 * 4                   aligned by  2:  7.1 sec
      ds_write_b8 * 8                    aligned by  2: 13.3 sec
      ds_write_b64                       aligned by  4:  4.6 sec
      ds_write2_b32                      aligned by  4:  3.2 sec
      ds_write_b16 * 4                   aligned by  4:  7.1 sec
      ds_write_b8 * 8                    aligned by  4: 13.3 sec
      ds_read_b64                        aligned by  8:  2.3 sec
      ds_read2_b32                       aligned by  8:  2.2 sec
      ds_read_u16 * 4                    aligned by  8:  4.8 sec
      ds_read_u8 * 8                     aligned by  8:  8.6 sec
      ds_read_b64                        aligned by  1:  4.4 sec
      ds_read2_b32                       aligned by  1:  7.3 sec
      ds_read_u16 * 4                    aligned by  1: 14.0 sec
      ds_read_u8 * 8                     aligned by  1:  8.7 sec
      ds_read_b64                        aligned by  2:  4.4 sec
      ds_read2_b32                       aligned by  2:  7.3 sec
      ds_read_u16 * 4                    aligned by  2:  4.8 sec
      ds_read_u8 * 8                     aligned by  2:  8.7 sec
      ds_read_b64                        aligned by  4:  4.4 sec
      ds_read2_b32                       aligned by  4:  2.3 sec
      ds_read_u16 * 4                    aligned by  4:  4.8 sec
      ds_read_u8 * 8                     aligned by  4:  8.7 sec
      
      Using platform: AMD Accelerated Parallel Processing
      Using device: gfx1030
      
      ds_write_b64                       aligned by  8:  4.4 sec
      ds_write2_b32                      aligned by  8:  4.3 sec
      ds_write_b16 * 4                   aligned by  8:  7.9 sec
      ds_write_b8 * 8                    aligned by  8: 13.0 sec
      ds_write_b64                       aligned by  1: 23.2 sec
      ds_write2_b32                      aligned by  1: 23.1 sec
      ds_write_b16 * 4                   aligned by  1: 44.0 sec
      ds_write_b8 * 8                    aligned by  1: 13.0 sec
      ds_write_b64                       aligned by  2: 23.2 sec
      ds_write2_b32                      aligned by  2: 23.1 sec
      ds_write_b16 * 4                   aligned by  2:  7.9 sec
      ds_write_b8 * 8                    aligned by  2: 13.1 sec
      ds_write_b64                       aligned by  4: 13.5 sec
      ds_write2_b32                      aligned by  4:  4.3 sec
      ds_write_b16 * 4                   aligned by  4:  7.9 sec
      ds_write_b8 * 8                    aligned by  4: 13.1 sec
      ds_read_b64                        aligned by  8:  3.5 sec
      ds_read2_b32                       aligned by  8:  3.4 sec
      ds_read_u16 * 4                    aligned by  8:  5.3 sec
      ds_read_u8 * 8                     aligned by  8:  8.5 sec
      ds_read_b64                        aligned by  1: 13.1 sec
      ds_read2_b32                       aligned by  1: 22.7 sec
      ds_read_u16 * 4                    aligned by  1: 43.9 sec
      ds_read_u8 * 8                     aligned by  1:  7.9 sec
      ds_read_b64                        aligned by  2: 13.1 sec
      ds_read2_b32                       aligned by  2: 22.7 sec
      ds_read_u16 * 4                    aligned by  2:  5.6 sec
      ds_read_u8 * 8                     aligned by  2:  7.9 sec
      ds_read_b64                        aligned by  4: 13.1 sec
      ds_read2_b32                       aligned by  4:  3.4 sec
      ds_read_u16 * 4                    aligned by  4:  5.6 sec
      ds_read_u8 * 8                     aligned by  4:  7.9 sec
      ```
      
      GFX10 exposes a different pattern for sub-DWORD load/store performance
      than GFX9. On GFX9 it is faster to issue a single unaligned load or
      store than a fully split b8 access, where on GFX10 even a full split
      is better. However, this is a theoretical only gain because splitting
      an access to a sub-dword level will require more registers and packing/
      unpacking logic, so ignoring this option it is better to use a single
      64 bit instruction on a misaligned data with the exception of 4 byte
      aligned data where ds_read2_b32/ds_write2_b32 is better.
      
      Differential Revision: https://reviews.llvm.org/D123956
      ac94073d
    • chenglin.bi's avatar
      [InstCombine] Add one use limitation for (X * C2) << C1 --> X * (C2 << C1) · b543d28d
      chenglin.bi authored
      Follow up D123453, add one-use limitation for
      (X * C2) << C1 --> X * (C2 << C1)
      to make consistent with
      lshr (mul nuw x, MulC), ShAmtC -> mul nuw x, (MulC >> ShAmtC)
      
      Reviewed By: spatel
      
      Differential Revision: https://reviews.llvm.org/D124183
      b543d28d
    • Jacob Lambert's avatar
      [clang][HIP] Updating driver to enable archive/bitcode to bitcode linking when... · afcc6baa
      Jacob Lambert authored
      [clang][HIP] Updating driver to enable archive/bitcode to bitcode linking when targeting HIPAMD toolchain
      
      Differential Revision: https://reviews.llvm.org/D124151
      afcc6baa
    • Sanjay Patel's avatar
      Revert "[InstCombine] C0 <<{nsw, nuw} (X - C1) --> (C0 >> C1) << X" · 8960ba74
      Sanjay Patel authored
      This reverts commit 5819f4a4.
      This caused bots to fail with a crash/assert during the fold,
      so some constraint was missed.
      8960ba74
    • chenglin.bi's avatar
    • Sam McCall's avatar
      [Frontend] Simplify PrecompiledPreamble::PCHStorage. NFC · af3fb071
      Sam McCall authored
      - Remove fiddly union, preambles are heavyweight
      - Remove fiddly move constructors in TempPCHFile and PCHStorage, use unique_ptr
      - Remove unneccesary accessors on PCHStorage
      - Remove trivial InMemoryStorage
      - Move implementation details into cpp file
      
      This is a prefactoring, followup change will change the in-memory PCHStorage to
      avoid extra string copies while creating it.
      
      Differential Revision: https://reviews.llvm.org/D124177
      af3fb071
    • Nico Weber's avatar
      [lld/mac] Warn that writing zippered outputs isn't implemented · 88984792
      Nico Weber authored
      A "zippered" dylib contains several LC_BUILD_VERSION load commands, usually
      one each for "normal" macOS and one for macCatalyst.
      
      These are usually created by passing something like
      
         -shared -target arm64-apple-macos -darwin-target-variant arm64-apple-ios13.1-macabi
      
      to clang, which turns it into
      
          -platform_version macos 12.0.0 12.3 -platform_version "mac catalyst" 14.0.0 15.4
      
      for the linker.
      
      ld64.lld can read these files fine, but it can't write them.  Before this
      change, it would just silently use the last -platform_version flag and ignore
      the rest.
      
      This change adds a warning that writing zippered dylibs isn't implemented yet
      instead.
      
      Sadly, parts of ld64.lld's test suite relied on the previous
      "silently use last flag" semantics for its test suite: `%lld` always expanded
      to `ld64.lld -platform_version macos 10.15 11.0` and tests that wanted a
      different value passed a 2nd `-platform_version` flag later on. But this now
      produces a warning if the platform passed to `-platform_version` is not `macos`.
      
      There weren't very many cases of this, so move these to use `%no-arg-lld` and
      manually pass `-arch`.
      
      Differential Revision: https://reviews.llvm.org/D124106
      88984792
    • Adam Czachorowski's avatar
      [clangd] Add beforeExecute() callback to FeatureModules. · ad46aaed
      Adam Czachorowski authored
      It runs immediatelly before FrontendAction::Execute() with a mutable
      CompilerInstance, allowing FeatureModules to register callbacks, remap
      files, etc.
      
      Differential Revision: https://reviews.llvm.org/D124176
      ad46aaed
    • Simon Pilgrim's avatar
      [X86] Add test case for Issue #54911 · f8a078f2
      Simon Pilgrim authored
      f8a078f2
  2. Apr 21, 2022