Changes

Summary

  1. [Testsuite] Change these tests to only have a single verification error, NFC. (details)
  2. [LLParser] Remove outdated deplibs (details)
  3. AMD k8 family does not support SSE4.x which are required by x86-64-v2+ (details)
  4. [mlir][linalg] Lower PadTensorOp to InitTensorOp + FillOp + SubTensorInitOp (details)
  5. [mlir][linalg] Vectorize linalg.pad_op source copying (static source shape) (details)
  6. [mlir][linalg] Vectorize linalg.pad_op source copying (improved) (details)
  7. [LoopVectorize] precommit pr50686.ll for D104148 (details)
  8. Only consider built-in compound assignment operators for -Wunused-but-set-* (details)
  9. [mlir] Add ExpOp to Complex dialect. (details)
  10. [mlir][linalg] Lower PadTensorOps with non-constant pad value (details)
  11. [mlir][linalg] Add support for scalar input operands. (details)
  12. [mlir] Remove traits that require vector type support from ops in Complex dialect. (details)
  13. [VP] Binary floating-point intrinsics. (details)
  14. [flang] Add initial implementation for CPU_TIME (details)
  15. [llvm] remove Sequence::asSmallVector() (details)
  16. [clang][deps] NFC: Preserve the original frontend action (details)
  17. [libc] Add a set of elementary operations (details)
  18. [clang][modules][pch] Allow loading PCH with different modules cache path (details)
  19. Reland "[lldb] Set return status to failed when adding a command error" (details)
  20. [lldb] Add missing changes to a2363c0cf9b6a9a81c76ac652da667f73845d38b (details)
  21. [clang][deps] Handle precompiled headers' AST files (details)
  22. Revert "[libc] Add a set of elementary operations" (details)
  23. [lldb] Correct "else if" to "elif" in TestRegisters (details)
  24. [flang] Add POSIX implementation for CPU_TIME (details)
  25. Fix -Wswitch warning after 092c303955cd18be6c0b923b1c0a1b96e2c91893. (details)
  26. [clang][deps] Handle modular dependencies present in PCH (details)
  27. [Analyzer][solver] Simplify existing eq classes and constraints when a new constraint is added (details)
  28. [clang][deps] Move stripping of diagnostic serialization from `clang-scan-deps` to `DependencyScanning` library (details)
  29. [clang][deps] Move invocation adjustments from `clang-scan-deps` to `DependencyScanning` library (details)
  30. [clang][deps] Move injection of `-Wno-error` from `clang-scan-deps` to `DependencyScanning` library (details)
  31. [clang][deps] Move enabling system header deps from `clang-scan-deps` to `DependencyScanning` library (details)
  32. [VPlan] Add additional tests for region merging. (details)
  33. [clang][deps] Fix failing modules.cpp test (details)
  34. [lldb][docs] Document SBType (details)
Commit 0dd4c4b5ae49662359a56f45bccc90b16aea35b0 by clattner
[Testsuite] Change these tests to only have a single verification error, NFC.

These are testing for various verification failures, but have missing returns
at the end of their function.  Add the returns to focus the tests better.
The file was modifiedmlir/test/Dialect/LLVMIR/global.mlir (diff)
The file was modifiedmlir/test/Dialect/GPU/invalid.mlir (diff)
Commit e0bb5020643cf22e3989c641afaa50892766b557 by th3charlie
[LLParser] Remove outdated deplibs

The comment mentions deplibs should be removed in 4.0. Removing it in this patch.

Reviewed By: compnerd, dexonsmith, lattner

Differential Revision: https://reviews.llvm.org/D102763
The file was modifiedllvm/include/llvm/AsmParser/LLParser.h (diff)
The file was modifiedllvm/lib/AsmParser/LLParser.cpp (diff)
The file was modifiedllvm/lib/AsmParser/LLLexer.cpp (diff)
Commit 092c303955cd18be6c0b923b1c0a1b96e2c91893 by sguelton
AMD k8 family does not support SSE4.x which are required by x86-64-v2+

So don't define __tune__k8__ for these micro architecture.

SSE, SSE2 and SSE3 appear in https://www.amd.com/system/files/TechDocs/25112.PDF
but not SSE4.x.

Differential Revision: https://reviews.llvm.org/D104116
The file was modifiedclang/lib/Basic/Targets/X86.cpp (diff)
Commit 98fff5153a81fc501a69a4c184de5236fc806b9f by springerm
[mlir][linalg] Lower PadTensorOp to InitTensorOp + FillOp + SubTensorInitOp

Currently limited to constant pad values. Any combination of dynamic/static tensor sizes and padding sizes is supported.

Differential Revision: https://reviews.llvm.org/D103679
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp (diff)
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir (diff)
Commit 4c2f3d810b4a032792b632998d90baf4ab2ff7f3 by springerm
[mlir][linalg] Vectorize linalg.pad_op source copying (static source shape)

If the source operand of a linalg.pad_op operation has static shape, vectorize the copying of the source.

Differential Revision: https://reviews.llvm.org/D103747
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp (diff)
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir (diff)
Commit 01e3b344690dbb20298977015f13fd03b40132f4 by springerm
[mlir][linalg] Vectorize linalg.pad_op source copying (improved)

Vectorize linalg.pad_op source copying if source or result shape are static.

Differential Revision: https://reviews.llvm.org/D103791
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp (diff)
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir (diff)
Commit 8449af41e5c735960691f711ed9500c2a80a0b11 by guopeilin1
[LoopVectorize] precommit pr50686.ll for D104148
The file was addedllvm/test/Transforms/LoopVectorize/pr50686.ll
Commit b5b9489b2415dc48c39d4d7d4bae6197dc499f38 by sbergman
Only consider built-in compound assignment operators for -Wunused-but-set-*

At least LibreOffice has, for mainly historic reasons that would be hard to
change now, a class Any with an overloaded operator >>= that semantically does
not assign to the LHS but rather extracts into the (by-reference) RHS.  Which
thus caused false positive -Wunused-but-set-parameter and
-Wunused-but-set-variable after those have been introduced recently.

This change is more conservative about the assumed semantics of overloaded
operators, excluding compound assignment operators but keeping plain operator =
ones.  At least for LibreOffice, that strikes a good balance of not producing
false positives but still finding lots of true ones.

(The change to the BinaryOperator case in MaybeDecrementCount is necessary
because e.g. the template f4 test code in warn-unused-but-set-variables-cpp.cpp
turns the += into a BinaryOperator.)

Differential Revision: https://reviews.llvm.org/D103949
The file was modifiedclang/test/SemaCXX/warn-unused-but-set-variables-cpp.cpp (diff)
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp (diff)
Commit 73cbc91c93dd5a7ee1b8b1a9d507e194e835b446 by akuegel
[mlir] Add ExpOp to Complex dialect.

Also add a conversion pattern from Complex to Standard/Math dialect.

Differential Revision: https://reviews.llvm.org/D104108
The file was modifiedmlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp (diff)
The file was modifiedmlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir (diff)
The file was modifiedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td (diff)
Commit ddda52ce3cf2936d9ee05e06ed70e7d270cfcd73 by springerm
[mlir][linalg] Lower PadTensorOps with non-constant pad value

The padding of such ops is not generated in a vectorized way. Instead, emit a tensor::GenerateOp.

We may vectorize GenerateOps in the future.

Differential Revision: https://reviews.llvm.org/D103879
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp (diff)
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir (diff)
Commit 046922e1003795d67df89721e6b76c01b214d408 by gysit
[mlir][linalg] Add support for scalar input operands.

Up to now all structured op operands are assumed to be shaped. The patch relaxes this assumption and allows scalar input operands. In contrast to shaped operands scalar operands are not indexed and directly forwarded to the body of the operation. As all other operands, scalar operands are associated to an indexing map that in case of a scalar or a 0D-operand has an empty range.

We will use scalar operands as a replacement for the capture mechanism. In contrast to captures, the approach ensures we can generate the function signature from the operand list and it prevents outdated capture values in case a transformation updates only the capture operand but not the hidden body of a named operation.

Removing captures and updating existing operations such as linalg.fill is left for a later patch.

The patch depends on https://reviews.llvm.org/D103891 and https://reviews.llvm.org/D103890.

Differential Revision: https://reviews.llvm.org/D104109
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgBase.td (diff)
The file was modifiedmlir/test/Dialect/Linalg/invalid.mlir (diff)
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgTransforms.cpp (diff)
The file was modifiedmlir/test/Dialect/Linalg/fusion-tensor.mlir (diff)
The file was modifiedmlir/test/Dialect/Linalg/loops.mlir (diff)
The file was modifiedmlir/test/lib/Dialect/Linalg/TestLinalgFusionTransforms.cpp (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Transforms.cpp (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/DropUnitDims.cpp (diff)
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp (diff)
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgStructuredOps.td (diff)
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp (diff)
The file was modifiedmlir/test/Dialect/Linalg/tile-and-pad-tensors.mlir (diff)
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp (diff)
The file was modifiedmlir/test/Dialect/Linalg/drop-unit-extent-dims.mlir (diff)
The file was modifiedmlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp (diff)
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Fusion.cpp (diff)
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir (diff)
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir (diff)
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Loops.cpp (diff)
The file was modifiedmlir/test/Dialect/Linalg/reshape_fusion.mlir (diff)
Commit 2116eadf0994942fa99778d9b9d4315bc106f35f by akuegel
[mlir] Remove traits that require vector type support from ops in Complex dialect.

Actually, no vector types are supported so far. We should add the traits once
the vector types are supported (e.g. ElementwiseMappable.traits).
Instead add Elementwise trait to each op.

Differential Revision: https://reviews.llvm.org/D104103
The file was modifiedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td (diff)
Commit 74d45b884cfb13d8530a64ba538817bdab165c12 by simon.moll
[VP] Binary floating-point intrinsics.

This patch implements vector-predicated intrinsics on IR level for fadd,
fsub, fmul, fdiv and frem.  There operate in the default floating-point
environment. We will use constrained fp operand bundles for constrained
vector-predicated fp math (D93455).

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D93470
The file was modifiedllvm/include/llvm/IR/VPIntrinsics.def (diff)
The file was modifiedllvm/test/Verifier/vp-intrinsics.ll (diff)
The file was modifiedllvm/include/llvm/IR/Intrinsics.td (diff)
The file was modifiedllvm/unittests/IR/VPIntrinsicTest.cpp (diff)
The file was modifiedllvm/docs/LangRef.rst (diff)
Commit 57e85622bbdb2eb18cc03df2ea457019c58f6912 by diana.picus
[flang] Add initial implementation for CPU_TIME

Add an implementation for CPU_TIME based on std::clock(), which should
be available on all the platforms that we support.

Also add a test that's basically just a sanity check to make sure we
return positive values and that the value returned at the start of some
amount of work is larger than the one returned after the end.

Differential Revision: https://reviews.llvm.org/D104019
The file was modifiedflang/runtime/CMakeLists.txt (diff)
The file was addedflang/runtime/time-intrinsic.cpp
The file was addedflang/unittests/RuntimeGTest/Time.cpp
The file was modifiedflang/unittests/RuntimeGTest/CMakeLists.txt (diff)
Commit 1d49e5352f9538bb9c514dd627a93f9c40982d3a by gchatelet
[llvm] remove Sequence::asSmallVector()

There's no need for `toSmallVector()` as `SmallVector.h` already provides a `to_vector` free function that takes a range.

Reviewed By: Quuxplusone

Differential Revision: https://reviews.llvm.org/D104024
The file was modifiedmlir/lib/Conversion/PDLToPDLInterp/PDLToPDLInterp.cpp (diff)
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp (diff)
The file was modifiedllvm/include/llvm/ADT/Sequence.h (diff)
Commit 669771cfe75b48ac4c195ce9e8824319be973f4d by Jan Svoboda
[clang][deps] NFC: Preserve the original frontend action

This patch stops adjusting the frontend action when `clang-scan-deps` is configured to use the full output format.

In a future patch, the dependency scanner needs to check whether the original compiler invocation builds a PCH. That's impossible when `-Eonly` et al. override `-emit-pch`.

The `-Eonly` flag is not needed - the dependency scanner explicitly sets up its own frontend action anyways.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D103461
The file was modifiedclang/tools/clang-scan-deps/ClangScanDeps.cpp (diff)
Commit e63f27a3cf8129cb66b8350ad50bf19633554a6b by gchatelet
[libc] Add a set of elementary operations

Each of these elementary operations can be assembled to support higher order constructs (Overlapping access, Loop, Aligned Loop).
The patch does not compile yet as it depends on other ones (D100571, D100631) but it allows to get the conversation started.

Differential Revision: https://reviews.llvm.org/D100646
The file was modifiedlibc/src/string/CMakeLists.txt (diff)
The file was modifiedlibc/test/src/string/memory_utils/CMakeLists.txt (diff)
The file was modifiedlibc/src/string/memcpy.cpp (diff)
The file was addedlibc/src/string/memory_utils/elements_x86.h
The file was modifiedlibc/src/string/memory_utils/memset_utils.h (diff)
The file was addedlibc/test/src/string/memory_utils/elements_test.cpp
The file was addedlibc/test/src/string/memory_utils/memory_access_test.cpp
The file was removedlibc/test/src/string/memory_utils/memcpy_utils_test.cpp
The file was modifiedlibc/src/string/memory_utils/CMakeLists.txt (diff)
The file was removedlibc/src/string/memory_utils/memcpy_utils.h
The file was addedlibc/src/string/memory_utils/elements.h
The file was modifiedlibc/src/string/aarch64/memcpy.cpp (diff)
The file was modifiedlibc/src/string/x86_64/memcpy.cpp (diff)
Commit 78668c822af9504f77a554f5924e1097365d9c33 by Jan Svoboda
[clang][modules][pch] Allow loading PCH with different modules cache path

It's useful to be able to load explicitly-built PCH files into an implicit build (e.g. during dependency scanning). That's currently impossible, since the explicitly-built PCH has an empty modules cache path, while the current compilation has (and needs to have) a valid path, triggering an error in the `PCHValidator`.

This patch adds a preprocessor option and command-line flag that can be used to omit this check.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D103802
The file was addedclang/test/Modules/module-pch-different-cache-path.c
The file was modifiedclang/lib/Serialization/ASTReader.cpp (diff)
The file was modifiedclang/include/clang/Lex/PreprocessorOptions.h (diff)
The file was addedclang/test/Modules/Inputs/pch-typedef.h
The file was modifiedclang/include/clang/Driver/Options.td (diff)
Commit a2363c0cf9b6a9a81c76ac652da667f73845d38b by david.spickett
Reland "[lldb] Set return status to failed when adding a command error"

This reverts commit db93e4e70aa453e5ba04ba0d9e01f581882b6c81.

This modifies TestRegsters.py to account for Darwin showing
AVX registers as part of "Floating Point Registers" instead
of in a separate "Advanced Vector Extensions" category.
The file was addedlldb/test/Shell/Commands/command-backtrace-parser-1.test
The file was removedlldb/test/Shell/Commands/command-backtrace.test
The file was modifiedlldb/source/Interpreter/CommandReturnObject.cpp (diff)
The file was modifiedlldb/test/API/commands/register/register/register_command/TestRegisters.py (diff)
The file was addedlldb/test/Shell/Commands/command-backtrace-parser-2.test
Commit 0f94d68a2e15d50796439f20bcb508b95931d2ae by david.spickett
[lldb] Add missing changes to a2363c0cf9b6a9a81c76ac652da667f73845d38b

Completely forgot to actually update the change before relanding it.
This adds the Darwin AVX changes.
The file was modifiedlldb/test/API/commands/register/register/register_command/TestRegisters.py (diff)
Commit 9223209be11e93c1b701054c6fff88d46ee54658 by Jan Svoboda
[clang][deps] Handle precompiled headers' AST files

The `PreprocessOnlyAction` doesn't support loading the AST file of a precompiled header. This is problematic for dependency scanning, since the `#include` manufactured for the PCH is treated as textual. This means the PCH contents get scanned with each TU, which is redundant. Moreover, dependencies of the PCH end up being considered dependency of the TU.

To handle AST file of PCH properly, this patch creates new `FrontendAction` that behaves the same way `PreprocessorOnlyAction` does, but treats the manufactured PCH `#include` as a normal compilation would (by not claiming it only uses a preprocessor and creating the default AST consumer).

The AST file is now reported as a file dependency of the TU.

Depends on D103519.

Reviewed By: Bigcheese

Differential Revision: https://reviews.llvm.org/D103524
The file was modifiedclang/lib/Frontend/FrontendActions.cpp (diff)
The file was modifiedclang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp (diff)
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (diff)
The file was modifiedclang/test/ClangScanDeps/modules-pch.c (diff)
The file was modifiedclang/include/clang/Frontend/FrontendActions.h (diff)
Commit ab45c1f21f63bfd0acb9e27a626ab33659918868 by gchatelet
Revert "[libc] Add a set of elementary operations"

This reverts commit e63f27a3cf8129cb66b8350ad50bf19633554a6b.
The file was modifiedlibc/src/string/memory_utils/CMakeLists.txt (diff)
The file was removedlibc/test/src/string/memory_utils/elements_test.cpp
The file was removedlibc/src/string/memory_utils/elements_x86.h
The file was modifiedlibc/src/string/memcpy.cpp (diff)
The file was addedlibc/test/src/string/memory_utils/memcpy_utils_test.cpp
The file was addedlibc/src/string/memory_utils/memcpy_utils.h
The file was modifiedlibc/test/src/string/memory_utils/CMakeLists.txt (diff)
The file was modifiedlibc/src/string/CMakeLists.txt (diff)
The file was modifiedlibc/src/string/memory_utils/memset_utils.h (diff)
The file was modifiedlibc/src/string/aarch64/memcpy.cpp (diff)
The file was removedlibc/src/string/memory_utils/elements.h
The file was modifiedlibc/src/string/x86_64/memcpy.cpp (diff)
The file was removedlibc/test/src/string/memory_utils/memory_access_test.cpp
Commit f583029da3d6dbabe82f48b160227eb0120abd33 by david.spickett
[lldb] Correct "else if" to "elif" in TestRegisters
The file was modifiedlldb/test/API/commands/register/register/register_command/TestRegisters.py (diff)
Commit 166192eb78cdeb41ee25a37e920259fb13f82f6a by diana.picus
[flang] Add POSIX implementation for CPU_TIME

Add an implementation for CPU_TIME using the POSIX function
clock_gettime. I think on most POSIX systems this will be included for
free via <ctime>, which corresponds to "time.h" (YMMV, we can fix the
code if the need arises).

Detecting that clock_gettime is available is tricky. For instance, commit
827407a86aa07 used the following incantation in f18-parse-demo.cpp:

  #if _POSIX_C_SOURCE >= 199309L && _POSIX_TIMERS > 0 && _POSIX_CPUTIME && \
    defined CLOCK_PROCESS_CPUTIME_ID

This doesn't work on my AArch64 Ubuntu system, which provides
clock_gettime but doesn't define _POSIX_TIMERS. Since finding the right
combination of macros requires infinite time, patience and access to
sundry POSIX systems, we should probably try a different approach.

This patch attempts to use SFINAE instead of the preprocessor to choose
an implementation for CPU_TIME. We define a helper function template
which helps us check if clock_gettime is available (and has the
interface we expect). I hope the comments explain it well enough.

This approach has the advantage that it keeps the detection of
clock_gettime close to the code that uses it. An alternative would be to
use CMake to check for the symbol (I personally haven't used this before
so I don't know if there are any quirks).

Differential Revision: https://reviews.llvm.org/D104020
The file was modifiedflang/runtime/time-intrinsic.cpp (diff)
Commit a83ef21ff82e4283044fd31470fc6c1bc4b99c51 by hokein.wu
Fix -Wswitch warning after 092c303955cd18be6c0b923b1c0a1b96e2c91893.
The file was modifiedclang/lib/Basic/Targets/X86.cpp (diff)
Commit 4629554f0b664c94ada7c44fe40855d7a9a39820 by Jan Svoboda
[clang][deps] Handle modular dependencies present in PCH

When a translation unit uses a PCH and imports the same modules as the PCH, we'd prefer to resolve to those modules instead of inventing new modules and reporting them as modular dependencies. Since the PCH modules have already been built nudge the compiler to reuse them when deciding whether to build a new module and don't report them as regular modular dependencies.

Depends on D103524 & D103802.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D103526
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningTool.cpp (diff)
The file was modifiedclang/include/clang/Tooling/DependencyScanning/ModuleDepCollector.h (diff)
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (diff)
The file was modifiedclang/test/ClangScanDeps/Inputs/modules-pch/module.modulemap (diff)
The file was addedclang/test/ClangScanDeps/Inputs/modules-pch/tu_with_common.c
The file was addedclang/test/ClangScanDeps/Inputs/modules-pch/cdb_pch.json
The file was modifiedclang/test/ClangScanDeps/modules-pch.c (diff)
The file was modifiedclang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp (diff)
The file was modifiedclang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h (diff)
The file was modifiedclang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h (diff)
The file was addedclang/test/ClangScanDeps/Inputs/modules-pch/cdb_tu_with_common.json
The file was addedclang/test/ClangScanDeps/Inputs/modules-pch/mod_common_1.h
The file was addedclang/test/ClangScanDeps/Inputs/modules-pch/mod_tu_with_common.h
The file was modifiedclang/test/ClangScanDeps/Inputs/modules-pch/pch.h (diff)
The file was addedclang/test/ClangScanDeps/Inputs/modules-pch/mod_common_2.h
The file was addedclang/test/ClangScanDeps/Inputs/modules-pch/mod_pch.h
Commit 8ddbb442b6e87efc9c6599280740c6f4fc40963d by gabor.marton
[Analyzer][solver] Simplify existing eq classes and constraints when a new constraint is added

Update `setConstraint` to simplify existing equivalence classes when a
new constraint is added. In this patch we iterate over all existing
equivalence classes and constraints and try to simplfy them with
simplifySVal. This solves problematic cases where we have two symbols in
the tree, e.g.:
```
int test_rhs_further_constrained(int x, int y) {
  if (x + y != 0)
    return 0;
  if (y != 0)
    return 0;
  clang_analyzer_eval(x + y == 0); // expected-warning{{TRUE}}
  clang_analyzer_eval(y == 0);     // expected-warning{{TRUE}}
  return 0;
}
```

Differential Revision: https://reviews.llvm.org/D103314
The file was addedclang/test/Analysis/find-binop-constraints.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/RangedConstraintManager.h (diff)
The file was modifiedclang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp (diff)
Commit 35fa3e60d1612dcc4f8e233b046423d948ca9a9b by Jan Svoboda
[clang][deps] Move stripping of diagnostic serialization from `clang-scan-deps` to `DependencyScanning` library

To prevent the creation of diagnostics file, `clang-scan-deps` strips the corresponding command-line argument. This behavior is useful even when using the C++ `DependencyScanner` library.

This patch transforms stripping of command-line in `clang-scan-deps` into stripping of `CompilerInvocation` in `DependencyScanning`.

AFAIK, the `clang-cl` driver doesn't even accept `--serialize-diagnostics`, so I've removed the test. (It would fail with an unknown command-line argument otherwise.)

Note: Since we're generating command-lines for modular dependencies from `CompilerInvocation`, the `--serialize-diagnostics` will be dropped. This was already happening in `clang-scan-deps` before this patch, but it will now happen also when using `DependencyScanning` library directly. This is resolved in D104036.

Reviewed By: dexonsmith, arphaman

Differential Revision: https://reviews.llvm.org/D104012
The file was modifiedclang/test/ClangScanDeps/Inputs/strip_diag_serialize.json (diff)
The file was modifiedclang/test/ClangScanDeps/strip_diag_serialize.cpp (diff)
The file was modifiedclang/include/clang/Tooling/ArgumentsAdjusters.h (diff)
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (diff)
The file was modifiedclang/tools/clang-scan-deps/ClangScanDeps.cpp (diff)
The file was modifiedclang/lib/Tooling/ArgumentsAdjusters.cpp (diff)
Commit d8bab69ead22a10dc4cdb2e36f6ea6fdfe774e2e by Jan Svoboda
[clang][deps] Move invocation adjustments from `clang-scan-deps` to `DependencyScanning` library

The `clang-scan-deps` tool has some logic that parses and modifies the original Clang command-line. The goal is to setup `DependencyOutputOptions` by injecting `-M -MT <target>` and prevent the creation of output files.

This patch moves the logic into the `DependencyScanning` library, and uses the parsed `CompilerInvocation` instead of the raw command-line. The code simpler and can be used from the C++ API as well.

The `-o /dev/null` arguments are not necessary, since the `DependencyScanning` library only runs a preprocessing action, so there's no way it'll produce an actual object file.

Related: The `-M` argument implies `-w`, which would appear on the command-line of modular dependencies even though it was not on the original TU command line (see D104036).

Some related tests were updated.

Reviewed By: arphaman

Differential Revision: https://reviews.llvm.org/D104030
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (diff)
The file was modifiedclang/tools/clang-scan-deps/ClangScanDeps.cpp (diff)
The file was modifiedclang/test/ClangScanDeps/modules.cpp (diff)
The file was modifiedclang/test/ClangScanDeps/regular_cdb.cpp (diff)
The file was modifiedclang/test/ClangScanDeps/modules-pch.c (diff)
Commit cf7d9704688db746b26d739a6e154ad54b6b676e by Jan Svoboda
[clang][deps] Move injection of `-Wno-error` from `clang-scan-deps` to `DependencyScanning` library

This moves another piece of logic specific to `clang-scan-deps` into the `DependencyScanning` library. This makes it easier to check how the original command-line looked like in the library and will enable the library to stop inventing `-Wno-error` for modular dependencies (see D104036).

Reviewed By: arphaman

Differential Revision: https://reviews.llvm.org/D104031
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (diff)
The file was modifiedclang/tools/clang-scan-deps/ClangScanDeps.cpp (diff)
Commit 6c6dcfc4ce750bb7dc15d0a4ad631c66beed70d4 by Jan Svoboda
[clang][deps] Move enabling system header deps from `clang-scan-deps` to `DependencyScanning` library

This patch moves enabling system header deps from `clang-scan-deps` into the `DependencyScanning` library. This will make it easier to preserve semantics of the original TU command-line for modular dependencies (see D104036).

Reviewed By: arphaman

Differential Revision: https://reviews.llvm.org/D104033
The file was modifiedclang/tools/clang-scan-deps/ClangScanDeps.cpp (diff)
The file was modifiedclang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp (diff)
Commit 9e77526d467340ba4486a471c9ef3f7c859f2b60 by flo
[VPlan] Add additional tests for region merging.

Add additional tests suggested in D100260.

Also drop the unneeded `indvars.` prefix from induction phi name.
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-sink-scalars-and-merge.ll (diff)
Commit 1d8882b5e44e577f226b7a5a83c27df3b16b3ab6 by Jan Svoboda
[clang][deps] Fix failing modules.cpp test

Commit d8bab69ead22a10dc4cdb2e36f6ea6fdfe774e2e updated the ClangScanDeps/modules.cpp test. The new `{{.*}}` regex is supposed to only match `modules_cdb_input.o`, `a.o` or `b.o`. However, due to non-determinism, this can sometimes also match `modules_cdb_input2.o`, causing match failure on the next line. This commit changes the regex to only match one of the three valid cases.

Buildbot failure: https://lab.llvm.org/buildbot/#/builders/109/builds/16675
The file was modifiedclang/test/ClangScanDeps/modules.cpp (diff)
Commit 11e2922bb7adbbca17c3a0f44779aa87dbc64b42 by Raphael Isemann
[lldb][docs] Document SBType

This documents the behaviour of the different SBType functions with notes for
the language-specific behaviour for C/C++/Objective-C. All of this reflects the
current behaviour of LLDB (even though that also means some functions behave
kinda weird but at least they are now documented to be weird)

Reviewed By: #lldb, mib

Differential Revision: https://reviews.llvm.org/D103454
The file was modifiedlldb/bindings/interface/SBType.i (diff)