SuccessChanges

Summary

  1. [X86][SSE] Attempt to fold shuffle(binop(),binop()) -> binop(shuffle(),shuffle()) (details)
  2. [flang] Disallow INTENT attribute on procedure dummy arguments (details)
  3. [TargetLowering] Don't speculatively call ComputeNumSignBits. NFC (details)
  4. [flang][driver] Copy test file into a temp dir when testing (nfc) (details)
  5. [clangd] Update CC Ranking model with better sampling. (details)
  6. [OpenCL][Docs] Fixed cross-section reference in OpenCLSupport (details)
  7. [DebugInfo][CodeView] Change in line tables only mode to emit type information (details)
  8. [ARM] Constant tripcount tail predication loop tests. NFC (details)
  9. [ARM] Tail predication with constant loop bounds (details)
  10. [MIPatternMatch] Add m_OneNonDBGUse (details)
  11. [mlir] Add Complex dialect. (details)
  12. [RISCV] Add implementation of targetShrinkDemandedConstant to optimize AND immediates. (details)
  13. GetMacosAlignedVersion() fails if sysctl is not setup (details)
  14. Fix libc++ clang-cl build, swap attribute order (details)
  15. [CodeGen] Removes unwanted optimisation for TargetConstantFP (details)
  16. [SLP] remove unused reduction functions; NFC (details)
  17. [CodeView][DebugInfo] Add test case to show that linkage names are not (details)
  18. Revert "[BasicAA] Handle recursive queries more efficiently" (details)
  19. [NFC][SimplifyCFG] Add testcase showing that we fail to preserve DomTree in switchToSelect() (details)
  20. [Utils] splitBlockBefore() always operates on DomTreeUpdater, so take it, not DomTree (details)
  21. [Utils][SimplifyCFG] Port SplitBlock() to DomTreeUpdater (details)
  22. [SimplifyCFG] Port SplitBlockAndInsertIfThen() to DomTreeUpdater (details)
  23. [SimplifyCFG][BasicBlockUtils] Port SplitBlockPredecessors()/SplitLandingPadPredecessors() to DomTreeUpdater (details)
  24. [SimplifyCFG] switchToSelect(): don't forget to insert DomTree edge iff needed (details)
  25. [GWP-ASan] Add inbuilt options parser. (details)
  26. [MSVC] Don't add -nostdinc++ -isystem to runtimes builds (details)
  27. [Sema] turns -Wfree-nonheap-object on by default (details)
Commit be69e66b1cd826f499566e1c3dadbf04e872baa0 by llvm-dev
[X86][SSE] Attempt to fold shuffle(binop(),binop()) -> binop(shuffle(),shuffle())

If this will help us fold shuffles together, then push the shuffle through the merged binops.

Ideally this would be performed in DAGCombiner::visitVECTOR_SHUFFLE but getting an efficient+legal merged shuffle can be tricky - on SSE we can be confident that for 32/64-bit elements vectors shuffles should easily fold.
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/haddsub-shuf.ll (diff)
Commit 1e1a011b09d0e6e9ff62b37721906485c386708c by psteinfeld
[flang] Disallow INTENT attribute on procedure dummy arguments

C843 states that "An entity with the INTENT attribute shall be a dummy
data object or a dummy procedure pointer."  This change enforces that
and fixes some tests that erroneously violated this rule.

Differential Revision: https://reviews.llvm.org/D94781
The file was modifiedflang/test/Semantics/assign03.f90 (diff)
The file was modifiedflang/test/Semantics/separate-mp02.f90 (diff)
The file was modifiedflang/lib/Semantics/check-declarations.cpp (diff)
The file was modifiedflang/test/Semantics/call09.f90 (diff)
Commit 4c5066b0789d9c38d6362a684346b68261911d29 by craig.topper
[TargetLowering] Don't speculatively call ComputeNumSignBits. NFC

These methods are recursive so a little costly.

We only look at the result in one place in this function and it's
conditional. We also only need the second call if the first had
enough returned enough sign bits.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp (diff)
Commit b6e06a740c26b2b9d91455ad49a5009335089242 by andrzej.warzynski
[flang][driver] Copy test file into a temp dir when testing (nfc)

The following driver invocation will generate an output file
in the same directory as the input file:

```
flang-new -fc1 -test-io test-input.f90
```

This is the desired behaviour. However, when testing we need to make
sure that we don't pollute the source directory. To this end, copy the
input file into a temporary directory before testing.

This is similar to https://reviews.llvm.org/D94243.
The file was modifiedflang/test/Frontend/input-output-file.f90 (diff)
Commit d5047d762f391c94939d67fc84cae25b24125694 by usx
[clangd] Update CC Ranking model with better sampling.

A better sampling strategy was used to generate the dataset for this
model.
New signals introduced in this model:
- NumNameInContext: Number of words in the context that matches the name
of the candidate.
- FractionNameInContext: Fraction of the words in context matching the
name of the candidate.

We remove the signal `IsForbidden` from the model and down rank
forbidden signals aggresively.

Differential Revision: https://reviews.llvm.org/D94697
The file was modifiedclang-tools-extra/clangd/quality/model/features.json (diff)
The file was modifiedclang-tools-extra/clangd/quality/model/forest.json (diff)
The file was modifiedclang-tools-extra/clangd/Quality.cpp (diff)
Commit bc84f89c71ab62d510973f64f022bee31e53af96 by anastasia.stulova
[OpenCL][Docs] Fixed cross-section reference in OpenCLSupport

Tags: #clang
The file was modifiedclang/docs/OpenCLSupport.rst (diff)
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 addedclang/test/CodeGenCXX/debug-info-codeview-scopes.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp (diff)
The file was modifiedclang/test/CodeGenCXX/debug-info-codeview-display-name.cpp (diff)
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/tp-multiple-vpst.ll (diff)
The file was modifiedllvm/lib/Target/ARM/MVETailPredication.cpp (diff)
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/constbound.ll (diff)
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 (diff)
The file was modifiedllvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp (diff)
Commit d0cb0d30a431578ecedb98c57780154789f3c594 by pifon
[mlir] Add Complex dialect.

Differential Revision: https://reviews.llvm.org/D94764
The file was modifiedmlir/lib/Conversion/CMakeLists.txt (diff)
The file was addedmlir/lib/Dialect/Complex/IR/CMakeLists.txt
The file was addedmlir/test/Dialect/Complex/ops.mlir
The file was addedmlir/lib/Dialect/Complex/CMakeLists.txt
The file was modifiedmlir/include/mlir/Conversion/Passes.td (diff)
The file was addedmlir/lib/Conversion/ComplexToLLVM/ComplexToLLVM.cpp
The file was addedmlir/include/mlir/Dialect/Complex/IR/CMakeLists.txt
The file was addedmlir/lib/Dialect/Complex/IR/ComplexOps.cpp
The file was modifiedmlir/test/mlir-opt/commandline.mlir (diff)
The file was addedmlir/include/mlir/Conversion/ComplexToLLVM/ComplexToLLVM.h
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 addedmlir/lib/Conversion/ComplexToLLVM/CMakeLists.txt
The file was modifiedmlir/lib/Dialect/CMakeLists.txt (diff)
The file was modifiedmlir/include/mlir/Dialect/CMakeLists.txt (diff)
The file was modifiedmlir/lib/Conversion/PassDetail.h (diff)
The file was addedmlir/include/mlir/Dialect/Complex/IR/Complex.h
The file was modifiedmlir/include/mlir/Conversion/Passes.h (diff)
The file was addedmlir/lib/Dialect/Complex/IR/ComplexDialect.cpp
The file was addedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
The file was modifiedmlir/include/mlir/InitAllDialects.h (diff)
The file was addedmlir/include/mlir/Dialect/Complex/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/test/CodeGen/RISCV/copysign-casts.ll (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp (diff)
The file was modifiedllvm/test/CodeGen/RISCV/rv64Zbp.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/frame-info.ll (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h (diff)
The file was modifiedllvm/test/CodeGen/RISCV/stack-realignment-with-variable-sized-objects.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/half-bitmanip-dagcombines.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/srem-vector-lkk.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/srem-lkk.ll (diff)
The file was modifiedllvm/test/CodeGen/RISCV/vararg.ll (diff)
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 (diff)
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/include/__locale (diff)
The file was modifiedlibcxx/src/locale.cpp (diff)
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 (diff)
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 (diff)
Commit a1be47b4771467998d7549dcd1b9f9cebdaa9af9 by akhuang
[CodeView][DebugInfo] Add test case to show that linkage names are not
being added to class types in -gline-tables-only.
Also changed the name of the test file for clarity.
(follow up to D94639)
The file was removedclang/test/CodeGenCXX/debug-info-codeview-scopes.cpp
The file was addedclang/test/CodeGenCXX/debug-info-gline-tables-only-codeview.cpp
Commit 64db296e5a8c9fdc2f7feb4afb60d59c140a78aa by rnk
Revert "[BasicAA] Handle recursive queries more efficiently"

This reverts commit a3904cc77f181cff7355357688edfc392a236f5d.
It causes the compiler to crash while building Harfbuzz for ARM in
Chromium, reduced reproducer forthcoming:
https://crbug.com/1167305
The file was modifiedllvm/lib/Analysis/GlobalsModRef.cpp (diff)
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp (diff)
The file was modifiedllvm/include/llvm/Analysis/BasicAliasAnalysis.h (diff)
Commit 61ec2280308bd5e2161efe2959d7d26798c85cb4 by lebedev.ri
[NFC][SimplifyCFG] Add testcase showing that we fail to preserve DomTree in switchToSelect()
The file was addedllvm/test/Transforms/SimplifyCFG/switchToSelect-domtree-preservation-edgecase.ll
Commit b81f75fa79162e9e2ba84d6b4cdd72f564b050c6 by lebedev.ri
[Utils] splitBlockBefore() always operates on DomTreeUpdater, so take it, not DomTree

Even though not all it's users operate on DomTreeUpdater,
it itself internally operates on DomTreeUpdater,
so it must mean everything is fine with that,
so just do that globally.
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp (diff)
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h (diff)
Commit c845c724c2323660e81a0b284aaa461842f1b402 by lebedev.ri
[Utils][SimplifyCFG] Port SplitBlock() to DomTreeUpdater

This is not nice, but it's the best transient solution possible,
and is better than just duplicating the whole function.

The problem is, this function is widely used,
and it is not at all obvious that all the users
could be painlessly switched to operate on DomTreeUpdater,
and somehow i don't feel like porting all those users first.

This function is one of last three that not operate on DomTreeUpdater.
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h (diff)
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp (diff)
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp (diff)
The file was modifiedllvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp (diff)
Commit 286cf6cb029a9942df6ff1d99570e93c25fe29f0 by lebedev.ri
[SimplifyCFG] Port SplitBlockAndInsertIfThen() to DomTreeUpdater

This is not nice, but it's the best transient solution possible,
and is better than just duplicating the whole function.

The problem is, this function is widely used,
and it is not at all obvious that all the users
could be painlessly switched to operate on DomTreeUpdater,
and somehow i don't feel like porting all those users first.

This function is one of last three that not operate on DomTreeUpdater.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp (diff)
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp (diff)
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h (diff)
The file was modifiedllvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp (diff)
Commit c6654a4cdab4156bae51970fa64993e790fc4adb by lebedev.ri
[SimplifyCFG][BasicBlockUtils] Port SplitBlockPredecessors()/SplitLandingPadPredecessors() to DomTreeUpdater

This is not nice, but it's the best transient solution possible,
and is better than just duplicating the whole function.

The problem is, this function is widely used,
and it is not at all obvious that all the users
could be painlessly switched to operate on DomTreeUpdater,
and somehow i don't feel like porting all those users first.

This function is one of last three that not operate on DomTreeUpdater.
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp (diff)
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h (diff)
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp (diff)
Commit a14c36fe27f5c36de44049237011d140a7277774 by lebedev.ri
[SimplifyCFG] switchToSelect(): don't forget to insert DomTree edge iff needed

DestBB might or might not already be a successor of SelectBB,
and it wasn't we need to ensure that we record the fact in DomTree.

The testcase used to crash in lazy domtree updater mode + non-per-function
domtree validity checks disabled.
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp (diff)
The file was modifiedllvm/test/Transforms/SimplifyCFG/switchToSelect-domtree-preservation-edgecase.ll (diff)
Commit 6a42cbf6d2116b52cb59aa3e23bef93a30cf2dc8 by 31459023+hctim
[GWP-ASan] Add inbuilt options parser.

Adds a modified options parser (shamefully pulled from Scudo, which
shamefully pulled it from sanitizer-common) to GWP-ASan. This allows
customers (Android) to parse options strings in a common way.

Depends on D94117.

AOSP side of these patches is staged at:

- sepolicy (sysprops should only be settable by the shell, in both root and
unrooted conditions):
https://android-review.googlesource.com/c/platform/system/sepolicy/+/1517238

- zygote updates:
https://android-review.googlesource.com/c/platform/frameworks/base/+/1515009

- bionic changes to add `gwp_asan.<process_name>` system property, and
GWP_ASAN_OPTIONS environment variable:
https://android-review.googlesource.com/c/platform/bionic/+/1514989

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D92696
The file was addedcompiler-rt/lib/gwp_asan/tests/options.cpp
The file was addedcompiler-rt/tools/gwp_asan/options_parser_fuzzer.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/flags_test.cpp (diff)
The file was modifiedcompiler-rt/tools/gwp_asan/CMakeLists.txt (diff)
The file was modifiedcompiler-rt/lib/gwp_asan/options.inc (diff)
The file was modifiedcompiler-rt/lib/scudo/scudo_allocator.cpp (diff)
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h (diff)
The file was modifiedcompiler-rt/lib/scudo/standalone/CMakeLists.txt (diff)
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt (diff)
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/CMakeLists.txt (diff)
The file was modifiedcompiler-rt/lib/gwp_asan/optional/options_parser.cpp (diff)
The file was modifiedcompiler-rt/lib/gwp_asan/optional/options_parser.h (diff)
The file was modifiedcompiler-rt/lib/gwp_asan/tests/CMakeLists.txt (diff)
The file was modifiedcompiler-rt/lib/scudo/standalone/flags.cpp (diff)
The file was modifiedcompiler-rt/test/scudo/standalone/unit/lit.site.cfg.py.in (diff)
Commit 98c89ccfbd7467f946874c2af170d0f504355dd1 by rnk
[MSVC] Don't add -nostdinc++ -isystem to runtimes builds

If the host compiler is MSVC or clang-cl, then the compiler used to
buidl the runtimes will be clang-cl, and it doesn't support either of
those flags.

Worse, because -isystem is a space separated flag, it causes all cmake
try_compile tests to fail, so none of the -Wno-* flags make it to the
compiler in libcxx. I noticed that we weren't passing
-Wno-user-defined-literals to clang-cl and were getting warnings in the
build, and this fixes that for me.

Differential Revision: https://reviews.llvm.org/D94817
The file was modifiedruntimes/CMakeLists.txt (diff)
Commit 4a47da2cf440c2f2006d9b04acfef4292de1e263 by cjdb
[Sema] turns -Wfree-nonheap-object on by default

We'd discussed adding the warning to -Wall in D89988. This patch honours that.
The file was modifiedclang/test/Analysis/NewDelete-intersections.mm (diff)
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td (diff)
The file was modifiedclang/include/clang/Basic/DiagnosticGroups.td (diff)
The file was modifiedclang/test/Analysis/free.c (diff)