1. Jun 28, 2023
  2. Jun 27, 2023
    • LLVM GN Syncbot's avatar
      [gn build] Port 58056ae2 · d2e7d3e6
      LLVM GN Syncbot authored
      d2e7d3e6
    • Simon Tatham's avatar
      Reland: [ELFAttributeParser] Skip unknown vendor subsections. · cb1d6ea8
      Simon Tatham authored
      An .ARM.attributes section is divided into subsections, each labelled
      with a vendor name. There is one standardised vendor name, which must
      be used for all attributes that affect compatibility. Subsections
      labelled with other vendor names can be used for optimisation
      purposes, but it has to be safe for an object file consumer to ignore
      them if it doesn't recognise the vendor name.
      
      LLD currently terminates parsing of the whole attributes section as
      soon as it encounters a subsection with a vendor name it doesn't
      recognise (which is anything other than the standard one). This can
      prevent it from detecting compatibility issues, if a standard
      subsection followed the vendor-specific one.
      
      This patch modifies the attribute parser so that unrecognised vendor
      subsections are silently skipped, and the subsections beyond them are
      still processed.
      
      (Relanded with no change from the original commit 8f208edd. I
      reverted it in 949bb7e4 due to widespread buildbot breakage,
      failing to notice that 975f71fa had already fixed the failing
      unit test. Also, the *revert* caused at least one buildbot to fail,
      because I switched the affected lld test to making %t a directory, and
      then the reverted version tried to treat it as a file without cleaning
      the output directory first.)
      
      Differential Revision: https://reviews.llvm.org/D153335
      cb1d6ea8
    • Takuya Shimizu's avatar
      [clang][ExprConstant] Fix display of syntactically-invalid note for member function calls · f6be96aa
      Takuya Shimizu authored
      This patch makes the display of member function calls more true to the user-written code by making use of the syntactical structure of the function calls.
      This patch also changes the display of conventional value-based printing from arrow operator to dot operator.
      This avoids the syntactical invalidness in notes previously caused by the display of & operator
      (lack of parentheses and reference of rvalue)
      
      Fixes https://github.com/llvm/llvm-project/issues/57081
      
      Reviewed By: cjdb
      Differential Revision: https://reviews.llvm.org/D151720
      f6be96aa
    • Igor Kirillov's avatar
      Fix the ComplexDeinterleaving bug when handling mixed reductions. · 1fce8df5
      Igor Kirillov authored
      Add a missing check that ensures that ComplexDeinterleaving for reduction
      is only analyzed for Real and Imaginary Instructions of the same type.
      
      Differential Revision: https://reviews.llvm.org/D153862
      1fce8df5
    • Youngsuk Kim's avatar
      [clang] Replace uses of CGBuilderTy::CreateElementBitCast (NFC) · 474ec694
      Youngsuk Kim authored
      Partial progress towards replacing `CreateElementBitCast`, as it no
      longer does what its name suggests. Either replace its uses with
      `Address::withElementType()`, or remove them if no longer needed.
      
      Reviewed By: barannikov88, nikic
      
      Differential Revision: https://reviews.llvm.org/D153314
      474ec694
    • Jeremy Morse's avatar
      [DebugInfo][InstrRef] Instrument x86 CMOV conversion to preserve variable values · 2325e011
      Jeremy Morse authored
      X86's CMOV conversion transforms CMOV instructions into control flow between
      blocks, meaning the value is computed by a PHI rather than a "real" machine
      instruction. In instruction-referencing mode, we need to transfer the
      instruction label between the old CMOV and the new PHI instruction to mark
      where the variable value is computed.
      
      There's an extra complication in that memory operands can be unfolded from the
      CMOV and sunk into the new blocks -- the test checks both scenarios where the
      instruction number has to hop between instructions.
      
      This omission exposed by Dexter testing.
      
      Reviewed By: Orlando
      
      Differential Revision: https://reviews.llvm.org/D145565
      2325e011
    • Elliot Goodrich's avatar
      [llvm] Move AttributeMask to a separate header · f0fa2d7c
      Elliot Goodrich authored
      Move `AttributeMask` out of `llvm/IR/Attributes.h` to a new file
      `llvm/IR/AttributeMask.h`.  After doing this we can remove the
      `#include <bitset>` and `#include <set>` directives from `Attributes.h`.
      Since there are many headers including `Attributes.h`, but not needing
      the definition of `AttributeMask`, this causes unnecessary bloating of
      the translation units and slows down compilation.
      
      This commit adds in the include directive for `llvm/IR/AttributeMask.h`
      to the handful of source files that need to see the definition.
      
      This reduces the total number of preprocessing tokens across the LLVM
      source files in lib from (roughly) 1,917,509,187 to 1,902,982,273 - a
      reduction of ~0.76%. This should result in a small improvement in
      compilation time.
      
      Differential Revision: https://reviews.llvm.org/D153728
      f0fa2d7c
    • Joseph Huber's avatar
      [OpenMP] Always apply target declarations to canonical definitions · 1d699bf2
      Joseph Huber authored
      This patch changes the handling of OpenMP to add the device attributes
      to the canonical definitions when we encounter a non-canonical
      definition. Previously, the following code would not work because it
      would find the non-canonical definition first which would then not be
      used anywhere else.
      
      ```
      int x;
      extern int x;
      ```
      
      This patch now adds the attribute to both of them. This allows us to
      perform the following operation if, for example, there were an
      implementation of `stderr` on the device.
      
      ```
      #include <stdio.h>
      
      // List of libc symbols supported on the device.
      extern FILE *stderr;
      ```
      
      Unfortunately I cannot think of an equivalent solution to HIP / CUDA
      device declarations as those are done with simple attributes. Attributes
      themselves cannot be used to affect a definition once its canonical
      definition has already been seen. Some help on that front would be
      appreciated.
      
      Fixes https://github.com/llvm/llvm-project/issues/63355
      
      Reviewed By: ABataev
      
      Differential Revision: https://reviews.llvm.org/D153369
      1d699bf2
    • David Spickett's avatar
      Revert "[LLDB] Fix the use of "platform process launch" with no extra arguments" · 3254623d
      David Spickett authored
      This reverts commit cc0fc358 due to a failure
      reported on MacOS.
      3254623d
    • Ties Stuij's avatar
      [ARM] in ExpandTMOV32BitImm, CPSR register ops should be `Define`d · 03db28ed
      Ties Stuij authored
      The CPSR registers ops of the instructions constructed in ExpandTMOV32BitImm
      were marked as kill, instead of define. Best to use the pre-existing
      t1CondCodeOp fn to construct CPSRs.
      
      Reviewed By: simonwallis2
      
      Differential Revision: https://reviews.llvm.org/D153763
      03db28ed
    • Louis Dionne's avatar
      6d6e3289
    • Simon Pilgrim's avatar
      [X86] SimplifyDemandedBitsForTargetNode - add X86ISD::ANDNP handling · 7b77dd6a
      Simon Pilgrim authored
      Add X86ISD::ANDNP handling to targetShrinkDemandedConstant as well, which allows us to replace a lot of truncated masks with (rematerializable) allones values
      7b77dd6a
    • Simon Tatham's avatar
      Revert "[ELFAttributeParser] Skip unknown vendor subsections." · 949bb7e4
      Simon Tatham authored
      This reverts commit 8f208edd.
      
      I completely missed the compiled unit test for ELFAttributeParser,
      which also needs updating. I'll reland this change once I make further
      fixes.
      949bb7e4
    • Nikita Popov's avatar
      [InstSimplify] Make sure offsets have same size in computePointerICmp() · 793eb0c0
      Nikita Popov authored
      The way this is currently implemented the accumulated offsets can
      end up having a different size, which causes unnecessary
      complication for further extension of the code.
      
      Don't strip pointer casts at the start and rely on
      stripAndAccumulate to do any necessary stripping. It gracefully
      handles different index sizes and will always retain the width of
      the original pointer index type.
      
      This is not NFC, but unlikely to make any practical difference.
      793eb0c0
    • Haojian Wu's avatar
      Revert "[llvm-profdata] Refactoring Sample Profile Reader to increase FDO... · 58056ae2
      Haojian Wu authored
      Revert "[llvm-profdata] Refactoring Sample Profile Reader to increase FDO build speed using MD5 as key to Sample Profile map"
      
      This reverts commit 12e9c7aa.
      
      The commit has broken the buildbot, see comment https://reviews.llvm.org/D147740#4451540
      58056ae2
    • Louis Dionne's avatar
      [libc++] Expand the contents of LIBCXX_ENABLE_FILESYSTEM · c352fa74
      Louis Dionne authored
      Since LIBCXX_ENABLE_FILESYSTEM now truly represents whether the
      platform supports a filesystem (as opposed to whether the <filesystem>
      library is provided), we can provide a few additional classes from
      the <filesystem> library even when the platform does not have support
      for a filesystem. For example, this allows performing path manipulations
      using std::filesystem::path even on platforms where there is no actual
      filesystem.
      
      rdar://107061236
      
      Differential Revision: https://reviews.llvm.org/D152382
      c352fa74
    • Matthias Springer's avatar
      [mlir][linalg] Padding transformation: Write back result to original destination · 431c49d6
      Matthias Springer authored
      Copy back the padded result to the original destination of the computation. This is important for bufferization, to ensure that the result of the computation does not suddenly materialize in a different buffer due to padding.
      
      A `bufferization.copy_tensor` is inserted for every (unpadded) result. Such ops bufferize to memcpys, but they fold away, should the padding fold away.
      
      Differential Revision: https://reviews.llvm.org/D153554
      431c49d6
    • Matthias Springer's avatar
      [mlir][bufferization] Add bufferization.copy_tensor op · d31a6dfb
      Matthias Springer authored
      This operation is a "copy" operation on tensors. It is guaranteed to bufferize to a memcpy. This is different from "tensor.insert_slice", which may fold away.
      
      Note: There is a symmetry between certain tensor, bufferization and memref ops:
      * `tensor.empty`, `bufferization.alloc_tensor`, `memref.alloc`
      * (none), `bufferization.dealloc_tensor`, `memref.dealloc`
      * `tensor.insert_slice`, `bufferization.copy_tensor`, `memref.copy`
      
      Tensor ops can generally canonicalize/fold away, while bufferization dialect ops can be used when a certain side effect is expected to materialize; so they do not fold away.
      
      Differential Revision: https://reviews.llvm.org/D153552
      d31a6dfb