SuccessChanges

Summary

  1. [CodeView][DebugInfo] Add test case to show that linkage names are not (details)
  2. Revert "[BasicAA] Handle recursive queries more efficiently" (details)
  3. [NFC][SimplifyCFG] Add testcase showing that we fail to preserve DomTree in switchToSelect() (details)
  4. [Utils] splitBlockBefore() always operates on DomTreeUpdater, so take it, not DomTree (details)
  5. [Utils][SimplifyCFG] Port SplitBlock() to DomTreeUpdater (details)
  6. [SimplifyCFG] Port SplitBlockAndInsertIfThen() to DomTreeUpdater (details)
  7. [SimplifyCFG][BasicBlockUtils] Port SplitBlockPredecessors()/SplitLandingPadPredecessors() to DomTreeUpdater (details)
  8. [SimplifyCFG] switchToSelect(): don't forget to insert DomTree edge iff needed (details)
  9. [GWP-ASan] Add inbuilt options parser. (details)
  10. [MSVC] Don't add -nostdinc++ -isystem to runtimes builds (details)
  11. [Sema] turns -Wfree-nonheap-object on by default (details)
  12. BreakCriticalEdges: do not split the critical edge from a CallBr indirect successor (details)
  13. [mlir][Linalg] Add missing check to canonicalization of GenericOp that are identity ops. (details)
  14. Skip 'g' packet tests when running on darwin; debugserver doesn't impl (details)
  15. [SLP] remove dead code in reduction matching; NFC (details)
  16. Revert "Revert "ADT: Fix reference invalidation in SmallVector..."" (details)
  17. [AArch64][GlobalISel] Select immediate fcmp if the zero is on the LHS. (details)
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/include/llvm/Analysis/BasicAliasAnalysis.h
The file was modifiedllvm/lib/Analysis/BasicAliasAnalysis.cpp
The file was modifiedllvm/lib/Analysis/GlobalsModRef.cpp
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
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
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/lib/Transforms/Utils/BasicBlockUtils.cpp
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
The file was modifiedllvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
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/include/llvm/Transforms/Utils/BasicBlockUtils.h
The file was modifiedllvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
The file was modifiedllvm/lib/Transforms/Utils/BasicBlockUtils.cpp
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
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
The file was modifiedllvm/include/llvm/Transforms/Utils/BasicBlockUtils.h
The file was modifiedllvm/lib/Transforms/Utils/SimplifyCFG.cpp
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
The file was modifiedllvm/test/Transforms/SimplifyCFG/switchToSelect-domtree-preservation-edgecase.ll
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 modifiedcompiler-rt/lib/gwp_asan/tests/CMakeLists.txt
The file was addedcompiler-rt/tools/gwp_asan/options_parser_fuzzer.cpp
The file was modifiedcompiler-rt/test/scudo/standalone/unit/lit.site.cfg.py.in
The file was modifiedcompiler-rt/lib/gwp_asan/CMakeLists.txt
The file was modifiedcompiler-rt/lib/gwp_asan/optional/options_parser.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/flags_test.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/optional/options_parser.h
The file was modifiedcompiler-rt/lib/scudo/scudo_allocator.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/CMakeLists.txt
The file was modifiedcompiler-rt/lib/scudo/standalone/flags.cpp
The file was modifiedcompiler-rt/lib/gwp_asan/options.inc
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
The file was modifiedcompiler-rt/tools/gwp_asan/CMakeLists.txt
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
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/include/clang/Basic/DiagnosticGroups.td
The file was modifiedclang/test/Analysis/free.c
The file was modifiedclang/test/Analysis/NewDelete-intersections.mm
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
Commit ed0fd567ebdbbbbc61eb87346a58196a73f9b814 by ndesaulniers
BreakCriticalEdges: do not split the critical edge from a CallBr indirect successor

Otherwise we'll fail the assertion in SplitBlockPredecessors() related
to splitting the edges from CallBr's.

Fixes: https://github.com/ClangBuiltLinux/linux/issues/1161
Fixes: https://github.com/ClangBuiltLinux/linux/issues/1252

Reviewed By: void, MaskRay, jyknight

Differential Revision: https://reviews.llvm.org/D88438
The file was addedllvm/test/Transforms/LoopStrengthReduce/callbr-critical-edge-splitting.ll
The file was modifiedllvm/lib/Transforms/Utils/BreakCriticalEdges.cpp
The file was addedllvm/test/Transforms/LoopStrengthReduce/callbr-critical-edge-splitting2.ll
Commit d7bc3b7ce23b664d6620cdc32370a8614523ca2f by ravishankarm
[mlir][Linalg] Add missing check to canonicalization of GenericOp that are identity ops.

The operantion is an identity if the values yielded by the operation
is the argument of the basic block of that operation. Add this missing check.

Differential Revision: https://reviews.llvm.org/D94819
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit 10ac9b29a4ca9e75bcbfa9576e3d8ee83cc9cd78 by Jason Molenda
Skip 'g' packet tests when running on darwin; debugserver doesn't impl

Differential Revision: https://reviews.llvm.org/D94754
The file was modifiedlldb/test/API/tools/lldb-server/register-reading/TestGdbRemoteGPacket.py
Commit ceb3cdccd0fb597659147e0f538fdee91414541e by spatel
[SLP] remove dead code in reduction matching; NFC

To get into this block we had: !A || B || C
and we checked C in the first 'if' clause
leaving !A || B. But the 2nd 'if' is checking:
A && !B --> !(!A || B)
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit ceaf0110ff5e0c2de1f03d65d13703d34d0d5737 by Duncan P. N. Exon Smith
Revert "Revert "ADT: Fix reference invalidation in SmallVector...""

This reverts commit 33be50daa9ce1074c3b423a4ab27c70c0722113a,
effectively reapplying:

- 260a856c2abcef49c7cb3bdcd999701db3e2af38
- 3043e5a5c33c4c871f4a1dfd621a8839f9a1f0b3
- 49142991a685bd427d7e877c29c77371dfb7634c

... with a fix to skip a call to `SmallVector::isReferenceToStorage()`
when we know the parameter had been taken by value for small, POD-like
`T`. See https://reviews.llvm.org/D93779 for the discussion on the
revert.

At a high-level, these commits fix reference invalidation in
SmallVector's push_back, append, insert (one or N), and resize
operations. For more details, please see the original commit messages.

This commit fixes a bug that crept into
`SmallVectorTemplateCommon::reserveForAndGetAddress()` during the review
process after performance analysis was done. That function is now called
`reserveForParamAndGetAddress()`, clarifying that it only works for
parameter values. It uses that knowledge to bypass
`SmallVector::isReferenceToStorage()` when `TakesParamByValue`. This is
`constexpr` and avoids adding overhead for "small enough", trivially
copyable `T`.

Performance could potentially be tuned further by increasing the
threshold for `TakesParamByValue`, which is currently defined as:
```
bool TakesParamByValue = sizeof(T) <= 2 * sizeof(void *);
```
in the POD-like version of SmallVectorTemplateBase (else, `false`).

Differential Revision: https://reviews.llvm.org/D94800
The file was modifiedllvm/include/llvm/ADT/SmallVector.h
The file was modifiedllvm/unittests/ADT/SmallVectorTest.cpp
Commit aa8a2d8a3da3704f82ba4ea3a6e7b463737597e1 by Amara Emerson
[AArch64][GlobalISel] Select immediate fcmp if the zero is on the LHS.
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-fcmp.mir