1. Aug 17, 2021
    • Sanjay Patel's avatar
      [InstSimplify] add tests for min/max idioms; NFC · ba048518
      Sanjay Patel authored
      (cherry picked from commit 9b942a54)
      ba048518
    • Joseph Huber's avatar
      [OpenMP]Fix PR50336: Remove temporary files in the offload bundler tool · 0dd4f002
      Joseph Huber authored
      Temporary files created by the offloading device toolchain are not removed
      after compilation when using a two-step compilation. The offload-bundler uses a
      different filename for the device binary than the `.o` file present in the
      Job's input list. This is not listed as a temporary file so it is never
      removed. This patch explicitly adds the device binary as a temporary file to
      consume it. This fixes PR50336.
      
      Reviewed By: jdoerfert
      
      Differential Revision: https://reviews.llvm.org/D107668
      
      (cherry picked from commit 01d59c0d)
      0dd4f002
    • David Sherwood's avatar
      [LoopVectorize] Improve vectorisation of some intrinsics by treating them as uniform · a57d9811
      David Sherwood authored
      This patch adds more instructions to the Uniforms list, for example certain
      intrinsics that are uniform by definition or whose operands are loop invariant.
      This list includes:
      
        1. The intrinsics 'experimental.noalias.scope.decl' and 'sideeffect', which
        are always uniform by definition.
        2. If intrinsics 'lifetime.start', 'lifetime.end' and 'assume' have
        loop invariant input operands then these are also uniform too.
      
      Also, in VPRecipeBuilder::handleReplication we check if an instruction is
      uniform based purely on whether or not the instruction lives in the Uniforms
      list. However, there are certain cases where calls to some intrinsics can
      be effectively treated as uniform too. Therefore, we now also treat the
      following cases as uniform for scalable vectors:
      
        1. If the 'assume' intrinsic's operand is not loop invariant, then we
        are free to treat this as uniform anyway since it's only a performance
        hint. We will get the benefit for the first lane.
        2. When the input pointers for 'lifetime.start' and 'lifetime.end' are loop
        variant then for scalable vectors we assume these still ultimately come
        from the broadcast of an alloca. We do not support scalable vectorisation
        of loops containing alloca instructions, hence the alloca itself would
        be invariant. If the pointer does not come from an alloca then the
        intrinsic itself has no effect.
      
      I have updated the assume test for fixed width, since we now treat it
      as uniform:
      
        Transforms/LoopVectorize/assume.ll
      
      I've also added new scalable vectorisation tests for other intriniscs:
      
        Transforms/LoopVectorize/scalable-assume.ll
        Transforms/LoopVectorize/scalable-lifetime.ll
        Transforms/LoopVectorize/scalable-noalias-scope-decl.ll
      
      Differential Revision: https://reviews.llvm.org/D107284
      
      (cherry picked from commit 3fd96e1b)
      a57d9811
    • David Sherwood's avatar
      [NFC] Clean up tests in test/Transforms/LoopVectorize/assume.ll · 740f0821
      David Sherwood authored
      The tests previously had lots of unnecessary CHECK lines, where
      all we really need to check is the presence (or absence) of the
      assume intrinsic and the correct input operands.
      
      Differential Revision: https://reviews.llvm.org/D107157
      
      (cherry picked from commit 1172a8a7)
      740f0821
    • Jez Ng's avatar
      [lld-macho] Fill out release notes for 13.x · 1bbe8ef8
      Jez Ng authored
      I probably missed out some things, given how much work was done in the
      last few months...
      
      Reviewed By: #lld-macho, oontvoo
      
      Differential Revision: https://reviews.llvm.org/D107922
      1bbe8ef8
  2. Aug 16, 2021
  3. Aug 13, 2021
    • Rainer Orth's avatar
      [ELF] Don't emit SHF_GNU_RETAIN on Solaris · aac4fe38
      Rainer Orth authored
      The introduction of `SHF_GNU_RETAIN` has caused massive problems on Solaris.
      
      Initially, as reported in Bug 49437, it caused dozens of testsuite failures
      on both sparc and x86.  The objects were marked as `ELFOSABI_NONE`, but
      `SHF_GNU_RETAIN` is a GNU extension. In the native Solaris ABI, that flag
      (in the range for OS-specific values) is `SHF_SUNW_ABSENT` with a
      completely different semantics, which confuses Solaris `ld` very much.
      
      Later, the objects became (correctly) marked `ELFOSABI_GNU`, which Solaris
      `ld` doesn't support, causing it to SEGV and break the build.  The linker
      is currently being hardened to not accept non-native OS ABIs to avoid this.
      
      The need for linker support is already documented in
      `clang/include/clang/Basic/AttrDocs.td`, but not currently checked.
      
      This patch avoids all this by not emitting `SHF_GNU_RETAIN` on Solaris at all.
      
      Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and
      `x86_64-pc-linux-gnu`.
      
      Differential Revision: https://reviews.llvm.org/D107747
      
      (cherry picked from commit 7bbbf295)
      aac4fe38
    • Petr Hosek's avatar
      [profile] Fix profile merging with binary IDs · a6c14fba
      Petr Hosek authored
      This fixes support for merging profiles which broke as a consequence
      of e50a3884. The issue was missing
      adjustment in merge logic to account for the binary IDs which are
      now included in the raw profile just after header.
      
      In addition, this change also:
      * Includes the version in module signature that's used for merging
      to avoid accidental attempts to merge incompatible profiles.
      * Moves the binary IDs size field after version field in the header
      as was suggested in the review.
      
      Differential Revision: https://reviews.llvm.org/D107143
      
      (cherry picked from commit 83302c84)
      a6c14fba
  4. Aug 12, 2021
  5. Aug 11, 2021
  6. Aug 10, 2021
  7. Aug 07, 2021