Changes

Summary

  1. [llvm-objcopy][NFC] Add a helper method RelocationSectionBase::getNamePrefix() (details)
  2. [Transforms/Utils] Remove redundant declaration computeSyntheticCounts (NFC) (details)
  3. [libc++][NFC] Add missing link to a ranges review (details)
  4. [InstCombine] add tests for lshr-trunc-lshr; NFC (details)
  5. [x86] convert logic-of-FP-compares to FP logic-of-vector-compares (details)
  6. [libc++] Require a C++20 capable compiler. (details)
  7. [X86][SSE] combineMulToPMADDWD - replace sext(v8i16) -> zext(v8i16) (details)
  8. tsan: don't use pipe2 in tests (details)
  9. [MC][NFC] Add end-of-namespace comments (details)
  10. Recommit "[DSE] Track earliest escape, use for loads in isReadClobber." (details)
  11. [PowerPC] Add range check for vec_genpcvm builtins (details)
  12. [mlir] Linalg: ensure tile-and-pad always creates padding as requested (details)
  13. [AMDGPU] Always reserve flat scratch SGPR for architected flat scratch (details)
  14. Revert "[flang][fir] Add support to mangle/deconstruct namelist group name" (details)
  15. Re-apply "[JumpThreading] Ignore free instructions" (details)
  16. [PowerPC] Mark splat immediate instructions as rematerializable (details)
  17. Write test for CWG1772/CWG1762/CWG1779, mark them 'done', and update (details)
  18. Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init (details)
  19. [PowerPC][NFC] Add test case in preparation for codegen change (details)
  20. [SCCP] Regenerate bigint test checks (details)
  21. [ConstantFold] ConstantFoldGetElementPtr - use APInt::isNegative() instead of getSExtValue() to support big ints (details)
  22. [libc++] Refactor the tests for common_view to reduce duplication (details)
  23. Add test for DR1307, which we have already implemented. (details)
  24. Fix test from 8dd42f, capitalization in test (details)
  25. Revert "Allow rematerialization of virtual reg uses" (details)
  26. [NFC][libc++] Update clang-format style. (details)
  27. [mlir:OpConversionPattern] Add overloads for taking an Adaptor instead of ArrayRef (details)
  28. [mlir:OpConversion] Remove the remaing usages of the deprecated matchAndRewrite methods (details)
  29. [SystemZ][z/OS] Add GOFF Support to the DataLayout (details)
  30. [libc++][NFC] Mark LWG3158 as implemented (details)
  31. [LiveIntervals] Fix asan debug build failures (details)
  32. DebugInfo: Move the '=' version of -gsimple-template-names to the frontend (details)
  33. [libc++][NFC] Update status of old issue LWG2560 -- we implement it properly (details)
  34. [ARM] Addition jump table plus while loop block placement pass test. (details)
  35. [compiler-rt] Add shared_cxxabi requirement to some tests (details)
  36. [TargetLibraryInfo] Correctly handle sqrt*_finite (details)
  37. [DSE] Add additional capture tests (NFC) (details)
  38. [NFC] Replace hard-coded usages of SystemZ::R15D with SpecialRegisters API (details)
  39. [libc] Add an implementation of qsort. (details)
  40. [mlir][tosa] Add some transpose folders (details)
  41. [ThinLTO] Update combined index for SamplePGO indirect calls to locals (details)
  42. [mlir:MemRef] Move DmaStartOp/DmaWaitOp to ODS (details)
  43. Fix bot failure by adding needed dependence (details)
  44. [InstCombine] match variable names and code comments; NFC (details)
  45. [InstCombine] fold lshr(trunc(lshr X, C1)) C2 (details)
  46. [Polly] Fix wrong redirect in test case. (details)
  47. [flang][fir] Add support to mangle/deconstruct namelist group name (details)
  48. [mlir:OpAsm] Factor out the common bits of (Op/Dialect)Asm(Parser/Printer) (details)
  49. [IR] Handle large element size when calculating GEP indices (details)
  50. [SystemZ][z/OS] Introduce the GOFFMCAsmInfo Interface for z/OS (details)
  51. [ORC] Add 'contains' and 'overlaps' operations to ExecutorAddrRange. (details)
  52. [gn build] Port a9ae2436fc0d (details)
  53. [gn build] Port c0d889995e70 (details)
  54. [AMDGPU] Limit promote alloca max size in functions (details)
  55. [llvm-profgen] Ignore invalid perf line in LBR record (details)
  56. [mlir] Create a generic reduction detection utility (details)
  57. [AutoFDO][llvm-profgen] Profile generation for LBR(non-CS) sample (details)
  58. [mlir][tosa] Do not fold transpose with quantized types (details)
  59. [AutoFDO][llvm-profgen] Report zero count for unexecuted part of function code (details)
  60. [llvm-profgen] Unify output format of different unsymbolized profiles (details)
  61. [dsymutil] Track incompleteness across unions (details)
  62. WIP: Verify -gsimple-template-names=mangled values (details)
  63. [ORC] Allow construction of an ExecutorAddrRange from an addr and a size. (details)
  64. [lldb] Copy the system debugserver in LLDB.framework (details)
  65. [dsymutil] Update union-fwd-decl.test for Windows (details)
  66. [RISCV] Add another isel optimization for (and (shl X, c2), c1). (details)
  67. Fixed a bug in https://reviews.llvm.org/rG8eb617d719bdc6a4ed7773925d2421b9bbdd4b7a. (details)
  68. Add "REQUIRES: zlib" in forward-compatible.test since it handles compressed file. (details)
  69. [llvm] Improve export.sh with help and snapshot (details)
Commit 6dda6c49ce4b67840c4f38d51111278b4b64c1bf by ikudrin
[llvm-objcopy][NFC] Add a helper method RelocationSectionBase::getNamePrefix()

Refactor handleArgs() to use that method.

Differential Revision: https://reviews.llvm.org/D110350
The file was modifiedllvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp (diff)
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.cpp (diff)
The file was modifiedllvm/tools/llvm-objcopy/ELF/Object.h (diff)
Commit c597594461bb3ba34a9699b744be09135635cbc7 by kazu
[Transforms/Utils] Remove redundant declaration computeSyntheticCounts (NFC)
The file was modifiedllvm/include/llvm/LTO/SummaryBasedOptimizations.h (diff)
The file was modifiedllvm/include/llvm/Transforms/Utils/FunctionImportUtils.h (diff)
Commit 1295694364d0698f991b458f2ea23f33a064db0a by Louis Dionne
[libc++][NFC] Add missing link to a ranges review
The file was modifiedlibcxx/docs/Status/RangesPaper.csv (diff)
Commit 638a4147fc6400b928080c6d5656fbcee707a793 by spatel
[InstCombine] add tests for lshr-trunc-lshr; NFC
The file was modifiedllvm/test/Transforms/InstCombine/lshr.ll (diff)
Commit 09e71c367af36a07cce04a812dcd9c62bebfbcdf by spatel
[x86] convert logic-of-FP-compares to FP logic-of-vector-compares

This is motivated by the examples and discussion in:
https://llvm.org/PR51245
...and related bugs.

By using vector compares and vector logic, we can convert 2 'set'
instructions into 1 'movd' or 'movmsk' and generally improve
throughput/reduce instructions.

Unfortunately, we don't have a complete vector compare ISA before
AVX, so I left SSE-only out of this patch. Ie, we'd need extra logic
ops to simulate the missing predicates for SSE 'cmpp*', so it's not
as clearly a win.

Differential Revision: https://reviews.llvm.org/D110342
The file was modifiedllvm/test/CodeGen/X86/fcmp-logic.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/lzcnt-zext-cmp.ll (diff)
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp (diff)
Commit f881776175e97f7667ad2d32cfea0ba6f4254181 by Louis Dionne
[libc++] Require a C++20 capable compiler.

This enforces libcxx and its benchmarks are compiled by a C++20 capable
compiler. Based on review comments in D103413.

Differential Revision: https://reviews.llvm.org/D110338
The file was modifiedlibcxx/benchmarks/CMakeLists.txt (diff)
The file was modifiedlibcxx/CMakeLists.txt (diff)
Commit d8fc9f87270146e271eddd551ea98580bef15e82 by llvm-dev
[X86][SSE] combineMulToPMADDWD - replace sext(v8i16) -> zext(v8i16)

As suggested on D108522, if we're sign extending a v4i16 source before multiplying as a v4i32, then we can replace that with a zero extension and rely on the implicit sign-extension of PMADDWD.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/madd.ll (diff)
Commit 34412cea5c247e30e49958213df10dd8f128d7e5 by dvyukov
tsan: don't use pipe2 in tests

MacOS buildbots failed:
stress.cpp:57:7: error: use of undeclared identifier 'pipe2'
https://green.lab.llvm.org/green//job/clang-stage1-RA/24209/consoleFull#-3468768778254eaf0-7326-4999-85b0-388101f2d404

Fix the test to not use pipe2.

Differential Revision: https://reviews.llvm.org/D110423
The file was modifiedcompiler-rt/test/tsan/stress.cpp (diff)
Commit e2546525902de18bb66a0c46ad3517d9f389fa47 by fraser
[MC][NFC] Add end-of-namespace comments
The file was modifiedllvm/include/llvm/MC/MCInstrDesc.h (diff)
Commit 6f28fb708149e9db8d077e65fcc9f87d566e824a by flo
Recommit "[DSE] Track earliest escape, use for loads in isReadClobber."

This reverts the revert commit df56fc6ebbee6c458b0473185277b7860f7e3408.

This version of the patch adjusts the location where the EarliestEscapes
cache is cleared when an instruction gets removed. The earliest escaping
instruction does not have to be a memory instruction.

It could be a ptrtoint instruction like in the added test
@earliest_escape_ptrtoint, which subsequently gets removed. We need to
invalidate the EarliestEscape entry referring to the ptrtoint when
deleting it.

This fixes the crash mentioned in
https://bugs.chromium.org/p/chromium/issues/detail?id=1252762#c6
The file was modifiedllvm/include/llvm/Analysis/CaptureTracking.h (diff)
The file was modifiedllvm/lib/Transforms/Scalar/DeadStoreElimination.cpp (diff)
The file was modifiedllvm/lib/Analysis/CaptureTracking.cpp (diff)
The file was modifiedllvm/test/Transforms/DeadStoreElimination/captures-before-load.ll (diff)
Commit 3b0240e6c89d9201430ee83b09fe7c94256e8838 by quinn.pham
[PowerPC] Add range check for vec_genpcvm builtins

This patch adds range checking for some Power10 altivec builtins. Range
checking is done in SemaChecking.

Reviewed By: #powerpc, lei, Conanap

Differential Revision: https://reviews.llvm.org/D109780
The file was modifiedclang/lib/Sema/SemaChecking.cpp (diff)
The file was modifiedclang/test/CodeGen/builtins-ppc-p10vector-error.c (diff)
Commit 5988a3b7a09126aff982944ecb36f533c450388e by zinenko
[mlir] Linalg: ensure tile-and-pad always creates padding as requested

Initially, the padding transformation and the related operation were only used
to guarantee static shapes of subtensors in tiled operations. The
transformation would not insert the padding operation if the shapes were
already static, and the overall code generation would actively remove such
"noop" pads. However, this transformation can be also used to pack data into
smaller tensors and marshall them into faster memory, regardless of the size
mismatches. In context of expert-driven transformation, we should assume that,
if padding is requested, a potentially padded tensor must be always created.
Update the transformation accordingly. To do this, introduce an optional
`packing` attribute to the `pad_tensor` op that serves as an indication that
the padding is an intentional choice (as opposed to side effect of type
normalization) and should be left alone by cleanups.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D110425
The file was modifiedmlir/test/Dialect/Linalg/tile-and-pad-tensors.mlir (diff)
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td (diff)
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Transforms.cpp (diff)
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp (diff)
The file was modifiedmlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp (diff)
Commit 082e22f3d72bd63f9b388d5566064cf3736da511 by Stanislav.Mekhanoshin
[AMDGPU] Always reserve flat scratch SGPR for architected flat scratch

With architected flat scratch it becomes readonly. We must always
reserve SGPR pair for it even if we do not use scratch at all since
an attempt to write to SGPRs mapped to FLAT_SCRATCH results in
memory violation.

This is not needed since GFX10 with architected flat scratch though
since special SGPRs are not carving space from normal SGPRs.

Differential Revision: https://reviews.llvm.org/D110376
The file was modifiedllvm/test/CodeGen/AMDGPU/flat-scratch-reg.ll (diff)
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp (diff)
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp (diff)
Commit 321be24aa6808c5829f3433407e13603901849f4 by clementval
Revert "[flang][fir] Add support to mangle/deconstruct namelist group name"

This reverts commit 3593ae4312f6156c9ca50d46cdb55a8dfad782d0.
The file was modifiedflang/include/flang/Optimizer/Support/InternalNames.h (diff)
The file was modifiedflang/lib/Lower/Mangler.cpp (diff)
The file was modifiedflang/unittests/Optimizer/InternalNamesTest.cpp (diff)
The file was modifiedflang/lib/Optimizer/Support/InternalNames.cpp (diff)
Commit 1e9afab875696ebf1a8abb5637f04735411ee0b7 by hans
Re-apply "[JumpThreading] Ignore free instructions"

It seems the crashes we saw wasn't caused by this (see comments on the review).

> This is basically D108837 but for jump threading. Free instructions
> should be ignored for the threading decision. JumpThreading already
> skips some free instructions (like pointer bitcasts), but does not
> skip various free intrinsics -- in fact, it currently gives them a
> fairly large cost of 2.
>
> Differential Revision: https://reviews.llvm.org/D110290

This reverts commit 4604695d7c20e72b551a1a5224f3de877cb41bd3.
The file was modifiedllvm/test/Transforms/JumpThreading/free_instructions.ll (diff)
The file was modifiedllvm/test/Transforms/PhaseOrdering/inlining-alignment-assumptions.ll (diff)
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp (diff)
The file was modifiedllvm/include/llvm/Transforms/Scalar/JumpThreading.h (diff)
Commit 6e1aaf18af6c6b68d314a23068bd912524212fb6 by wei.huang
[PowerPC] Mark splat immediate instructions as rematerializable

This patch marks splat immediate instructions XXSPLTIW and XXSPLTIDP as
rematerializable to prevent MachineLICM from moving them out of loops.

Reviewed By: lei, amy

Differential revision: https://reviews.llvm.org/D108823
The file was modifiedllvm/test/CodeGen/PowerPC/constant-pool.ll (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/p10-splatImm.ll (diff)
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrPrefix.td (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/p10-spill-crun.ll (diff)
The file was modifiedllvm/lib/Target/PowerPC/PPCInstrInfo.cpp (diff)
Commit 8dd42ffc09e30b1bf936f5da1aa104916e50d2fa by erich.keane
Write test for CWG1772/CWG1762/CWG1779, mark them 'done', and update
cxx_dr_status.html

I noticed that these two DRs are currently working correctly, so I
added a pair of lit tests that check the AST (which is most useful for
CWG1779, since 'dependent' is really only observable in an ast dump) to
make sure __func__ works correctly in dependent cases, and in lambda
operator().

Also noticed that CWG1762, mostly an 'example' change, works correctly,
so added a test so that it gets marked 'done' as well.

Additionally, I regenerated cxx_dr_status.html, updating it for Clang
13's release, based on the cwg_status.html from August 12, 2021.

Differential Revision: https://reviews.llvm.org/D109956
The file was modifiedclang/www/cxx_dr_status.html (diff)
The file was modifiedclang/test/CXX/drs/dr17xx.cpp (diff)
The file was addedclang/test/CXX/drs/dr177x.cpp
The file was modifiedclang/www/make_cxx_dr_status (diff)
Commit e4902480f1e2f12f73c2b504e3d717536653dd7b by aaron
Fix wrong FixIt about union in cppcoreguidelines-pro-type-member-init

At most one variant member of a union may have a default member
initializer. The case of anonymous records with multiple levels of
nesting like the following also needs to meet this rule. The original
logic is to horizontally obtain all the member variables in a record
that need to be initialized and then filter to the variables that need
to be fixed. Obviously, it is impossible to correctly initialize the
desired variables according to the nesting relationship.

See Example 3 in class.union

union U {
  U() {}
  int x;  // int x{};
  union {
    int k;  // int k{};  <==  wrong fix
  };
  union {
    int z;  // int z{};  <== wrong fix
    int y;
  };
};
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines-pro-type-member-init.cpp (diff)
The file was modifiedclang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp (diff)
Commit 3678df5ae6618eec656ae0ea0dab3be09d73bc9a by albionapc
[PowerPC][NFC] Add test case in preparation for codegen change

This test case tests doubles inserted into vector ints,
and help make apparent the optimizations a future patch
will make.
The file was addedllvm/test/CodeGen/PowerPC/test-vector-insert.ll
Commit 36eb6c0134afa9d6881e52c002743f4594c859ee by llvm-dev
[SCCP] Regenerate bigint test checks
The file was modifiedllvm/test/Transforms/SCCP/apint-bigint2.ll (diff)
Commit bdee805b3277e04677490f42e62aa28478331254 by llvm-dev
[ConstantFold] ConstantFoldGetElementPtr - use APInt::isNegative() instead of getSExtValue() to support big ints

Fixes fuzz test: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=39197
The file was modifiedllvm/test/Transforms/SCCP/apint-bigint2.ll (diff)
The file was modifiedllvm/lib/IR/ConstantFold.cpp (diff)
Commit 03fb6f04f9fa9a2f8b49a0d34b9363046095dd8d by Louis Dionne
[libc++] Refactor the tests for common_view to reduce duplication
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.common.view/base.pass.cpp (diff)
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.common.view/ctor.view.pass.cpp (diff)
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.common.view/end.pass.cpp (diff)
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.common.view/begin.pass.cpp (diff)
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.common.view/ctor.default.pass.cpp (diff)
The file was addedlibcxx/test/std/ranges/range.adaptors/range.common.view/types.h
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.common.view/size.pass.cpp (diff)
Commit 77d200a546136c2855063613ff4bca1f682fb23a by erich.keane
Add test for DR1307, which we have already implemented.

Also regenerated cxx_dr_status.html
The file was modifiedclang/www/cxx_dr_status.html (diff)
The file was modifiedclang/test/CXX/drs/dr13xx.cpp (diff)
Commit e8e2edd8ca88f8b0a7dba141349b2aa83284f3af by erich.keane
Fix test from 8dd42f, capitalization in test
The file was modifiedclang/test/CXX/drs/dr17xx.cpp (diff)
Commit 08d7eec06e8cf5c15a96ce11f311f1480291a441 by Stanislav.Mekhanoshin
Revert "Allow rematerialization of virtual reg uses"

Reverted due to two distcint performance regression reports.

This reverts commit 92c1fd19abb15bc68b1127a26137a69e033cdb39.
The file was modifiedllvm/test/CodeGen/RISCV/mul.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/ldr-str-imm12.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/urem-vector-lkk.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-float32regloops.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/delete-dead-instrs-with-live-uses.mir (diff)
The file was modifiedllvm/test/CodeGen/Mips/llvm-ir/lshr.ll (diff)
The file was modifiedllvm/test/CodeGen/ARM/funnel-shift-rot.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/inalloca-invoke.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/sdiv_fix.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-cttz.ll (diff)
The file was modifiedllvm/test/CodeGen/AMDGPU/remat-sop.mir (diff)
The file was modifiedllvm/test/CodeGen/RISCV/atomic-rmw.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/shifts.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/dag-update-nodetomatch.ll (diff)
The file was modifiedllvm/test/CodeGen/Mips/tls.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-bswap.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-ctlz.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/addcarry.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/tail-pred-disabled-in-loloops.ll (diff)
The file was modifiedllvm/test/CodeGen/ARM/illegal-bitfield-loadstore.ll (diff)
The file was modifiedllvm/test/CodeGen/ARM/neon-copy.ll (diff)
The file was modifiedllvm/test/CodeGen/Mips/llvm-ir/sub.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-float16regloops.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/srem-vector-lkk.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rv32zbb-zbp.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rv32zbp.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/ragreedy-hoist-spill.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rv32zbb.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/varying-outer-2d-reduction.ll (diff)
The file was modifiedllvm/test/CodeGen/ARM/funnel-shift.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/bswap-ctlz-cttz-ctpop.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-bitreverse.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/mve-postinc-dct.ll (diff)
The file was modifiedllvm/test/CodeGen/Mips/llvm-ir/ashr.ll (diff)
The file was modifiedllvm/test/CodeGen/ARM/arm-shrink-wrapping-linux.ll (diff)
The file was modifiedllvm/include/llvm/CodeGen/TargetInstrInfo.h (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rv32zbt.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/atomic-signext.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/callbr-asm-blockplacement.ll (diff)
The file was modifiedllvm/lib/CodeGen/TargetInstrInfo.cpp (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/while-loops.ll (diff)
The file was modifiedllvm/test/CodeGen/X86/licm-regpressure.ll (diff)
The file was modifiedllvm/test/CodeGen/Mips/llvm-ir/shl.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rv32i-rv64i-half.ll (diff)
The file was modifiedllvm/test/CodeGen/Thumb/dyn-stackalloc.ll (diff)
Commit 15dfe783406241f9c17c3552b0723441fa68174f by koraq
[NFC][libc++] Update clang-format style.

Changes the style as requested by @ldionne in D103368.

Reviewed By: ldionne, #libc, Quuxplusone

Differential Revision: https://reviews.llvm.org/D109835
The file was modifiedlibcxx/.clang-format (diff)
Commit b54c724be0b490f231af534696b3b7ef072a7ca1 by riddleriver
[mlir:OpConversionPattern] Add overloads for taking an Adaptor instead of ArrayRef

This has been a TODO for a long time, and it brings about many advantages (namely nice accessors, and less fragile code). The existing overloads that accept ArrayRef are now treated as deprecated and will be removed in a followup (after a small grace period). Most of the upstream MLIR usages have been fixed by this commit, the rest will be handled in a followup.

Differential Revision: https://reviews.llvm.org/D110293
The file was modifiedmlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp (diff)
The file was modifiedmlir/lib/Dialect/SCF/Transforms/StructuralTypeConversions.cpp (diff)
The file was modifiedmlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Detensorize.cpp (diff)
The file was modifiedmlir/lib/Dialect/ArmSVE/Transforms/LegalizeForLLVMExport.cpp (diff)
The file was modifiedmlir/lib/Dialect/SPIRV/Transforms/SPIRVConversion.cpp (diff)
The file was modifiedmlir/lib/Dialect/StandardOps/Transforms/Bufferize.cpp (diff)
The file was modifiedmlir/lib/Dialect/StandardOps/Transforms/DecomposeCallGraphTypes.cpp (diff)
The file was modifiedmlir/lib/Transforms/Bufferize.cpp (diff)
The file was modifiedmlir/lib/Dialect/AMX/Transforms/LegalizeForLLVMExport.cpp (diff)
The file was modifiedmlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp (diff)
The file was modifiedmlir/lib/Conversion/ShapeToStandard/ShapeToStandard.cpp (diff)
The file was modifiedmlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp (diff)
The file was modifiedmlir/lib/Conversion/VectorToSPIRV/VectorToSPIRV.cpp (diff)
The file was modifiedmlir/lib/Conversion/StandardToSPIRV/StandardToSPIRV.cpp (diff)
The file was modifiedmlir/lib/Dialect/SPIRV/Transforms/LowerABIAttributesPass.cpp (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp (diff)
The file was modifiedmlir/docs/Bufferization.md (diff)
The file was modifiedmlir/include/mlir/Conversion/LLVMCommon/Pattern.h (diff)
The file was modifiedmlir/lib/Conversion/MemRefToSPIRV/MemRefToSPIRV.cpp (diff)
The file was modifiedmlir/lib/Conversion/SPIRVToLLVM/SPIRVToLLVM.cpp (diff)
The file was modifiedmlir/lib/Dialect/StandardOps/Transforms/FuncConversions.cpp (diff)
The file was modifiedmlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp (diff)
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp (diff)
The file was modifiedmlir/include/mlir/Transforms/DialectConversion.h (diff)
The file was modifiedmlir/lib/Conversion/LinalgToSPIRV/LinalgToSPIRV.cpp (diff)
The file was modifiedmlir/lib/Conversion/AsyncToLLVM/AsyncToLLVM.cpp (diff)
The file was modifiedmlir/lib/Dialect/StandardOps/Transforms/TensorConstantBufferize.cpp (diff)
The file was modifiedmlir/lib/Dialect/Tensor/Transforms/Bufferize.cpp (diff)
The file was modifiedmlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp (diff)
The file was modifiedmlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp (diff)
The file was modifiedmlir/lib/Conversion/SCFToSPIRV/SCFToSPIRV.cpp (diff)
The file was modifiedmlir/lib/Dialect/Shape/Transforms/StructuralTypeConversions.cpp (diff)
Commit ef976337f581dd8a80820a8b14b4bbd70670b7fc by riddleriver
[mlir:OpConversion] Remove the remaing usages of the deprecated matchAndRewrite methods

This commits updates the remaining usages of the ArrayRef<Value> based
matchAndRewrite/rewrite methods in favor of the new OpAdaptor
overload.

Differential Revision: https://reviews.llvm.org/D110360
The file was modifiedmlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp (diff)
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp (diff)
The file was modifiedmlir/lib/Conversion/OpenACCToLLVM/OpenACCToLLVM.cpp (diff)
The file was modifiedmlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp (diff)
The file was modifiedmlir/test/lib/Conversion/StandardToLLVM/TestConvertCallOp.cpp (diff)
The file was modifiedmlir/include/mlir/Conversion/LLVMCommon/VectorPattern.h (diff)
The file was modifiedmlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp (diff)
The file was modifiedmlir/lib/Conversion/GPUCommon/OpToFuncCallLowering.h (diff)
The file was modifiedmlir/lib/Conversion/GPUToNVVM/WmmaOpsToNvvm.cpp (diff)
The file was modifiedmlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp (diff)
The file was modifiedmlir/include/mlir/Conversion/LLVMCommon/Pattern.h (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp (diff)
The file was modifiedmlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp (diff)
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp (diff)
The file was modifiedmlir/lib/Conversion/GPUCommon/IndexIntrinsicsOpLowering.h (diff)
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp (diff)
The file was modifiedmlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp (diff)
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp (diff)
The file was modifiedmlir/lib/Conversion/MathToLLVM/MathToLLVM.cpp (diff)
The file was modifiedmlir/lib/Conversion/VectorToROCDL/VectorToROCDL.cpp (diff)
The file was modifiedmlir/lib/Conversion/GPUCommon/GPUOpsLowering.h (diff)
Commit e09a1dc47515d27ba5ca572a225208bb0d79fb3f by anirudh_prasad
[SystemZ][z/OS] Add GOFF Support to the DataLayout

- This patch adds in the GOFF mangling support to the LLVM data layout string. A corresponding additional line has been added into the data layout section in the language reference documentation.
- Furthermore, this patch also sets the right data layout string for the z/OS target in the SystemZ backend.

Reviewed By: uweigand, Kai, abhina.sreeskantharajan, MaskRay

Differential Revision: https://reviews.llvm.org/D109362
The file was modifiedllvm/unittests/IR/ManglerTest.cpp (diff)
The file was modifiedclang/test/CodeGen/target-data.c (diff)
The file was modifiedllvm/lib/Target/SystemZ/SystemZTargetMachine.cpp (diff)
The file was modifiedllvm/include/llvm/IR/DataLayout.h (diff)
The file was modifiedclang/lib/Basic/Targets/SystemZ.h (diff)
The file was modifiedllvm/lib/IR/DataLayout.cpp (diff)
The file was modifiedllvm/docs/LangRef.rst (diff)
Commit ff0b62dd8898e58df297f76285a7e613d745db3e by Louis Dionne
[libc++][NFC] Mark LWG3158 as implemented

It has been implemented in 59e26308e60a.
The file was modifiedlibcxx/docs/Status/Cxx20Issues.csv (diff)
Commit ac51ad24a75c02152f8ece943d65de9a1c4e947a by jay.foad
[LiveIntervals] Fix asan debug build failures

Call RemoveMachineInstrFromMaps before erasing instrs.
repairIntervalsInRange will do this for you after erasing the
instruction, but it's not safe to rely on it because assertions in
SlotIndexes::removeMachineInstrFromMaps refer to fields in the erased
instruction.

This fixes asan buildbot failures caused by D110328.
The file was modifiedllvm/lib/CodeGen/TwoAddressInstructionPass.cpp (diff)
Commit 8ec7d9b8f875368a5f92596332cd05059df6bbd2 by dblaikie
DebugInfo: Move the '=' version of -gsimple-template-names to the frontend

Based on feedback from Paul Robinson on 38c09ea that the 'mangled' mode
is only useful as an LLVM-developer-internal tool in combination with
llvm-dwarfdump --verify, so demote that to a frontend-only (not driver)
option. The driver support is simply -g{no-,}simple-template-names to
switch on simple template names, without the option to use the mangled
template name scheme there.
The file was modifiedclang/test/Driver/debug-options.c (diff)
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp (diff)
The file was modifiedclang/include/clang/Driver/Options.td (diff)
Commit a64e46880c23494ab0d87d72a3ea6618fc04bd91 by Louis Dionne
[libc++][NFC] Update status of old issue LWG2560 -- we implement it properly
The file was modifiedlibcxx/docs/Status/Cxx17Issues.csv (diff)
Commit a5211bf365dd56b644516e70a9ee31db06b5c70e by david.green
[ARM] Addition jump table plus while loop block placement pass test.

Also regenerated the file, whilst here.
The file was modifiedllvm/test/CodeGen/Thumb2/mve-wls-block-placement.mir (diff)
Commit f8da95cd7e68ea66010843ef44adbe8d2807170c by leonardchan
[compiler-rt] Add shared_cxxabi requirement to some tests

This adds REQUIRES: shared_cxxabi to a bunch of tests that would fail if this
weak reference in sanitizer common was undefined. This is necessary in cases
where libc++abi.a is statically linked in. Because there is no strong reference
to __cxa_demangle in compiler-rt, then if libc++abi is linked in via a static
archive, then the linker will not extract the archive member that would define
that weak symbol. This causes a handful of tests to fail because this leads to
the symbolizer printing mangled symbols where tests expect them demangled.

Technically, this feature is WAI since sanitizer runtimes shouldn't fail if
this symbol isn't resolved, and linking statically means you wouldn't need to
link in all of libc++abi. As a workaround, we can simply make it a requirement
that these tests use shared libc++abis.

Differential Revision: https://reviews.llvm.org/D109639
The file was modifiedcompiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp (diff)
The file was modifiedcompiler-rt/test/asan/TestCases/Linux/odr-vtable.cpp (diff)
Commit 6185ad03f1085911812e8244a4994a04c62e19b6 by paul.robinson
[TargetLibraryInfo] Correctly handle sqrt*_finite

Other <math>_finite calls are marked as unavailable except on GNU/Linux;
it looks like the sqrt set was just overlooked.

Differential Revision: https://reviews.llvm.org/D110418
The file was modifiedllvm/lib/Analysis/TargetLibraryInfo.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/sqrt-fastmath.ll (diff)
Commit 7774166499d6db7fd5b246a1a694e7fe930ebcba by nikita.ppv
[DSE] Add additional capture tests (NFC)

These test other escape sources and the case of multiple
underlying objects.
The file was modifiedllvm/test/Transforms/DeadStoreElimination/captures-before-load.ll (diff)
Commit ebe06910ce2623f525e458a91d7e5a1858163226 by anirudh_prasad
[NFC] Replace hard-coded usages of SystemZ::R15D with SpecialRegisters API

This patch changes hard-coded usages of SystemZ::R15D with calls to the getStackPointerRegister function. Uses in the LowerCall function are avoided to avoid merge conflicts with an expected upcoming patch.

Reviewed By: uweigand

Differential Revision: https://reviews.llvm.org/D109702
The file was modifiedllvm/lib/Target/SystemZ/SystemZISelLowering.cpp (diff)
Commit 5eb6b8272931473f3b279db5d2c0006993fda21a by sivachandra
[libc] Add an implementation of qsort.

A fuzzer for qsort has also been added.

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D110382
The file was modifiedlibc/test/src/stdlib/CMakeLists.txt (diff)
The file was modifiedlibc/config/linux/aarch64/entrypoints.txt (diff)
The file was addedlibc/fuzzing/stdlib/qsort_fuzz.cpp
The file was addedlibc/test/src/stdlib/qsort_test.cpp
The file was modifiedlibc/config/linux/api.td (diff)
The file was addedlibc/fuzzing/stdlib/CMakeLists.txt
The file was modifiedlibc/spec/spec.td (diff)
The file was modifiedlibc/spec/stdc.td (diff)
The file was addedlibc/src/stdlib/qsort.h
The file was modifiedlibc/src/stdlib/CMakeLists.txt (diff)
The file was modifiedlibc/fuzzing/CMakeLists.txt (diff)
The file was addedlibc/src/stdlib/qsort.cpp
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt (diff)
Commit e325ebb9c70bbdd48866926a42d4c4373b832035 by antiagainst
[mlir][tosa] Add some transpose folders

* If the input is a constant splat value, we just
  need to reshape it.
* If the input is a general constant with one user,
  we can also constant fold it, without bloating
  the IR.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D110439
The file was modifiedmlir/include/mlir/Dialect/Tosa/IR/TosaOps.td (diff)
The file was modifiedmlir/test/Dialect/Tosa/canonicalize.mlir (diff)
The file was modifiedmlir/lib/Dialect/Tosa/IR/TosaOps.cpp (diff)
Commit 96cb97c4533a0a02c2d62ffb1121cd275aa43dd5 by tejohnson
[ThinLTO] Update combined index for SamplePGO indirect calls to locals

In ThinLTO for locals we normally compute the GUID from the name after
prepending the source path to get a unique global id. SamplePGO indirect
call profiles contain the target GUID without this uniquification,
however (unless compiling with -funique-internal-linkage-names).

In order to correctly handle the call edges added to the combined index
for these indirect calls, during importing and bitcode writing we
consult a map of original to full GUID to identify the actual callee.
However, for a large application this was consuming a lot of compile
time as we need to do this repeatedly (especially during importing where
we may traverse call edges multiple times).

To fix this implement a suggestion in one of the FIXME comments, and
actually modify the call edges during a single traversal after the index
is built to perform the fixups once. I combined this fixup with the dead
code analysis performed on the index in order to avoid adding an
additional walk of the index. The dead code analysis is the first
analysis performed on the index.

This reduced the time required for a large thin link with SamplePGO by
about 20%.

No new test added, but I confirmed that there are existing tests that
will fail when no fixup is performed.

Differential Revision: https://reviews.llvm.org/D110374
The file was modifiedllvm/lib/Transforms/IPO/FunctionImport.cpp (diff)
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp (diff)
The file was modifiedllvm/include/llvm/IR/ModuleSummaryIndex.h (diff)
The file was modifiedllvm/include/llvm/Transforms/IPO/FunctionImport.h (diff)
The file was modifiedllvm/lib/IR/ModuleSummaryIndex.cpp (diff)
The file was modifiedllvm/tools/llvm-lto/llvm-lto.cpp (diff)
Commit aca9bea1992ce270d094105ae8968c703b8ffb65 by riddleriver
[mlir:MemRef] Move DmaStartOp/DmaWaitOp to ODS

These are among the last operations still defined explicitly in C++. I've
tried to keep this commit as NFC as possible, but these ops
definitely need a non-NFC cleanup at some point.

Differential Revision: https://reviews.llvm.org/D110440
The file was modifiedmlir/lib/Dialect/MemRef/IR/MemRefDialect.cpp (diff)
The file was modifiedmlir/test/Dialect/MemRef/invalid.mlir (diff)
The file was modifiedmlir/test/IR/invalid-ops.mlir (diff)
The file was modifiedmlir/include/mlir/Dialect/MemRef/IR/MemRef.h (diff)
The file was modifiedmlir/lib/Dialect/MemRef/IR/MemRefOps.cpp (diff)
The file was modifiedmlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td (diff)
Commit b5bfbb4da252e1d6b0cefadf1809e88e33bb96c1 by tejohnson
Fix bot failure by adding needed dependence

Fix bot failure from 96cb97c4533a0a02c2d62ffb1121cd275aa43dd5, e.g.:
https://lab.llvm.org/buildbot/#/builders/61/builds/15203

llvm-lto now needs to link in IPO.
The file was modifiedllvm/tools/llvm-lto/CMakeLists.txt (diff)
Commit 29c09c76539f6171fa84811e9b4b6d2a244e2d53 by spatel
[InstCombine] match variable names and code comments; NFC
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineShifts.cpp (diff)
Commit a47c8e40c734429903d4000285ca45a1c3299321 by spatel
[InstCombine] fold lshr(trunc(lshr X, C1)) C2

Only the multi-use cases are changing here because there's
another fold that catches the simpler patterns.

But that other fold is the source of infinite loops when we
try to add D110170, so removing that is planned as a follow-up.

Attempt to show the general proof in Alive2:
https://alive2.llvm.org/ce/z/Ns1uS2

Note that the overshift fold-to-zero tests are not
currently handled by instsimplify. If they were, we
could assert that the shift amount sum is less than
the source bitwidth.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineShifts.cpp (diff)
The file was modifiedllvm/test/Transforms/InstCombine/lshr.ll (diff)
Commit a5d47b3fa02da6a17828083654b79d5d15d310f3 by llvm-project
[Polly] Fix wrong redirect in test case.
The file was modifiedpolly/test/ScheduleOptimizer/ManualOptimization/distribute_illegal_pragmaloc.ll (diff)
Commit 62cc6b0da2912d770c125fc9ea0949f3a7b75fb9 by clementval
[flang][fir] Add support to mangle/deconstruct namelist group name

Add support to create unique name for namelist group and be able to
deconstruct them.

This patch is part of the upstreaming effort from fir-dev branch.

Reviewed By: jeanPerier

Differential Revision: https://reviews.llvm.org/D110331

Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
The file was modifiedflang/lib/Optimizer/Support/InternalNames.cpp (diff)
The file was modifiedflang/lib/Lower/Mangler.cpp (diff)
The file was modifiedflang/unittests/Optimizer/InternalNamesTest.cpp (diff)
The file was modifiedflang/include/flang/Optimizer/Support/InternalNames.h (diff)
Commit 531206310a27477f088f672f5e6fd688d77d9292 by riddleriver
[mlir:OpAsm] Factor out the common bits of (Op/Dialect)Asm(Parser/Printer)

This has a few benefits:
* It allows for defining parsers/printer code blocks that
  can be shared between operations and attribute/types.
* It removes the weird duplication of generic parser/printer hooks,
  which means that newly added hooks only require touching one class.

Differential Revision: https://reviews.llvm.org/D110375
The file was addedmlir/lib/Parser/AsmParserImpl.h
The file was modifiedmlir/include/mlir/IR/DialectImplementation.h (diff)
The file was modifiedmlir/lib/Parser/DialectSymbolParser.cpp (diff)
The file was modifiedmlir/lib/IR/Dialect.cpp (diff)
The file was modifiedmlir/lib/Parser/Parser.cpp (diff)
The file was modifiedmlir/lib/IR/AsmPrinter.cpp (diff)
The file was modifiedmlir/include/mlir/IR/OpImplementation.h (diff)
The file was modifiedmlir/lib/IR/Operation.cpp (diff)
Commit 5969e5743ae9cd17d08436a4b1139b8c4a24cc4d by nikita.ppv
[IR] Handle large element size when calculating GEP indices

This is a fix for the issue reported at
https://reviews.llvm.org/D110043#3019942:
The ElementSize is a uint64_t and as such may be larger than the
index space, or be negative in the index space. This is UB, but
shouldn't cause assertion failures.

We address this by detecting whether the size is too large and
use a zero index in that case (which is always conservatively
correct).

Differential Revision: https://reviews.llvm.org/D110437
The file was modifiedllvm/lib/IR/DataLayout.cpp (diff)
The file was addedllvm/test/Transforms/GlobalOpt/large-element-size.ll
Commit a9ae2436fc0dcb68ef8a478948e46d0a9998b0c9 by anirudh_prasad
[SystemZ][z/OS] Introduce the GOFFMCAsmInfo Interface for z/OS

- This patch adds in the GOFFMCAsmInfo interfaces for the z/OS target.
- This patch decouples the previously existing SystemZMCAsmInfo interface for the ELF target and the z/OS target.
- This patch also removes a small test in the SystemZAsmLexerTest.cpp. The reason for this is because, the test is set up for the s390x-ibm-linux (SystemZ ELF triple), and the test checks a function which is overridden only for the z/OS target. The reason we can't change the test to use a z/OS triple outright is because there is still missing support which prevents the successful running of a test (assert in AsmParser.cpp due to missing GOFFAsmParser support)

Reviewed By: uweigand, abhina.sreeskantharajan

Differential Revision: https://reviews.llvm.org/D110077
The file was modifiedllvm/unittests/MC/SystemZ/SystemZAsmLexerTest.cpp (diff)
The file was modifiedllvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp (diff)
The file was modifiedllvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h (diff)
The file was addedllvm/include/llvm/MC/MCAsmInfoGOFF.h
The file was modifiedllvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp (diff)
The file was modifiedllvm/lib/MC/CMakeLists.txt (diff)
The file was addedllvm/lib/MC/MCAsmInfoGOFF.cpp
Commit c0d889995e708f8bcb0fd688f63d031ee06b5874 by Lang Hames
[ORC] Add 'contains' and 'overlaps' operations to ExecutorAddrRange.

Also includes unit tests for not-yet tested operations like comparison and
to/from pointer conversion.
The file was modifiedllvm/unittests/ExecutionEngine/Orc/CMakeLists.txt (diff)
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h (diff)
The file was addedllvm/unittests/ExecutionEngine/Orc/ExecutorAddressTest.cpp
Commit 5f9802401145a56d16c5712bf25b0a3894e68cb2 by llvmgnsyncbot
[gn build] Port a9ae2436fc0d
The file was modifiedllvm/utils/gn/secondary/llvm/lib/MC/BUILD.gn (diff)
Commit 70a48697d5f547ca72053b5dcf0d10756f6f2477 by llvmgnsyncbot
[gn build] Port c0d889995e70
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc/BUILD.gn (diff)
Commit cf74ef134c9a8089d8997144d54628952c6d4552 by Stanislav.Mekhanoshin
[AMDGPU] Limit promote alloca max size in functions

Non-entry functions have 32 caller saved VGPRs available. If we
promote alloca to consume more registers we will have to spill
CSRs. There is no reason to eliminate scratch access to get
another scratch access instead.

Differential Revision: https://reviews.llvm.org/D110372
The file was modifiedllvm/test/CodeGen/AMDGPU/vector-alloca-limits.ll (diff)
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp (diff)
Commit a7cdcf25c17e169eedba276791299c3b2b78fbf1 by wlei
[llvm-profgen] Ignore invalid perf line in LBR record

Similar to https://reviews.llvm.org/D109637, there is a whole invalid line of message in perfscript.

```
warning: Invalid address in LBR record at line 14118674: Processed 14138923 events and lost 1 chunks!
warning: Invalid address in LBR record at line 14118676: Check IO/CPU overload!
```

This only happened for LBR only perfscript, hybridperfscript have a check of " 0x" to make sure it's the LBR perf line.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D110424
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp (diff)
The file was modifiedllvm/test/tools/llvm-profgen/Inputs/noprobe.perfscript (diff)
Commit 2a876a711dc7c644936017daf20e78f48bfd2270 by diegocaballero
[mlir] Create a generic reduction detection utility

This patch introduces a generic reduction detection utility that works
across different dialecs. It is mostly a generalization of the reduction
detection algorithm in Affine. The reduction detection logic in Affine,
Linalg and SCFToOpenMP have been replaced with this new generic utility.

The utility takes some basic components of the potential reduction and
returns: 1) the reduced value, and 2) a list with the combiner operations.
The logic to match reductions involving multiple combiner operations disabled
until we can properly test it.

Reviewed By: ftynse, bondhugula, nicolasvasilache, pifon2a

Differential Revision: https://reviews.llvm.org/D110303
The file was addedmlir/test/Analysis/test-match-reduction.mlir
The file was addedmlir/test/lib/Analysis/TestMatchReduction.cpp
The file was modifiedmlir/lib/Conversion/SCFToOpenMP/CMakeLists.txt (diff)
The file was modifiedmlir/include/mlir/IR/Diagnostics.h (diff)
The file was modifiedmlir/lib/IR/Diagnostics.cpp (diff)
The file was modifiedmlir/lib/Analysis/LoopAnalysis.cpp (diff)
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel (diff)
The file was modifiedmlir/lib/Analysis/AffineAnalysis.cpp (diff)
The file was modifiedmlir/test/lib/Analysis/CMakeLists.txt (diff)
The file was modifiedmlir/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp (diff)
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp (diff)
The file was modifiedmlir/include/mlir/Analysis/LoopAnalysis.h (diff)
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td (diff)
Commit d5f2013004ef8d2d9995fd45a154744bf7c264e9 by wlei
[AutoFDO][llvm-profgen] Profile generation for LBR(non-CS) sample

This patch introduces non-CS AutoFDO profile generation into LLVM. The profile is supposed to be well consumed by compiler using `-fprofile-sample-use=[profile]`.

After range and branch counters are extracted from the LBR sample, here we go through each addresses for symbolization, create FunctionSamples and populate its sub fields like TotalSamples, BodySamples and HeadSamples etc. For inlined code, as we need to map back to original code, so we always add body samples to the leaf frame's function sample.

Reviewed By: wenlei, hoy

Differential Revision: https://reviews.llvm.org/D109551
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp (diff)
The file was addedllvm/test/tools/llvm-profgen/Inputs/inline-noprobe2.perfscript
The file was addedllvm/test/tools/llvm-profgen/inline-noprobe2.test
The file was addedllvm/test/tools/llvm-profgen/inline-noprobe.test
The file was modifiedllvm/tools/llvm-profgen/llvm-profgen.cpp (diff)
The file was addedllvm/test/tools/llvm-profgen/Inputs/inline-noprobe.perfbin
The file was addedllvm/test/tools/llvm-profgen/Inputs/inline-noprobe2.perfbin
The file was addedllvm/test/tools/llvm-profgen/noinline-noprobe.test
The file was addedllvm/test/tools/llvm-profgen/Inputs/inline-noprobe.perfscript
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.h (diff)
The file was removedllvm/test/tools/llvm-profgen/noprobe.test
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.h (diff)
Commit b45476c94ce8ea94e2ad4d93ceda00eb4078e682 by antiagainst
[mlir][tosa] Do not fold transpose with quantized types

For such cases, the type of the constant DenseElementsAttr is
different from the transpose op return type.

Reviewed By: rsuderman

Differential Revision: https://reviews.llvm.org/D110446
The file was modifiedmlir/lib/Dialect/Tosa/IR/TosaOps.cpp (diff)
The file was modifiedmlir/test/Dialect/Tosa/canonicalize.mlir (diff)
Commit 28277e9b48601dee7027ba6ed50554db821ba09b by wlei
[AutoFDO][llvm-profgen] Report zero count for unexecuted part of function code

In order to be consistent with compiler that interprets zero count as unexecuted(cold), this change reports zero-value count for unexecuted part of function code. For the implementation, it leverages the range counter, initializes all the executed function range with the zero-value. After all ranges are merged and converted into disjoint ranges, the remaining zero count will indicates the unexecuted(cold) part of the function.

This change also extends the current `findDisjointRanges` method which now can support adding zero-value range.

Reviewed By: hoy, wenlei

Differential Revision: https://reviews.llvm.org/D109713
The file was modifiedllvm/test/tools/llvm-profgen/inline-noprobe.test (diff)
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.h (diff)
The file was modifiedllvm/test/tools/llvm-profgen/inline-noprobe2.test (diff)
The file was modifiedllvm/tools/llvm-profgen/ProfiledBinary.cpp (diff)
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.cpp (diff)
The file was modifiedllvm/tools/llvm-profgen/ProfileGenerator.h (diff)
Commit 1422fa5fab369b0ec223b58788c68f91a4093076 by wlei
[llvm-profgen] Unify output format of different unsymbolized profiles

Differential Revision: https://reviews.llvm.org/D110080
The file was modifiedllvm/tools/llvm-profgen/PerfReader.cpp (diff)
The file was modifiedllvm/test/tools/llvm-profgen/cs-interrupt.test (diff)
The file was modifiedllvm/test/tools/llvm-profgen/noinline-cs-noprobe.test (diff)
The file was modifiedllvm/test/tools/llvm-profgen/inline-cs-noprobe.test (diff)
The file was modifiedllvm/test/tools/llvm-profgen/recursion-compression-pseudoprobe.test (diff)
The file was modifiedllvm/test/tools/llvm-profgen/noinline-cs-pseudoprobe.test (diff)
The file was modifiedllvm/tools/llvm-profgen/PerfReader.h (diff)
The file was modifiedllvm/test/tools/llvm-profgen/inline-cs-pseudoprobe.test (diff)
Commit 62d6ff5e9e70dd11a4e9e6efc48ce174cd6849bd by Jonas Devlieghere
[dsymutil] Track incompleteness across unions

When determining the incompleteness of a DIE based on its children, make
sure we propagate it across union types. See test case for an example.
Without this patch we never emit the definition of Container_ivars.

Differential revision: https://reviews.llvm.org/D110443
The file was addedllvm/test/tools/dsymutil/Inputs/private/tmp/union/a.out
The file was addedllvm/test/tools/dsymutil/Inputs/private/tmp/union/container.o
The file was addedllvm/test/tools/dsymutil/X86/union-fwd-decl.test
The file was addedllvm/test/tools/dsymutil/Inputs/private/tmp/union/use.o
The file was modifiedllvm/lib/DWARFLinker/DWARFLinker.cpp (diff)
Commit 9911af4b91c670477cf920f168b339bd2f3f307f by dblaikie
WIP: Verify -gsimple-template-names=mangled values

Clang will encode names that should be able to be simplified as
"_STNname|<template, args>" (eg: "_STNt1|<int>") - this verification
mode will detect these names, decode them, create the original name
("t1<int>") and the simple name ("t1") - letting the simple name run
through the usual rebuilding logic - then compare the two sources of the
full name - the rebuilt and the _STN encoding.

This helps ensure that -gsimple-template-names is lossless.
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFDie.h (diff)
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFDie.cpp (diff)
The file was modifiedllvm/test/tools/llvm-dwarfdump/X86/prettyprint_types.s (diff)
The file was modifiedllvm/include/llvm/DebugInfo/DWARF/DWARFVerifier.h (diff)
The file was modifiedllvm/lib/DebugInfo/DWARF/DWARFVerifier.cpp (diff)
Commit 37f1b7a3f35fd9edbb110a3845e79d46224ea79b by Lang Hames
[ORC] Allow construction of an ExecutorAddrRange from an addr and a size.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/ExecutorAddress.h (diff)
The file was modifiedllvm/unittests/ExecutionEngine/Orc/ExecutorAddressTest.cpp (diff)
Commit c6288759296f808a2f7304bbd1bd5b18974e4ccc by Jonas Devlieghere
[lldb] Copy the system debugserver in LLDB.framework

When using the system debugserver for testing, copy the binary in the
LLDB.framework Resource directory instead of the build's bin directory.

rdar://82998263
The file was modifiedlldb/test/API/CMakeLists.txt (diff)
Commit d0649320bf39efddf10a430c1821911060d684b2 by Jonas Devlieghere
[dsymutil] Update union-fwd-decl.test for Windows

Remove path separators from CHECK-lines in union-fwd-decl.test
The file was modifiedllvm/test/tools/dsymutil/X86/union-fwd-decl.test (diff)
Commit 715cf6ffb9a0491aa8749bf024d741de520fa1f2 by craig.topper
[RISCV] Add another isel optimization for (and (shl X, c2), c1).

Where c1 is a shifted mask with 32-c2 leading zeros and c3 trailing
zeros and c3>c2. We can select it as (slli (srliw X, c3-c2), c3).
The file was modifiedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-bswap.ll (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp (diff)
The file was modifiedllvm/test/CodeGen/RISCV/bswap-ctlz-cttz-ctpop.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rv64zbb.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rv64zbp.ll (diff)
Commit e8b376547b4b77671c36607ade025d3272699e7a by wmi
Fixed a bug in https://reviews.llvm.org/rG8eb617d719bdc6a4ed7773925d2421b9bbdd4b7a.

For compressed profile when reading an unknown section, the data reader pointer
adjustment was incorrect. This patch fixed that.
The file was modifiedllvm/include/llvm/ProfileData/SampleProfReader.h (diff)
The file was addedllvm/test/tools/llvm-profdata/Inputs/unknown.section.compressed.extbin.profdata
The file was modifiedllvm/test/tools/llvm-profdata/forward-compatible.test (diff)
Commit 80865f7579d619dee4ffd5abb72f641ef74dedbb by wmi
Add "REQUIRES: zlib" in forward-compatible.test since it handles compressed file.
The file was modifiedllvm/test/tools/llvm-profdata/forward-compatible.test (diff)
Commit 6deaebe5fe00bfb69d9d007bae95fac70779398a by kkleine
[llvm] Improve export.sh with help and snapshot

This change adds the ability to create source tarballs for unreleased or untagged code by providing the `--git-ref <GIT_REF>` flag to the `llvm/utils/release/export.sh` script. This is useful for creating daily snapshot tarballs that can easily be consumed by packagers who want to build a daily snapshot.

The default behavior of `export.sh` hasn't changed.

You may also provide a `--template` argument to say how the artifacts
are supposed to be named (as suggested by @hans).

The `-help` output of `export.sh` was changed quite significantly to look like this:

```
Export the Git sources and build tarballs from them.

Usage: export.sh [-release|--release <major>.<minor>.<patch>]
                      [-rc|--rc <num>]
                      [-final|--final]
                      [-git-ref|--git-ref <git-ref>]
                      [-template|--template <template>]

Flags:

  -release  | --release <major>.<minor>.<patch>    The version number of the release
  -rc       | --rc <num>                           The release candidate number
  -final    | --final                              When provided, this option will disable the rc flag
  -git-ref  | --git-ref <git-ref>                  (optional) Use <git-ref> to determine the release and don't export the test-suite files
  -template | --template <template>                (optional) Possible placeholders: $PROJECT $YYYYMMDD $GIT_REF $RELEASE $RC.
                                                   Defaults to '${PROJECT}-${RELEASE}${RC}.src.tar.xz'.

The following list shows the filenames (with <placeholders>) for the artifacts
that are being generated (given that you don't touch --template).

  * llvm-<RELEASE><RC>.src.tar.xz
  * clang-<RELEASE><RC>.src.tar.xz
  * compiler-rt-<RELEASE><RC>.src.tar.xz
  * libcxx-<RELEASE><RC>.src.tar.xz
  * libcxxabi-<RELEASE><RC>.src.tar.xz
  * libclc-<RELEASE><RC>.src.tar.xz
  * clang-tools-extra-<RELEASE><RC>.src.tar.xz
  * polly-<RELEASE><RC>.src.tar.xz
  * lldb-<RELEASE><RC>.src.tar.xz
  * lld-<RELEASE><RC>.src.tar.xz
  * openmp-<RELEASE><RC>.src.tar.xz
  * libunwind-<RELEASE><RC>.src.tar.xz
  * flang-<RELEASE><RC>.src.tar.xz

Additional files being generated:

  * llvm-project-<RELEASE><RC>.src.tar.xz    (the complete LLVM source project)
  * test-suite-<RELEASE><RC>.src.tar.xz      (only when not using --git-ref)

To ease the creation of snapshot builds, we also provide these files

  * llvm-release-<YYYYMMDD>.txt        (contains the <RELEASE> as a text)
  * llvm-rc-<YYYYMMDD>.txt             (contains the rc version passed to the invocation of export.sh)
  * llvm-git-revision-<YYYYMMDD>.txt   (contains the current git revision sha1)

Example values for the placeholders:

  * <RELEASE>  -> 13.0.0
  * <YYYYMMDD> -> 20210414
  * <RC>       -> rc4        (will be empty when using --git-ref)

In order to generate snapshots of the upstream main branch you could do this for example:

  export.sh --git-ref upstream/main --template '${PROJECT}-${YYYYMMDD}.src.tar.xz'

```

Reviewed By: tstellar

Differential Revision: https://reviews.llvm.org/D101446
The file was modifiedllvm/utils/release/export.sh (diff)