SuccessChanges

Summary

  1. [DebugInfo][CodeView] Change in line tables only mode to emit type information (details)
  2. [ARM] Constant tripcount tail predication loop tests. NFC (details)
  3. [ARM] Tail predication with constant loop bounds (details)
  4. [MIPatternMatch] Add m_OneNonDBGUse (details)
  5. [mlir] Add Complex dialect. (details)
  6. [RISCV] Add implementation of targetShrinkDemandedConstant to optimize AND immediates. (details)
  7. GetMacosAlignedVersion() fails if sysctl is not setup (details)
  8. Fix libc++ clang-cl build, swap attribute order (details)
  9. [CodeGen] Removes unwanted optimisation for TargetConstantFP (details)
  10. [SLP] remove unused reduction functions; NFC (details)
Commit 6227069bdce6b0c3c22f0a0c8f1aef705985125a by akhuang
[DebugInfo][CodeView] Change in line tables only mode to emit type information
for function scopes, rather than using the qualified name.

In line-tables-only mode, we used to emit qualified names as the display name for functions when using CodeView.
This patch changes to emitting the parent scopes instead, with forward declarations for class types.
The total object file size ends up being slightly smaller than if we use the full qualified names.

Differential Revision: https://reviews.llvm.org/D94639
The file was modifiedclang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
The file was addedclang/test/CodeGenCXX/debug-info-codeview-scopes.cpp
Commit a0770f9e4e923292066dd095cf01a28671e40ad6 by david.green
[ARM] Constant tripcount tail predication loop tests. NFC
The file was addedllvm/test/CodeGen/Thumb2/LowOverheadLoops/constbound.ll
Commit f5abf0bd485a1fa7e332f5f8266c25755d385a8a by david.green
[ARM] Tail predication with constant loop bounds

The TripCount for a predicated vector loop body will be
ceil(ElementCount/Width). This alters the conversion of an
active.lane.mask to a VCPT intrinsics to match.

Differential Revision: https://reviews.llvm.org/D94608
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/constbound.ll
The file was modifiedllvm/lib/Target/ARM/MVETailPredication.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/tp-multiple-vpst.ll
Commit cc90d41945f6c72d92fbbc6e7b38ceff6e7e1e93 by Jessica Paquette
[MIPatternMatch] Add m_OneNonDBGUse

Add a matcher that checks if the given subpattern has only one non-debug use.

Also improve existing m_OneUse testcase.

Differential Revision: https://reviews.llvm.org/D94705
The file was modifiedllvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
The file was modifiedllvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
Commit d0cb0d30a431578ecedb98c57780154789f3c594 by pifon
[mlir] Add Complex dialect.

Differential Revision: https://reviews.llvm.org/D94764
The file was modifiedmlir/lib/Conversion/PassDetail.h
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was addedmlir/include/mlir/Dialect/Complex/IR/CMakeLists.txt
The file was addedmlir/include/mlir/Dialect/Complex/IR/ComplexBase.td
The file was addedmlir/test/Conversion/ComplexToLLVM/convert-to-llvm.mlir
The file was modifiedmlir/include/mlir/Conversion/Passes.h
The file was addedmlir/lib/Dialect/Complex/CMakeLists.txt
The file was addedmlir/test/Dialect/Complex/ops.mlir
The file was modifiedmlir/test/mlir-opt/commandline.mlir
The file was addedmlir/lib/Dialect/Complex/IR/ComplexDialect.cpp
The file was modifiedmlir/include/mlir/InitAllDialects.h
The file was modifiedmlir/lib/Dialect/CMakeLists.txt
The file was addedmlir/lib/Dialect/Complex/IR/CMakeLists.txt
The file was addedmlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
The file was addedmlir/include/mlir/Dialect/Complex/IR/Complex.h
The file was modifiedmlir/lib/Conversion/CMakeLists.txt
The file was addedmlir/lib/Dialect/Complex/IR/ComplexOps.cpp
The file was addedmlir/include/mlir/Conversion/ComplexToLLVM/ComplexToLLVM.h
The file was addedmlir/include/mlir/Dialect/Complex/CMakeLists.txt
The file was addedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
The file was modifiedmlir/include/mlir/Dialect/CMakeLists.txt
The file was addedmlir/lib/Conversion/ComplexToLLVM/CMakeLists.txt
Commit 86e604c4d68528478333a8901d7c79c09ca16fa8 by craig.topper
[RISCV] Add implementation of targetShrinkDemandedConstant to optimize AND immediates.

SimplifyDemandedBits can remove set bits from immediates from instructions
like AND/OR/XOR. This can prevent them from being efficiently
codegened on RISCV.

This adds an initial version that tries to keep or form 12 bit
sign extended immediates for AND operations to enable use of ANDI.
If that doesn't work we'll try to create a 32 bit sign extended immediate
to use LUI+ADDIW.

More optimizations are possible for different size immediates or
different operations. But this is a good starting point that already
has test coverage.

Reviewed By: frasercrmck

Differential Revision: https://reviews.llvm.org/D94628
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/test/CodeGen/RISCV/rv64Zbp.ll
The file was modifiedllvm/test/CodeGen/RISCV/srem-vector-lkk.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/copysign-casts.ll
The file was modifiedllvm/test/CodeGen/RISCV/half-bitmanip-dagcombines.ll
The file was modifiedllvm/test/CodeGen/RISCV/frame-info.ll
The file was modifiedllvm/test/CodeGen/RISCV/srem-lkk.ll
The file was modifiedllvm/test/CodeGen/RISCV/stack-realignment-with-variable-sized-objects.ll
The file was modifiedllvm/test/CodeGen/RISCV/vararg.ll
Commit 84de4faf4cae2885056c608db8256e9f039050b3 by julian.lettner
GetMacosAlignedVersion() fails if sysctl is not setup

`GetMacosAlignedVersion()` fails for ASan-ified launchd because the
sanitizer initialization code runs before `sysctl` has been setup by
launchd.  In this situation, `sysctl kern.osproductversion` returns a
non-empty string that does not match our expectations of a
well-formatted version string.

Retrieving the kernel version (via `sysctl kern.osrelease`) still works,
so we can use it to add a fallback for this corner case.

Differential Revision: https://reviews.llvm.org/D94190
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_mac.cpp
Commit 4f24d0dd5386cc0ff61be23062b89855da87094b by rnk
Fix libc++ clang-cl build, swap attribute order

Clang insists that __attribute__ attributes precede __declspec
attributes. This is a longstanding known issue:
https://llvm.org/pr24559. Re-order the visibility and deprecation macros
to fix the build.

Differential Revision: https://reviews.llvm.org/D94788
The file was modifiedlibcxx/src/locale.cpp
The file was modifiedlibcxx/include/__locale
Commit a9e939760c6f21476109559cc3e21779bddddaff by craig.topper
[CodeGen] Removes unwanted optimisation for TargetConstantFP

This 'FIXME' popped up in the development of an out-of-tree backend.
Quick fix, but first llvm upstream patch, therefore I do not have commit rights, so if approved please commit?

- Test is not included as this came up in an out-of-tree backend (if required, please hint on how to test this).

Patch by simveg (Simon)

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D93219
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Commit 1f21de535d37997c41b9b1ecb2f7ca0e472e9f77 by spatel
[SLP] remove unused reduction functions; NFC

These were made obsolete by simplifying the code in recent patches.
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp