SuccessChanges

Summary

  1. Revert "[libc] Add a set of elementary operations" (details)
  2. [builtins] Allow compiling the builtins without libc headers (details)
  3. [IR] Remove forward declaration of GraphTraits from Type.h (details)
  4. [mlir][linalg] Fold linalg.pad_tensor if src type == result type (details)
  5. [clang-format] distinguish function type casts after 21c18d5a04316891110cecc2bf37ce51533decba (details)
  6. [analyzer] Refactor StoreSiteFinder and extract DefaultStoreHandler (details)
  7. [analyzer] Extract ControlDependencyHandler (details)
  8. [analyzer] Extract NilReceiverHandler (details)
  9. [analyzer] Extract ArrayIndexHandler (details)
  10. [analyzer] Extract InterestingLValueHandler (details)
  11. [analyzer] Extract InlinedFunctionCallHandler (details)
  12. [analyzer] Simplify the process of producing notes for stores (details)
  13. Fix Windows builders after 244601f4720d9cda6e81ea1908f3ce905a4bcb0e (details)
  14. [MCA][InstrBuilder] Check for the presence of flag VariadicOpsAreDefs. (details)
  15. [analyzer] Decouple NoteTag from its Factory (details)
  16. [X86] Schedule-model second (mask) output of GATHER instruction (details)
  17. [lldb] Fix libstdc++ 11's std::unique_ptr affecting LLDB testsuite TestDataFormatterStdUniquePtr.py (details)
  18. ABI breaking changes fixes. (details)
  19. [mlir] Add NegOp to complex dialect. (details)
  20. [mlir][MemRef] Make sure types match when folding dim(reshape) (details)
  21. [ORC] Port WrapperFunctionUtils and SimplePackedSerialization from ORC runtime. (details)
  22. [ORC] Make WrapperFunctionResult's ValuePtr member non-const. (details)
  23. Clearly specify that these are partially implemented features (details)
  24. [mlir] ODS: do not emit trailing const for static methods (details)
  25. [ORC] Fix missing function in unit test. (details)
  26. [ORC] Fix narrowing-in-initializer-list warnings. (details)
  27. [ORC] Fix missing std::move. (details)
  28. [ORC] Fix endianness in manual serialization to match WrapperFunctionUtils. (details)
  29. [LoopDeletion] Check for irreducible cycles when deleting loops. (details)
  30. [OPENMP]Fix PR50699: capture locals in combine directrives for aligned clause. (details)
  31. [gn build] Port 4eb9fe2e1a07 (details)
  32. [Polly][Isl] Replacing isl method `to_str()` with `stringFromIslObj()`. NFC. (details)
  33. [Matrix] Add tests for fast-math flags & matrix codegen. (details)
Commit c11032ad9a6c4523d0d9d591ebce82c87a9fb3a0 by gchatelet
Revert "[libc] Add a set of elementary operations"

This reverts commit 454d92ac3b3b13f5c8b3f57e03b2d93f0cf60738.
The file was addedlibc/src/string/memory_utils/memcpy_utils.h
The file was modifiedlibc/src/string/CMakeLists.txt
The file was modifiedlibc/test/src/string/memory_utils/CMakeLists.txt
The file was removedlibc/test/src/string/memory_utils/elements_test.cpp
The file was modifiedlibc/src/string/memory_utils/memset_utils.h
The file was modifiedlibc/src/string/x86_64/memcpy.cpp
The file was addedlibc/test/src/string/memory_utils/memcpy_utils_test.cpp
The file was modifiedlibc/src/string/memcpy.cpp
The file was modifiedlibc/src/string/memory_utils/CMakeLists.txt
The file was removedlibc/src/string/memory_utils/elements.h
The file was removedlibc/src/string/memory_utils/elements_x86.h
The file was modifiedlibc/src/string/aarch64/memcpy.cpp
The file was removedlibc/test/src/string/memory_utils/memory_access_test.cpp
Commit 244601f4720d9cda6e81ea1908f3ce905a4bcb0e by Alexander.Richardson
[builtins] Allow compiling the builtins without libc headers

When compiled with -ffreestanding, we should not assume that headers
declaring functions such as abort() are available. While the compiler may
still emit calls to those functions [1], we should not require the headers
to build compiler-rt since that can result in a cyclic dependency graph:
The compiler-rt functions might be required to build libc.so, but the libc
headers such as stdlib.h might only be available once libc has been built.

[1] From https://gcc.gnu.org/onlinedocs/gcc/Standards.html:
GCC requires the freestanding environment provide memcpy, memmove,
memset and memcmp. Finally, if __builtin_trap is used, and the target
does not implement the trap pattern, then GCC emits a call to abort.

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D103876
The file was modifiedcompiler-rt/lib/builtins/clear_cache.c
The file was modifiedcompiler-rt/lib/builtins/atomic.c
The file was modifiedcompiler-rt/lib/builtins/int_util.c
Commit f5dc511c538745df1ef4c5a22b99b56747f32edc by jay.foad
[IR] Remove forward declaration of GraphTraits from Type.h

This has been unnecessary since r352353 removed GraphTraits
specializations for Type, except that a couple of other headers were
accidentally relying on this declaration.

Differential Revision: https://reviews.llvm.org/D104119
The file was modifiedllvm/include/llvm/Analysis/LazyCallGraph.h
The file was modifiedllvm/include/llvm/IR/ModuleSummaryIndex.h
The file was modifiedllvm/include/llvm/IR/Type.h
Commit b6ab4f1a8b6546b67dbcc3612f33c26d9b72a5cc by springerm
[mlir][linalg] Fold linalg.pad_tensor if src type == result type

Fold PadTensorOp to source if source type and result type have static shape and are equal.

Differential Revision: https://reviews.llvm.org/D103778
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
Commit 54bd95cd96bc7305219b594f95d7d1f447ee4c94 by krasimir
[clang-format] distinguish function type casts after 21c18d5a04316891110cecc2bf37ce51533decba

https://github.com/llvm/llvm-project/commit/21c18d5a04316891110cecc2bf37ce51533decba
improved the detection of multiplication in function call argument lists,
but unintentionally regressed the handling of function type casts (there
were no tests covering those).
This patch improves the detection of function type casts and adds a few tests.

Reviewed By: HazardyKnusperkeks

Differential Revision: https://reviews.llvm.org/D104209
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
Commit bbebf38b736a12c9582f9ae59c8e245a6ed68cb8 by vsavchenko
[analyzer] Refactor StoreSiteFinder and extract DefaultStoreHandler

After this patch, custom StoreHandlers will also work as expected.

Differential Revision: https://reviews.llvm.org/D103644
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
Commit 85f475c979aa49b1b833c9e66af9cb35eafd02c7 by vsavchenko
[analyzer] Extract ControlDependencyHandler

Differential Revision: https://reviews.llvm.org/D103677
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
Commit 1639dcb2798469c4372e50bcb6b4cf36ecffd9ce by vsavchenko
[analyzer] Extract NilReceiverHandler

Differential Revision: https://reviews.llvm.org/D103902
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
Commit 40cb73bd20735051eb8f2d43735097d2ff46f0a7 by vsavchenko
[analyzer] Extract ArrayIndexHandler

One interesting problem was discovered here.  When we do interrupt
Tracker's track flow, we want to interrupt only it and not all the
other flows recursively.

Differential Revision: https://reviews.llvm.org/D103914
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
Commit 2e490676ea2eb419e7b2f54e1e2e537d5244ebbc by vsavchenko
[analyzer] Extract InterestingLValueHandler

Differential Revision: https://reviews.llvm.org/D103917
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
Commit 6e6a26b8f0ea8300d5a814e4150e225c33ec25de by vsavchenko
[analyzer] Extract InlinedFunctionCallHandler

Differential Revision: https://reviews.llvm.org/D103961
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
Commit 16f7a952ec3e0f362690c6449951866100c6f76c by vsavchenko
[analyzer] Simplify the process of producing notes for stores

Differential Revision: https://reviews.llvm.org/D104046
The file was modifiedclang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitors.h
Commit 13f0b85212275fb6f724b14c2c5385385e5e723f by Alexander.Richardson
Fix Windows builders after 244601f4720d9cda6e81ea1908f3ce905a4bcb0e

Apparently __builtin_abort() is not supported when targetting Windows.
This should fix the following builder errors:
clang_rt.builtins-x86_64.lib(int_util.c.obj) : error LNK2019: unresolved
external symbol __builtin_abort referenced in function __compilerrt_abort_impl
The file was modifiedcompiler-rt/lib/builtins/int_util.c
Commit beb5213a2ee56bbf554ccdd1908c48d10e244dab by andrea.dibiagio
[MCA][InstrBuilder] Check for the presence of flag VariadicOpsAreDefs.

This patch fixes the logic that checks for variadic register definitions,

Before llvm-svn 348114 (commit 4cf35b4ab0b), it was not possible to explicitly
mark variadic operands as definitions. By default, variadic operands of an
MCInst were always assumed to be uses. A number of had-hoc checks were
introduced in the InstrBuilder to fix the processing of variadic register
operands of ARM ldm/stm variants.

This patch simply replaces those old (and buggy) checks with a much simpler (and
correct) check for MCID::Flag::VariadicOpsAreDefs.
The file was modifiedllvm/lib/MCA/InstrBuilder.cpp
The file was modifiedllvm/test/tools/llvm-mca/ARM/cortex-a57-carryover.s
Commit eadd54f2741f9dc7307512382a7c8fb49aa840d0 by vsavchenko
[analyzer] Decouple NoteTag from its Factory

This allows us to create other types of tags that carry useful
bits of information alongside.

Differential Revision: https://reviews.llvm.org/D104135
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h
The file was modifiedclang/lib/StaticAnalyzer/Core/CoreEngine.cpp
The file was modifiedclang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h
The file was modifiedclang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h
Commit 88da6c1ead3f1b0431e6cfa054d2645612f049ce by lebedev.ri
[X86] Schedule-model second (mask) output of GATHER instruction

Much like `mulx`'s `WriteIMulH`, there are two outputs of
AVX2 GATHER instructions. This was changed back in rL160110,
but the sched model change wasn't present.

So right now, for sched models that are marked as complete
(`znver3` only now), codegen'ning `GATHER` results in a crash:
```
DefIdx 1 exceeds machine model writes for early-clobber renamable $ymm3, dead early-clobber renamable $ymm2 = VPGATHERDDYrm killed renamable $ymm3(tied-def 0), undef renamable $rax, 4, renamable $ymm0, 0, $noreg, killed renamable $ymm2(tied-def 1) :: (load 32, align 1)
```
https://godbolt.org/z/Ks7zW7WGh

I'm guessing we need to deal with this like we deal with `WriteIMulH`.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D104205
The file was modifiedllvm/lib/Target/X86/X86ScheduleBdVer2.td
The file was modifiedllvm/lib/Target/X86/X86SchedHaswell.td
The file was modifiedllvm/lib/Target/X86/X86SchedBroadwell.td
The file was modifiedllvm/lib/Target/X86/X86Schedule.td
The file was modifiedllvm/lib/Target/X86/X86ScheduleZnver2.td
The file was modifiedllvm/lib/Target/X86/X86SchedSkylakeServer.td
The file was modifiedllvm/lib/Target/X86/X86ScheduleZnver1.td
The file was modifiedllvm/lib/Target/X86/X86ScheduleSLM.td
The file was modifiedllvm/lib/Target/X86/X86ScheduleAtom.td
The file was modifiedllvm/lib/Target/X86/X86ScheduleBtVer2.td
The file was modifiedllvm/lib/Target/X86/X86InstrSSE.td
The file was modifiedllvm/lib/Target/X86/X86SchedSandyBridge.td
The file was modifiedllvm/lib/Target/X86/X86InstrAVX512.td
The file was modifiedllvm/lib/Target/X86/X86SchedSkylakeClient.td
The file was modifiedllvm/lib/Target/X86/X86ScheduleZnver3.td
Commit fffb975095119adb5f91be4e3c83ac0cb4b1602c by jan.kratochvil
[lldb] Fix libstdc++ 11's std::unique_ptr affecting LLDB testsuite TestDataFormatterStdUniquePtr.py

libstdc++ since version 11 has a conditional compilation based on
[[no_unique_address]] availability whether one element is either
inherited or put there as a field with [[no_unique_address]].

The code comment is by teemperor.

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D104283
The file was modifiedlldb/source/Plugins/Language/CPlusPlus/LibStdcppUniquePointer.cpp
Commit 1540da3b788272e9aacc698ef96e75a4a5839ee1 by neil.henning
ABI breaking changes fixes.

This commit mostly just replaces bad uses of `NDEBUG` with uses of
`LLVM_ENABLE_ABI_BREAKING_CHANGES` - the safe way to include ABI
breaking changes (normally extra struct elements in headers).

Differential Revision: https://reviews.llvm.org/D104216
The file was modifiedllvm/include/llvm/Transforms/Utils/ScalarEvolutionExpander.h
The file was modifiedllvm/lib/Transforms/Utils/ScalarEvolutionExpander.cpp
The file was modifiedllvm/include/llvm/Transforms/Scalar/JumpThreading.h
The file was modifiedllvm/include/llvm/Passes/StandardInstrumentations.h
The file was modifiedllvm/include/llvm/Support/GenericDomTreeConstruction.h
The file was modifiedllvm/include/llvm/Transforms/Scalar/LoopPassManager.h
The file was modifiedllvm/lib/Passes/StandardInstrumentations.cpp
Commit 662e074d9043949eea4e360e47bf9e39959694b8 by akuegel
[mlir] Add NegOp to complex dialect.

Also add a lowering pattern from complex dialect to standard dialect.

Differential Revision: https://reviews.llvm.org/D104284
The file was modifiedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
The file was modifiedmlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
The file was modifiedmlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir
Commit cd939351467643a80490d036408b1036d39b9814 by benny.kra
[mlir][MemRef] Make sure types match when folding dim(reshape)

Reshape can take integer types in addition to index, but dim always
returns index.

Differential Revision: https://reviews.llvm.org/D104287
The file was modifiedmlir/lib/Dialect/MemRef/IR/MemRefOps.cpp
The file was modifiedmlir/test/Dialect/Standard/canonicalize.mlir
Commit 4eb9fe2e1a073301ed71bf36b13805802ce8ca47 by Lang Hames
[ORC] Port WrapperFunctionUtils and SimplePackedSerialization from ORC runtime.

Replace the existing WrapperFunctionResult type in
llvm/include/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h with a
version adapted from the ORC runtime's implementation.

Also introduce the SimplePackedSerialization scheme (also adapted from the ORC
runtime's implementation) for wrapper functions to avoid manual serialization
and deserialization for calls to runtime functions involving common types.
The file was addedllvm/unittests/ExecutionEngine/Orc/SimplePackedSerializationTest.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/TargetProcessControl.h
The file was removedllvm/lib/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/TargetProcessControlTypes.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/OrcRPCTargetProcessControl.h
The file was addedllvm/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/TargetProcess/OrcRPCTPCServer.h
The file was modifiedllvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
The file was addedllvm/unittests/ExecutionEngine/Orc/WrapperFunctionUtilsTest.cpp
The file was addedllvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
The file was modifiedllvm/lib/ExecutionEngine/Orc/TargetProcess/RegisterEHFrames.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/TargetProcessControl.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/Shared/CMakeLists.txt
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/TargetProcess/JITLoaderGDB.h
Commit 5188b9af84c487b0c5456ba7019a2bf029f6146a by Lang Hames
[ORC] Make WrapperFunctionResult's ValuePtr member non-const.

The const qualifier was a hangover from an earlier iteration that allowed
wrapper functions to return pointers to const memory. This feature has
been removed, so there's no reason for this to be const any more, and
removing it eliminates const-cast warnings.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
Commit 69cfa178b77d91205cf8cf45fa00e28b1730d0a1 by aaron
Clearly specify that these are partially implemented features
The file was modifiedclang/www/c_status.html
Commit 8ed88559582fd8f0e8a148cc7220619753cfb287 by zinenko
[mlir] ODS: do not emit trailing const for static methods

The generated C++ would be invalid.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D104233
The file was modifiedmlir/tools/mlir-tblgen/OpInterfacesGen.cpp
Commit 5a28bdeeb61a49f71c5a2b3cb5d96ec1f9f3f571 by Lang Hames
[ORC] Fix missing function in unit test.
The file was modifiedllvm/unittests/ExecutionEngine/Orc/WrapperFunctionUtilsTest.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
Commit 48fb8ecf443beb56e1c936bff83a241982c19c9a by Lang Hames
[ORC] Fix narrowing-in-initializer-list warnings.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h
Commit 0672d5d104defe4221c49d5d35cba879adaa6321 by Lang Hames
[ORC] Fix missing std::move.
The file was modifiedllvm/include/llvm/ExecutionEngine/Orc/Shared/WrapperFunctionUtils.h
Commit 89fa1a3a831f2d46e16ac90dbcc5598c5a00b38c by Lang Hames
[ORC] Fix endianness in manual serialization to match WrapperFunctionUtils.
The file was modifiedllvm/lib/ExecutionEngine/Orc/TPCEHFrameRegistrar.cpp
The file was modifiedllvm/lib/ExecutionEngine/Orc/TPCDebugObjectRegistrar.cpp
Commit f7fc8927c0885ff155ea16f99bcf6db6fb10357a by flo
[LoopDeletion] Check for irreducible cycles when deleting loops.

Loops with irreducible cycles may loop infinitely. Those cannot be
removed, unless the loop/function is marked as mustprogress.

Also discussed in D103382.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D104238
The file was modifiedllvm/lib/Transforms/Scalar/LoopDeletion.cpp
The file was modifiedllvm/test/Transforms/LoopDeletion/loops-with-irreducible-subloops.ll
Commit 45ae766e78e07434f68305d1b56bf3ee65ebbcef by a.bataev
[OPENMP]Fix PR50699: capture locals in combine directrives for aligned clause.

Need to capture locals in aligned clauses for the combined directives to
be fix the crash in the codegen.

Differential Revision: https://reviews.llvm.org/D104258
The file was addedclang/test/OpenMP/parallel_for_simd_aligned_codegen.cpp
The file was modifiedclang/lib/Sema/SemaOpenMP.cpp
Commit ccda8c71b2ce6b1f005f8f2434e0e7bc5028e169 by llvmgnsyncbot
[gn build] Port 4eb9fe2e1a07
The file was modifiedllvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/Shared/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc/BUILD.gn
Commit cfe117def7b0714e5d724c80839e68f40fba4f47 by patacca
[Polly][Isl] Replacing isl method `to_str()` with `stringFromIslObj()`. NFC.

This is part of an effort to reduce the differences between the custom C++ bindings used right now by polly in `lib/External/isl/include/isl/isl-noxceptions.h` and the official isl C++ interface.

Changes made:
- Removing method `to_str()` from all the classes in the isl C++ bindings.
- Overload method `stringFromIslObj()` so it accepts isl C++ objects.
- To keep backward compatibility `stringFromIslObj()` now accepts a value that is returned if the isl C object is `null` or doesn't have a string representation (by default it's an empty string). In some cases it's better to have the string "null" instead of an empty string.
- isl-noexceptions.h has been generated by this https://github.com/patacca/isl/commit/d33ec3a3bbaf971b254a853e6d8200ff9f5a1385

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D104211
The file was modifiedpolly/lib/External/isl/include/isl/isl-noexceptions.h
The file was modifiedpolly/lib/Support/GICHelper.cpp
The file was modifiedpolly/lib/Support/ISLTools.cpp
The file was modifiedpolly/lib/CodeGen/IslAst.cpp
The file was modifiedpolly/include/polly/Support/GICHelper.h
The file was modifiedpolly/include/polly/Support/ISLOStream.h
The file was modifiedpolly/lib/Analysis/PolyhedralInfo.cpp
The file was modifiedpolly/lib/Analysis/ScopBuilder.cpp
The file was modifiedpolly/lib/Analysis/ScopInfo.cpp
Commit 304b9c25d58d611287c51c50cc0fe4a8c16f6f0d by flo
[Matrix] Add tests for fast-math flags & matrix codegen.

This has already been implemented in be2277fbf233 which adds
pragma fp support. This patch just adds test coverage for
regular fast-math flags (PR46165).
The file was addedclang/test/CodeGen/matrix-type-operators-fast-math.c