Changes

Summary

  1. Revert "[clang] Implement P2266 Simpler implicit move" (details)
  2. Revert "[clang] NRVO: Improvements and handling of more cases." (details)
  3. [RISCV] Remove extra assignment of intrinsic ID in ManualCodegen. NFC (details)
  4. [lld/mac] Make binaries written by lld strippable (details)
  5. [RISCV] Avoid scalar outgoing argumetns overwriting vector frame objects. (details)
  6. [lldb] Move once_flags in HostInfoLinux so the internal state struct (details)
  7. [PowerPC] Relax register superclasses for paired memops (details)
  8. [lldb] Fix leak in test (details)
  9. Revert "[CMake] Don't use libc++ by default on Windows yet" (details)
  10. Revert "[Driver] Support libc++ in MSVC" (details)
  11. Function Specialization Pass (details)
  12. [gn build] Port c4a0969b9c14 (details)
  13. [mlir] Refactor ComplexOps.td [NFC] (details)
  14. [clang-tidy] LIT test fix for Remark diagnostic (details)
  15. [compiler-rt] [builtins] [AArch64] Add missing AArch64 data synchronization barrier (dsb) to __clear_cache (details)
  16. [OpenCL][NFC] Reorganize ClangOpenCLBuiltinEmitter comments (details)
  17. Fix implicit dependency on <string> header. NFCI. (details)
  18. [Analysis] Pass RecurrenceDescriptor as const reference. NFCI. (details)
  19. SampleProf.h - fix spelling mistake in assert message. NFC. (details)
  20. [X86] Support __tile_stream_loadd intrinsic for new AMX interface (details)
  21. [NFC][VectorCombine] Extract computeAlignmentAfterScalarization() helper function (details)
  22. [VectorCombine] scalarizeLoadExtract(): use computeAlignmentAfterScalarization() helper (details)
  23. [analyzer] Introduce a new interface for tracking (details)
  24. [analyzer] Reimplement trackExpressionValue as ExpressionHandler (details)
  25. [analyzer] Change FindLastStoreBRVisitor to use Tracker (details)
  26. [analyzer] Hide and rename FindLastStoreBRVisitor (details)
  27. [analyzer] Turn ReturnVisitor into a tracking visitor (details)
  28. [analyzer] Refactor trackRValueExpression into ExpressionHandler (details)
  29. [analyzer] Turn TrackControlDependencyCond into a tracking visitor (details)
  30. [analyzer] Refactor trackExpressionValue to accept TrackingOptions (details)
  31. [llvm-stress] Fix dead code preventing us generating per-element vector selects (details)
  32. clang-format: [JS] don't sort named imports if off. (details)
  33. [OpenCL] Fix overloading resolution of addrspace constructors (details)
Commit db26615aa6a165483e6540b3f6ed684a0cbe06df by aeubanks
Revert "[clang] Implement P2266 Simpler implicit move"

This reverts commit cbd0054b9eb17ec48f0702e3828209646c8f5ebd.
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp (diff)
The file was modifiedclang/test/SemaCXX/coroutines.cpp (diff)
The file was modifiedclang/lib/Sema/SemaType.cpp (diff)
The file was modifiedclang/test/SemaCXX/constant-expression-cxx14.cpp (diff)
The file was modifiedclang/test/CXX/dcl.dcl/dcl.spec/dcl.type/dcl.spec.auto/p7-cxx14.cpp (diff)
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp (diff)
The file was modifiedclang/test/CXX/class/class.init/class.copy.elision/p3.cpp (diff)
The file was modifiedclang/test/CXX/drs/dr3xx.cpp (diff)
The file was modifiedclang/include/clang/Sema/Sema.h (diff)
The file was modifiedclang/test/CXX/temp/temp.decls/temp.mem/p5.cpp (diff)
The file was modifiedclang/test/SemaCXX/deduced-return-type-cxx14.cpp (diff)
The file was modifiedclang/test/SemaCXX/constant-expression-cxx11.cpp (diff)
The file was modifiedclang/lib/Sema/SemaStmt.cpp (diff)
The file was modifiedclang/test/SemaCXX/return-stack-addr.cpp (diff)
The file was modifiedclang/test/CXX/expr/expr.prim/expr.prim.lambda/p4-cxx14.cpp (diff)
The file was modifiedclang/test/SemaCXX/coroutine-rvo.cpp (diff)
The file was modifiedclang/test/SemaCXX/warn-return-std-move.cpp (diff)
Commit 85ca7e424fd050582026a299906c9e8397043c52 by aeubanks
Revert "[clang] NRVO: Improvements and handling of more cases."

This reverts commit 667fbcdd0b2ee5e78f5ce9789b862e3bbca94644.

Causes crashes on a stage 2 build on Windows.
The file was modifiedclang/lib/Sema/SemaStmt.cpp (diff)
The file was modifiedclang/lib/Sema/SemaTemplateInstantiateDecl.cpp (diff)
The file was modifiedclang/include/clang/Sema/Sema.h (diff)
The file was modifiedclang/test/CodeGen/nrvo-tracking.cpp (diff)
The file was modifiedclang/lib/Sema/Sema.cpp (diff)
The file was modifiedclang/lib/Sema/SemaCoroutine.cpp (diff)
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp (diff)
Commit 081ae5fe1aa3ead6d9da75747d3698f09ff89cb9 by craig.topper
[RISCV] Remove extra assignment of intrinsic ID in ManualCodegen. NFC

There's already an autogenerated assignment.

Fixes static analyzer warning reported in PR50593.
The file was modifiedclang/include/clang/Basic/riscv_vector.td (diff)
Commit 54418c5a355eda7ff77a221c692ee90944c25196 by thakis
[lld/mac] Make binaries written by lld strippable

Be less clever when writing the indirect symbols in LC_DYSYMTAB:
lld used to make point __stubs and __la_symbol_ptr point at the
same bytes in the indirect symbol table in the __LINKEDIT segment.
That confused strip, so write the same bytes twice and make
__stubs and __la_symbol_ptr point at one copy each, so that they
don't share data. This unconfuses strip, and seems to be what ld64
does too, so hopefully tools are generally more used to this.

This makes the output binaries a bit larger, but not much: 4 bytes
for roughly each called function from a dylib and each weak function.
Chromium Framewoork grows by 6536 bytes, clang-format by a few hundred.

With this, `strip -x Chromium\ Framework` works (244 MB before stripping
to 171 MB after stripping, compared to 236 MB=>164 MB with ld64). Running
strip without `-x` produces the same error message now for lld-linked
Chromium Framework as for when using ld64 as a linker.

`strip clang-format` also works now but didn't previously.

Fixes PR50657.

Differential Revision: https://reviews.llvm.org/D104081
The file was modifiedlld/MachO/SyntheticSections.cpp (diff)
The file was modifiedlld/test/MachO/indirect-symtab.s (diff)
Commit 643b6407faf460915679f304420cfbee87c47734 by kai.wang
[RISCV] Avoid scalar outgoing argumetns overwriting vector frame objects.

When using FP to access stack objects, the scalable stack objects will
be put at the lower end of the frame. It looks like

```
|-------------------|  <-- FP
| callee-saved regs |
|-------------------|
| scalar local vars |
|-------------------|
| RVV local vars    |
|-------------------|  <-- SP
```

If there are scalar arguments that need to pass through memory and there
are vector objects on the stack using FP to access. The outgoing scalar
arguments will overwrite the vector objects. It looks like

```
|-------------------|  <-- FP
| callee-saved regs |
|-------------------|
| scalar local vars |
|-------------------|         |-------------------|
| RVV local vars    |         | outgoing args     | <- outgoing arguments
|-------------------|  <-- SP |-------------------|    overwrite from here.
```

In this patch, we reserve the stack for the outgoing arguments before
function calls if using FP to access and there are scalable vector frame
objects. It looks like

```
|-------------------|  <-- FP
| callee-saved regs |
|-------------------|
| scalar local vars |
|-------------------|
| RVV local vars    |
|-------------------|
| outgoing args     |
|-------------------|  <-- SP
```

Differential Revision: https://reviews.llvm.org/D103622
The file was modifiedllvm/test/CodeGen/RISCV/rvv/rvv-out-arguments.ll (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVFrameLowering.cpp (diff)
Commit 632cbcac79065a62a306dbda7b3a6e1f315e3260 by Raphael Isemann
[lldb] Move once_flags in HostInfoLinux so the internal state struct

The HostInfoLinuxFields struct is supposed to be set up/torn down on
Initialize/Terminate and should contain all the state of the plugin.
`once_flags` are part of this state and should also be reset on `Terminate` so
we can re-initialize these lazy values after the next `Initialize` call.

This itself is NFC as the HostInfoLinux was broken before this patch and is
still broken afterwards. D104091 will be the proper fix.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D104093
The file was modifiedlldb/source/Host/linux/HostInfoLinux.cpp (diff)
Commit bc104fdcecc0da1650177f3587ffe233b37f071b by qiucofan
[PowerPC] Relax register superclasses for paired memops

Relaxing superclass constraint for VSX register classes helps reducing
32-byte spills and copies when register pressure is high.

In test case affected, some of them introduces more copies due to new
allocation order. However, this patch should not be the root cause, and
we may be able to fix it in other places of register allocation.

Reviewed By: nemanjai

Differential Revision: https://reviews.llvm.org/D104006
The file was modifiedllvm/test/CodeGen/PowerPC/p9-xxinsertw-xxextractuw.ll (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/mma-acc-spill.ll (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/constant-pool.ll (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/paired-vector-intrinsics.ll (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/vsx.ll (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/aix-p9-xxinsertw-xxextractuw.ll (diff)
The file was modifiedllvm/lib/Target/PowerPC/PPCRegisterInfo.cpp (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/mma-intrinsics.ll (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/mma-outer-product.ll (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/remove-redundant-moves.ll (diff)
The file was modifiedllvm/test/CodeGen/PowerPC/vec_conv_i64_to_fp32_elts.ll (diff)
Commit f3f904563ec9ce8c7bfda83bbca19790cc4d9afc by Vitaly Buka
[lldb] Fix leak in test

Test leaks if we run
tools/lldb/unittests/Host/HostTests without --gtest_filter

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D104091
The file was modifiedlldb/source/Host/linux/HostInfoLinux.cpp (diff)
The file was modifiedlldb/unittests/Host/HostInfoTest.cpp (diff)
The file was modifiedlldb/include/lldb/Host/linux/HostInfoLinux.h (diff)
Commit 0d5af7a4caaf19ff97ca90e9ca7f2b78a858ab07 by phosek
Revert "[CMake] Don't use libc++ by default on Windows yet"

This reverts commit b413e44200e715c254fa9a41f6a86f8761c9b362.
The file was modifiedclang/cmake/caches/Fuchsia.cmake (diff)
The file was modifiedclang/cmake/caches/Fuchsia-stage2.cmake (diff)
Commit 22f194909ae24aed817976fb54b759550e90db36 by phosek
Revert "[Driver] Support libc++ in MSVC"

This reverts commit 9625d61eb66c12388875e081b63ebed7e42c6bbb since
libc++ currently has issues with disabled exceptions which breaks
the runtimes build.
The file was removedclang/test/Driver/msvc-libcxx.cpp
The file was modifiedclang/include/clang/Driver/Options.td (diff)
The file was removedclang/test/Driver/Inputs/msvc_libcxx_tree/usr/lib/.keep
The file was removedclang/test/Driver/Inputs/msvc_libcxx_tree/usr/lib/x86_64-pc-windows-msvc/.keep
The file was removedclang/test/Driver/Inputs/msvc_libcxx_tree/usr/include/c++/v1/.keep
The file was removedclang/test/Driver/Inputs/msvc_libcxx_tree/usr/include/x86_64-pc-windows-msvc/c++/v1/.keep
The file was removedclang/test/Driver/Inputs/msvc_libcxx_tree/usr/bin/.keep
The file was modifiedclang/lib/Driver/ToolChains/MSVC.cpp (diff)
Commit c4a0969b9c14acc795ae9e841b8289c3d36220b1 by sjoerd.meijer
Function Specialization Pass

This adds a function specialization pass to LLVM. Constant parameters
like function pointers and constant globals are propagated to the callee by
specializing the function.

This is a first version with a number of limitations:
- The pass is off by default, so needs to be enabled on the command line,
- It does not handle specialization of recursive functions,
- It does not yet handle constants and constant ranges,
- Only 1 argument per function is specialised,
- The cost-model could be further looked into, and perhaps related,
- We are not yet caching analysis results.

This is based on earlier work by Matthew Simpson (D36432) and Vinay Madhusudan.
More recently this was also discussed on the list, see:

https://lists.llvm.org/pipermail/llvm-dev/2021-March/149380.html.

The motivation for this work is that function specialisation often comes up as
a reason for performance differences of generated code between LLVM and GCC,
which has this enabled by default from optimisation level -O3 and up. And while
this certainly helps a few cpu benchmark cases, this also triggers in real
world codes and is thus a generally useful transformation to have in LLVM.

Function specialisation has great potential to increase compile-times and
code-size.  The summary from some investigations with this patch is:
- Compile-time increases for short compile jobs is high relatively, but the
  increase in absolute numbers still low.
- For longer compile-jobs, the extra compile time is around 1%, and very much
  in line with GCC.
- It is difficult to blame one thing for compile-time increases: it looks like
  everywhere a little bit more time is spent processing more functions and
  instructions.
- But the function specialisation pass itself is not very expensive; it doesn't
  show up very high in the profile of the optimisation passes.

The goal of this work is to reach parity with GCC which means that eventually
we would like to get this enabled by default. But first we would like to address
some of the limitations before that.

Differential Revision: https://reviews.llvm.org/D93838
The file was addedllvm/test/Transforms/FunctionSpecialization/function-specialization2.ll
The file was modifiedllvm/include/llvm/Transforms/Scalar/SCCP.h (diff)
The file was addedllvm/test/Transforms/FunctionSpecialization/function-specialization3.ll
The file was modifiedllvm/lib/Transforms/Scalar/SCCP.cpp (diff)
The file was addedllvm/test/Transforms/FunctionSpecialization/function-specialization-recursive.ll
The file was modifiedllvm/include/llvm/InitializePasses.h (diff)
The file was modifiedllvm/include/llvm/LinkAllPasses.h (diff)
The file was modifiedllvm/lib/Transforms/Utils/SCCPSolver.cpp (diff)
The file was modifiedllvm/include/llvm/Transforms/IPO.h (diff)
The file was addedllvm/test/Transforms/FunctionSpecialization/function-specialization.ll
The file was modifiedllvm/lib/Passes/PassRegistry.def (diff)
The file was addedllvm/test/Transforms/FunctionSpecialization/function-specialization4.ll
The file was modifiedllvm/include/llvm/Transforms/Utils/SCCPSolver.h (diff)
The file was modifiedllvm/lib/Transforms/IPO/IPO.cpp (diff)
The file was modifiedllvm/lib/Passes/PassBuilder.cpp (diff)
The file was modifiedllvm/lib/Transforms/IPO/SCCP.cpp (diff)
The file was addedllvm/lib/Transforms/Scalar/FunctionSpecialization.cpp
The file was modifiedllvm/lib/Transforms/Scalar/CMakeLists.txt (diff)
The file was addedllvm/test/Transforms/FunctionSpecialization/function-specialization5.ll
The file was modifiedllvm/include/llvm/Transforms/IPO/SCCP.h (diff)
The file was modifiedllvm/lib/Transforms/IPO/PassManagerBuilder.cpp (diff)
Commit eac994e227dcc0eeb02c6d4d7c221b1c2fb0b9e2 by llvmgnsyncbot
[gn build] Port c4a0969b9c14
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Transforms/Scalar/BUILD.gn (diff)
Commit f98b7796142d996861cbba824f3cacef0b446ef8 by akuegel
[mlir] Refactor ComplexOps.td [NFC]

Create a ComplexUnaryOp base class and use it for AbsOp, ReOp and ImOp.
Sort all ops in lexicographic order.

Differential Revision: https://reviews.llvm.org/D104095
The file was modifiedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td (diff)
Commit 47d138c93992f779a5dd0810b0e7402e043df61d by dmitry.polukhin
[clang-tidy] LIT test fix for Remark diagnostic

There is a followup fix for a unit test introduced at D102906. The test file was placed into a temp folder and test assumed that it would be visible without the full path specification.

This behaviour can be changed in future and it would be good to specify full path to the file at the test.

Test Plan:
```
ninja check-clang-tools
```

Reviewed By: DmitryPolukhin

Differential Revision: https://reviews.llvm.org/D104021
The file was modifiedclang-tools-extra/test/clang-tidy/infrastructure/remarks.cpp (diff)
Commit 6455418d3d2a2de1a8251cc2ccf2e87b9ae3112d by srhines
[compiler-rt] [builtins] [AArch64] Add missing AArch64 data synchronization barrier (dsb) to __clear_cache

https://developer.arm.com/documentation/den0024/a/Caches/Cache-maintenance
covers how to properly clear caches on AArch64, and the builtin
implementation was missing a `dsb ish` after clearing the icache for the
selected range.

Reviewed By: kristof.beyls

Differential Revision: https://reviews.llvm.org/D104094
The file was modifiedcompiler-rt/lib/builtins/clear_cache.c (diff)
Commit ca964b40e6e5d20fb658f2d36238b46a35dd860f by sven.vanhaastregt
[OpenCL][NFC] Reorganize ClangOpenCLBuiltinEmitter comments

Since 8866793b4e0a ("[OpenCL] Add OpenCL builtin test generator",
2021-06-09) there are two emitters in this file, so move the
file-level comment to the appropriate class.
The file was modifiedclang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp (diff)
Commit d789ed11ea01b30a69e8cd9612ebd336398ef3ec by llvm-dev
Fix implicit dependency on <string> header. NFCI.
The file was modifiedllvm/tools/llvm-rust-demangle-fuzzer/llvm-rust-demangle-fuzzer.cpp (diff)
Commit 5e6bfb661e8b51b440eda04d0be0c9a00b8713e9 by llvm-dev
[Analysis] Pass RecurrenceDescriptor as const reference. NFCI.

We were passing the RecurrenceDescriptor by value to most of the reduction analysis methods, despite it being rather bulky with TrackingVH members (that can be costly to copy). In all these cases we're only using the RecurrenceDescriptor for rather basic purposes (access to types/kinds etc.).

Differential Revision: https://reviews.llvm.org/D104029
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp (diff)
The file was modifiedllvm/lib/Target/RISCV/RISCVTargetTransformInfo.h (diff)
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h (diff)
The file was modifiedllvm/include/llvm/Transforms/Utils/LoopUtils.h (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.h (diff)
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfo.h (diff)
The file was modifiedllvm/lib/Analysis/TargetTransformInfo.cpp (diff)
The file was modifiedllvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp (diff)
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp (diff)
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp (diff)
Commit f0a68bbc967ab851e9b678feaf9015a2bfadb12e by llvm-dev
SampleProf.h - fix spelling mistake in assert message. NFC.
The file was modifiedllvm/include/llvm/ProfileData/SampleProf.h (diff)
Commit 56d5c46b494d2232792a46e9b95de40b082f4164 by bing1.yu
[X86] Support __tile_stream_loadd intrinsic for new AMX interface

Adding support for __tile_stream_loadd intrinsic.

Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D103784
The file was modifiedllvm/lib/Target/X86/X86LowerAMXType.cpp (diff)
The file was modifiedllvm/lib/Target/X86/X86InstrAMX.td (diff)
The file was modifiedllvm/lib/Target/X86/X86RegisterInfo.cpp (diff)
The file was modifiedclang/test/CodeGen/X86/amx_api.c (diff)
The file was modifiedllvm/lib/Target/X86/X86PreAMXConfig.cpp (diff)
The file was modifiedclang/lib/Headers/amxintrin.h (diff)
The file was modifiedllvm/include/llvm/IR/IntrinsicsX86.td (diff)
The file was modifiedclang/include/clang/Basic/BuiltinsX86_64.def (diff)
The file was modifiedllvm/lib/Target/X86/X86ISelDAGToDAG.cpp (diff)
The file was modifiedllvm/lib/Target/X86/X86ExpandPseudo.cpp (diff)
The file was modifiedllvm/test/CodeGen/X86/AMX/amx-tile-basic.ll (diff)
The file was modifiedllvm/lib/Target/X86/X86FastTileConfig.cpp (diff)
Commit abc0e0125cc54426cd2e89080b87b706c3385173 by lebedev.ri
[NFC][VectorCombine] Extract computeAlignmentAfterScalarization() helper function
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp (diff)
Commit 20542b47d6373dde497987abd1da83e84983fe13 by lebedev.ri
[VectorCombine] scalarizeLoadExtract(): use computeAlignmentAfterScalarization() helper

This results in slightly more optimistic alignments in some cases
The file was modifiedllvm/lib/Transforms/Vectorize/VectorCombine.cpp (diff)
The file was modifiedllvm/test/Transforms/VectorCombine/AArch64/load-extractelement-scalarization.ll (diff)
Commit 0cc3100bf8d126ce080c0075cf25784b45e5f990 by vsavchenko
[analyzer] Introduce a new interface for tracking

Tracking values through expressions and the stores is fundamental
for producing clear diagnostics.  However, the main components
participating in this process, namely `trackExpressionValue` and
`FindLastStoreBRVisitor`, became pretty bloated.  They have an
interesting dynamic between them (and some other visitors) that
one might call a "chain reaction". `trackExpressionValue` adds
`FindLastStoreBRVisitor`, and the latter calls `trackExpressionValue`.

Because of this design, individual checkers couldn't affect what's
going to happen somewhere in the middle of that chain.  Whether they
want to produce a more informative note or keep the overall tracking
going by utilizing some of the domain expertise.  This all lead to two
biggest problems that I see:

  * Some checkers don't use it
  This should probably never be the case for path-sensitive checks.

  * Some checkers incorporated their logic directly into those
    components
  This doesn't make the maintenance easier, breaks multiple
  architecture principles, and makes the code harder to read adn
  understand, thus, increasing the probability of the first case.

This commit introduces a prototype for a new interface that will be
responsible for tracking.  My main idea here was to make operations
that I want have as a checker developer easy to implement and hook
directly into the tracking process.

Differential Revision: https://reviews.llvm.org/D103605
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (diff)
The file was modifiedclang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h (diff)
Commit 967c06b3e95ba776fb06ad0ea5aa699cf2e1b59a by vsavchenko
[analyzer] Reimplement trackExpressionValue as ExpressionHandler

This commit moves trackExpressionValue into the Tracker interface
as DefaultExpressionHandler.  It still can be split into smaller
handlers, but that can be a future change.

Additionally, this commit doesn't remove the original trackExpressionValue
interface, so it's not too big.  One of the next commits will address it.

Differential Revision: https://reviews.llvm.org/D103616
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (diff)
Commit b6bcf953220db7880f2bb508f6f5c02b41078b2c by vsavchenko
[analyzer] Change FindLastStoreBRVisitor to use Tracker

Additionally, this commit completely removes any uses of
FindLastStoreBRVisitor from the analyzer except for the
one in Tracker.

The next step is actually removing this class altogether
from the header file.

Differential Revision: https://reviews.llvm.org/D103618
The file was modifiedclang/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp (diff)
The file was modifiedclang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h (diff)
The file was modifiedclang/lib/StaticAnalyzer/Checkers/RetainCountChecker/RetainCountDiagnostics.cpp (diff)
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (diff)
Commit 87a5c4d3745a06ec0594fa3f7aaf7f58a53315ec by vsavchenko
[analyzer] Hide and rename FindLastStoreBRVisitor

This component should not be used directly at this point and it is
simply an implementation detail, that's why StoreSiteFinder is
out of the header file.

Differential Revision: https://reviews.llvm.org/D103624
The file was modifiedclang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h (diff)
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (diff)
Commit f853d2601abd4f6ab789ca1513ae8b59ba5d38b7 by vsavchenko
[analyzer] Turn ReturnVisitor into a tracking visitor

Whenever Tracker spawns a visitor that needs to call tracker
back, we have to use TrackingBugReporterVisitor in order to maintain
all the hooks that the checker might've used.

Differential Revision: https://reviews.llvm.org/D103628
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (diff)
Commit 3fc8d943c360f801a428ff24569d2dd53a2afe0f by vsavchenko
[analyzer] Refactor trackRValueExpression into ExpressionHandler

Differential Revision: https://reviews.llvm.org/D103630
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (diff)
Commit 51d4704d5ec9b8e4e5e445ee69c56a58250e370e by vsavchenko
[analyzer] Turn TrackControlDependencyCond into a tracking visitor

Differential Revision: https://reviews.llvm.org/D103631
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (diff)
Commit 57006d2f6d96d8a6836ae901218ed615071b3b8e by vsavchenko
[analyzer] Refactor trackExpressionValue to accept TrackingOptions

Differential Revision: https://reviews.llvm.org/D103633
The file was modifiedclang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp (diff)
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp (diff)
The file was modifiedclang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h (diff)
The file was modifiedclang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp (diff)
Commit 646e970d44d7eaf4f56e2956fb58b48eb9360cb3 by llvm-dev
[llvm-stress] Fix dead code preventing us generating per-element vector selects

This has been reported several times by the PVS Studio team as well as coming up in some static analysis.

getRandom() % 1 always returns 0 so we never actually test this codepath, (git blame suggests this has always been like this) - given that we have plenty of other "getRandom() & 1" the typo is pretty obvious, and matches the intention in the comment above - with this change we generate a nice mixture of scalar/vector condition selects of vectors.

I don't know llvm-stress that well - but I don't think we guarantee that the same seed value will always generate the same IR for later versions of the program - just that the same binary would.

Differential Revision: https://reviews.llvm.org/D104022
The file was modifiedllvm/tools/llvm-stress/llvm-stress.cpp (diff)
Commit 63042d46bb0c2481a8b7aa1c324405c2720b3603 by martin
clang-format: [JS] don't sort named imports if off.

The previous implementation would accidentally still sort the individual
named imports, even if the module reference was in a clang-format off
block.

Differential Revision: https://reviews.llvm.org/D104101
The file was modifiedclang/unittests/Format/SortImportsTestJS.cpp (diff)
The file was modifiedclang/lib/Format/SortJavaScriptImports.cpp (diff)
Commit b102e6880ab06654f945284a520f68c099732f44 by olemarius.strohm
[OpenCL] Fix overloading resolution of addrspace constructors

This fixes the prioritization of address spaces when choosing a
constructor, stopping them from being considered equally good,
which made the construction of types that could be constructed
by more than one of the constructors.

It does this by preferring the most specific address space,
which is decided by seeing if one of the address spaces is
a superset of the other, and preferring the other.

Fixes: PR50329

Reviewed By: Anastasia

Differential Revision: https://reviews.llvm.org/D102850
The file was modifiedclang/lib/Sema/SemaOverload.cpp (diff)
The file was modifiedclang/test/CodeGenOpenCLCXX/addrspace-constructors.clcpp (diff)
The file was modifiedclang/test/SemaOpenCLCXX/addrspace-constructors.clcpp (diff)