Changes

Changes from Git (git https://github.com/llvm/llvm-project.git)

Summary

  1. [clang-format] Disallow templates to be followed by literal (details)
  2. [test] Remove unused `unittest2` import (details)
  3. [X86][ConstraintFP] Model `MXCSR` for function call (details)
  4. [test] Remove unused `unittest2` import from concurrent_base.py (details)
  5. [clang][TypePrinter] Support expression template arguments when checking defaultedness (details)
  6. [clang][TemplateBase] Add IsDefaulted bit to TemplateArgument (details)
  7. [clang][TypePrinter] Test TemplateArgument::IsDefaulted when omitting default arguments (details)
  8. [clang][DebugInfo] Check TemplateArgument::IsDefaulted (details)
  9. [lldb][TypeSystemClang][NFC] Make TemplateParameterInfos members private (details)
  10. [lldb] Add support for DW_AT_default_value in template params (details)
  11. [ReleaseNotes] Add release notes for LLDB/Clang changes to handling of defaulted template arguments (details)
  12. [lldb][NFC] Build fix: use TemplateParameterInfos public APIs instead of accessing private members (details)
  13. [lldb][Test][NFC] TestCreateClassTemplateDecl: make variable names more readable (details)
  14. [OpenMP] Fix stack overflow for test bug54082.c (details)
  15. [clang][Interp] Implement __builtin_assume (details)
  16. [clang][Interp][NFC] Add GetPtrBasePop opcode (details)
  17. [JT][CT] Preserve exisiting BPI/BFI during JumpThreading (details)
  18. [clang][Interp][NFC] Remove an unnecessary isArray() check (details)
  19. [clang][Interp][NFC] Print parent class name of methods (details)
  20. [mlir][linalg] Make Linalg vectorizer lower affine.apply (details)
  21. Revert "[JT][CT] Preserve exisiting BPI/BFI during JumpThreading" (details)
  22. [mlir] fail gracefull in CallOpSignatureConversion (details)
  23. [mlir][Conversion] Rename the MemRefToLLVM pass (details)
  24. [mlir] GreedyPatternRewriteDriver: Enqueue ancestors in MultiOpPatternRewriteDriver (details)
  25. [mlir][NFC] GreedyPatternRewriteDriver: Remove OpPatternRewriteDriver (details)
  26. [mlir] GreedyPatternRewriteDriver: Make classes single-use (details)
  27. [MLIR] Fix tensor shapes in Toy chapter 1 (details)
  28. [memref][Transform][NFC] Improve the doc for masked_vectorize (details)
  29. [mlir] GreedyPatternRewriteDriver: Entry point takes single region (details)
  30. [mlir][transforms] Simplify OperationEquivalence and CSE (details)
  31. [PowerPC] ppc64-P9-vabsd.ll - add some basic ISD::ABDS test coverage (details)
  32. [mlir][transforms] CSE ops with multiple regions (details)
  33. Revert "[lldb] Add support for DW_AT_default_value in template params" (details)
  34. [flang][hlfir] Handle scalar to array in hlfir.assign codegen. (details)
  35. [flang][hlfir] Handle box and non constant must_free in end_associate. (details)
  36. [Docs] Fix a statement wrt instruction alignment of 0 (details)
  37. Add clang_CXXMethod_isExplicit to libclang (details)
  38. [NFC][AArch64] Use optional returns in target parser instead of 'invalid' objects (details)
  39. [NFC][AArch64] Get default features directly from ArchInfo and CpuInfo objects (details)
  40. [lldb][Target] GetScratchTypeSystems: sort TypeSystems with strict weak ordering (details)
  41. [mlir] GreedyPatternRewriteDriver: All entry points take a config (details)
  42. [SCCP] Use range info to prove AddInst has NSW flag. (details)
  43. [mlir] GreedyPatternRewriteDriver: Move strict mode to GreedyPatternRewriteDriver (details)
  44. Workflows: Fix version-check.py script for when there is no RC tag yet (details)
  45. [libc][cmake] Fix LIBC_TARGET_OS query from compiler triple for `darwin`. (details)
  46. [NFC][AArch64] Get extension strings directly from ArchInfo in target parser (details)
  47. Revert "[DAGCombine] fp_to_sint isSaturatingMinMax" (details)
  48. [gn] port a3b0dde4edb9 (llvm-cov -> Debuginfod dep) (details)
  49. Stop diagnosing member and array access in offsetof as an extension (details)
  50. [SCCP] Add test cases with switch on range containing undef. (details)
  51. [libc++] Disables a test in clang-17. (details)
  52. [libc][math] Implement asinhf function correctly rounded for all rounding modes. (details)
  53. Correct the link to the latest C DR status page for C11 and C17 (details)
  54. [gn] merge 650bbc56203c9 (details)
  55. [flang] Add Count to simplified intrinsics (details)
  56. [mlir][NFC] GreedyPatternRewriteDriver: Merge region-based and multi-op-based drivers (details)
  57. [clang][ASTImporter] Propagate TemplateArgument::IsDefaulted during import (details)
  58. [lldb][CXXModuleHandler] Set TemplateArgument::IsDefaulted (details)
  59. [LinkerWrapper][NFC] Remove unused options (details)
  60. [mlir][sparse][NFC] Disallow writing into sparse_tensor.to_... results (details)
  61. [mlir][sparse] Implement BufferizableOpInterface for additional ops (details)
  62. Lift EHPersonalities from Analysis to IR (NFC) (details)
  63. [Verifier][WinEH] Check funclet tokens on intrinsic calls that may lower to function calls (details)
  64. [LinkerWrapper] Add support for --[no-]whole-archive into the linker wrapper (details)
  65. Don't flag memory-only mach-o corefiles as invalid (details)
  66. disable-language-runtime-unwindplans desc rewrite to be searchable (details)
  67. Fix tsan problem where the per-thread shared_ptr() can be locked right before the cache is destroyed causing a race where it tries to remove an entry from a destroyed cache. (details)
  68. [gn build] Enable check-bolt on Linux (details)
  69. [lldb] Make SBSection::GetSectionData call Section::GetSectionData. (details)
  70. [CMake] Include clang-bolt bootstrap target in BOLT-PGO.cmake (details)
  71. libclc: Set CMAKE_CXX_STANDARD to 17 to match llvm (details)
  72. [clang-tidy] Fix warning in portability-simd-intrinsics (details)
  73. workflows: Bump python version on Windows to try to fix lldb failure (details)
  74. Fix recursive error for constraints depending on itself incorrectly (details)
  75. libclc: Fix building against an llvm build directory (details)
  76. workflows: Fix libclc tests (details)
  77. [SystemZ] Fix handling of vectors and their exposure of the vector ABI. (details)
  78. [BranchRelaxation] Move faulting_op check into callee [nfc] (details)
  79. [mlir][sparse] refactoring isAdmissibleTensorExp into codegen (details)
  80. [clang][deps] Fix modulemap file path for implementation of module (details)
  81. [RISCV][InsertVSETVLI] Handle partially transparent instructions in PRE (details)
  82. Revert "[BranchRelaxation] Move faulting_op check into callee [nfc]" (details)
  83. [libc] Use a prebuilt libc-hdrgen binary if available. (details)
  84. [flang] Don't fold STORAGE_SIZE() on polymorphic argument (details)
  85. [libc] Do not install to the default triple in GPU mode (details)
  86. [libc] Add code for detecting NVIDIA GPUs as well (details)
  87. [llvm-cov] Fix logic error in debuginfod lookup. (details)
  88. [mlri][ExecutionEngine] Don't globaly set CMake prefixes to find HIP (details)
  89. [NVPTX] Infer AS of pointers passed to kernels as integers. (details)
  90. [flang] Catch obscure error in defined assignment (details)
  91. [lldb][test] Set minimum compiler_versions (details)
  92. [flang] Don't apply intrinsic assignment check for PURE subprograms to defined assignment (details)
  93. [flang] Prohibit multiple separate module procedure definitions (details)
  94. Reland "[lldb] Add support for DW_AT_default_value in template params" (details)
  95. [flang] Correct procedure pointer (or dummy) compatibility check (details)
  96. [flang][parser] Diagnose an invalid space (details)
  97. [mlir][sparse] fixed typo (details)
  98. [lldb][Test] TestVSCode_completions.py: fix expected type strings (details)
  99. [mlir] Promote the SubElementInterfaces to a core Attribute/Type construct (details)
  100. Add tests for binops with conditions/assume constraints (details)
  101. Add optimizations for icmp eq/ne (mul(X, Y), 0) (details)
  102. Add tests for reoredering (shift (add (shift x, C0), y), C1); NFC (details)
  103. Reorder (shl (add/sub (shl x, C0), y), C1) -> (add/sub (shl x, C0 + C1), (shl y, C1)) (details)
  104. [BOLT][DWARF] Add logging for split dwarf (details)
  105. [flang] Fix shared library build (details)
  106. Manual DWARF index: don't skip over -gmodules debug info (details)
  107. [LSAN][HWASAN] Run LSAN tests with HWASAN enabled (details)
  108. llvm-reduce: Use consistent type for reducer function (details)
  109. llvm-reduce: Use ThreadPool feature to wait for tasks to complete (details)
  110. llvm-reduce: Use WithColor in another place (details)
  111. llvm-reduce: Parse file from the opened buffer instead of the file (details)
  112. [ValueTracking] Teach computeKnownBits about riscv.vsetvli.opt and riscv.vsetvlimax.opt intrinsics. (details)
  113. [RISCV] Teach computeKnownBits that vsetvli returns <= 65536. (details)
  114. Revert "Add optimizations for icmp eq/ne (mul(X, Y), 0)" (details)
  115. Revert "Reorder (shl (add/sub (shl x, C0), y), C1) -> (add/sub (shl x, C0 + C1), (shl y, C1))" (details)
  116. [LSAN] Disable leak_check_before_thread_started for hwasan (details)
  117. [flang] Portability warnings for an ambiguous ASSOCIATED() case (details)
Commit 8a3de13573bdeaee13ec959fa2af0d11f21f5f00 by emilia
[clang-format] Disallow templates to be followed by literal

There should not be any cases where the angle brackets of template
parameters are directly followed by a literal. It is more likely that a
comparison is taking place instead.

This patch makes the TokenAnnotator prefer to annotate < and > as
operators when directly followed by a literal. A similar check already
exists for literals directly *before* potential template args.

Fixes https://github.com/llvm/llvm-project/issues/60140

Reviewed By: HazardyKnusperkeks, owenpan, MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D142139
The file was modifiedclang/unittests/Format/FormatTest.cpp
The file was modifiedclang/lib/Format/TokenAnnotator.cpp
Commit d5c0b1f73b0502158d9b3afa0ba7b22b69f0823e by rupprecht
[test] Remove unused `unittest2` import
The file was modifiedlldb/test/API/python_api/target/TestTargetAPI.py
Commit 2bb960302aa5b53fd387c05f917043b421ade53e by phoebe.wang
[X86][ConstraintFP] Model `MXCSR` for function call

This patch is inspired by D111433. It would affect the performance under
strict FP mode. But it preserves the correct rounding behavior accross
function calls.

Fixes #59305

Reviewed By: sepavloff

Differential Revision: https://reviews.llvm.org/D139549
The file was modifiedllvm/include/llvm/CodeGen/TargetLowering.h
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
The file was modifiedllvm/test/CodeGen/X86/pr59305.ll
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/test/CodeGen/X86/fp-strict-scalar-inttofp-fp16.ll
Commit dd9b31e2c2a271c9e6059dde6a406aea5ed8b663 by rupprecht
[test] Remove unused `unittest2` import from concurrent_base.py
The file was modifiedlldb/packages/Python/lldbsuite/test/concurrent_base.py
Commit 798494ed4f112bf64dcabbe8b60becb42b23208f by michaelbuch12
[clang][TypePrinter] Support expression template arguments when checking defaultedness

This patch adds support for `TemplateArgument`s of kind
`TemplateArgument::Expression` to `clang::isSubstitutedDefaultArgument`.
We do so by evaluating both the `Pattern` and `Arg` expression to an
`APInt`, if we can, and comparing the results.

This will be useful in an upcoming change where
`clang::isSubstitutedDefaultArgument` gets called from `clang::Sema`
where the `TemplateArgument`s are instantiated as expressions (without
being evaluted to `APInt` beforehand).

**Testing**

- Added unit-tests

Differential Revision: https://reviews.llvm.org/D142632
The file was modifiedclang/unittests/AST/TypePrinterTest.cpp
The file was modifiedclang/lib/AST/TypePrinter.cpp
Commit 8b4279b66fc2f535184642b739b573ead1733711 by michaelbuch12
[clang][TemplateBase] Add IsDefaulted bit to TemplateArgument

**Summary**

This patch adds a `IsDefaulted` field to `clang::TemplateArgument`.

To prevent memory footprint increase we still 1 bit from `ArgKind`.

**Changes**

1. `getIsDefaulted`/`setIsDefaulted` to allow clients to communicate
   an argument's defaulted-ness to the TypePrinter
2. The `TemplateArgument` properties description had to be changed
   to make sure we correctly mark the defaulted-ness of arguments
   that came from a deserialized AST (caught by the HLSL test-suite)
3. The `TemplateArgument` constructors now accept a `IsDefaulted`
   parameter to simplify construction from the tablegen description.
   Though if people don't want to clutter the constructors we can
   instead call `setIsDefaulted` from tablegen
4. When `clang::Sema` checks the template arguments against template
   parameters we now call `setIsDefaulted`. This makes sure that
   whenever a specialization decl gets constructed, the defaulted-ness
   of the associated `TemplateArgument`s has already been deduced.
   This preserves the immutability of `TemplateArgumentList`s

**Background**

In LLDB we construct ASTs from debug-info and hand it to clang
to perform actions such as printing/formatting a typenames.
Some debug formats, specifically DWARF, may only encode information
about class template instantiations, losing the structure of the generic
class definition. However, the `clang::TypePrinter` needs a properly
constructed `ClassTemplateDecl` with generic default argument decls
to be able to deduce whether a `ClassTemplateSpecializationDecl` was
instantiatiated with `TemplateArgument`s that correspond to the
defaults. LLDB does know whether a particular template argument was
defaulted, but can't currently tell clang about it.

This patch allows LLDB to set the defaulted-ness of a `TemplateArgument`
and thus benefit more from `clang::TypePrinter`.

See discussion in https://reviews.llvm.org/D140423

**Testing**

* Added unit-test
* LLDB/clang/llvm test-suite passes

Differential Revision: https://reviews.llvm.org/D141826
The file was modifiedclang/lib/AST/ASTContext.cpp
The file was modifiedclang/lib/AST/TemplateBase.cpp
The file was modifiedclang/lib/Sema/SemaTemplate.cpp
The file was modifiedclang/include/clang/AST/TemplateBase.h
The file was modifiedclang/unittests/AST/DeclTest.cpp
The file was modifiedclang/include/clang/AST/PropertiesBase.td
Commit 3d7dcec5db2f86bd8b9142d180716725a8fc0b0f by michaelbuch12
[clang][TypePrinter] Test TemplateArgument::IsDefaulted when omitting default arguments

**Summary**

This patch allows clients who can't properly construct
a `ClassTemplateDecl` to still benefit from the `clang::TypePrinter`s
ability to skip printing defaulted template arguments. The
clients simply have to call `TemplateArgument::setIsDefaulted`
in advance.

See discussion in https://reviews.llvm.org/D140423

Differential Revision: https://reviews.llvm.org/D141827
The file was modifiedclang/lib/AST/TypePrinter.cpp
Commit 29ecf0e62cd7899dee84732a31875179ec4d5a80 by michaelbuch12
[clang][DebugInfo] Check TemplateArgument::IsDefaulted

Since `ClassTemplateSpecializationDecl`s now set the
`TemplateArgument::IsDefaulted` bit, there's no need
to derive it here.

Differential Revision: https://reviews.llvm.org/D142333
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit a29e06bbeaad7012ac85b221f1aaba3fe1d5fd35 by michaelbuch12
[lldb][TypeSystemClang][NFC] Make TemplateParameterInfos members private

This patch makes the members of `TemplateParameterInfos` only accessible
via public APIs. The motivation for this is that
`TemplateParameterInfos` attempts to maintain two vectors in tandem
(`args` for the template arguments and `names` for the corresponding
name). Working with this structure as it's currently designed makes
it easy to run into out-of-bounds accesses later down the line.

This patch proposes to introduce a new
`TemplateParameterInfos::InsertArg` which is the only way to
set the `TemplateArgument` and name of an entry and since we
require both to be specified we maintain the vectors in sync
out-of-the-box.

To avoid adding non-const getters just for unit-tests a new
`TemplateParameterInfosManipulatorForTests` is introduced
that can be used to control internal state from tests.
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
The file was modifiedlldb/unittests/Symbol/TestTypeSystemClang.cpp
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.h
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
Commit 1aee040c6545ad65d87b14a694078c182b9fa359 by michaelbuch12
[lldb] Add support for DW_AT_default_value in template params

**Summary**

This patch makes LLDB understand the `DW_AT_default_value` on
template argument DIEs. As a result, type summaries will no
longer contain the defaulted template arguments, reducing
noise substantially. E.g.,

Before:
```
(lldb) v nested
(std::vector<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator <char> > > > > >) nested = size=0 {}
```

After:
```
(lldb) v nested
(std::vector<std::vector<std::basic_string<char> > >) nested = size=0 {}
```

See discussion in https://reviews.llvm.org/D140423

**Testing**

* Adjust API tests
* Added unit-test

Differential Revision: https://reviews.llvm.org/D141828
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py
The file was modifiedlldb/unittests/SymbolFile/DWARF/CMakeLists.txt
The file was addedlldb/unittests/SymbolFile/DWARF/Inputs/DW_AT_default_value-test.yaml
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
The file was modifiedlldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py
Commit 5c8ddf64ecf545e8d62f4916ceec275bd8f425ea by michaelbuch12
[ReleaseNotes] Add release notes for LLDB/Clang changes to handling of defaulted template arguments

Differential Revision: https://reviews.llvm.org/D142653
The file was modifiedllvm/docs/ReleaseNotes.rst
Commit 41a2d7a37cb1665f061a6ec6edd31a749417b024 by michaelbuch12
[lldb][NFC] Build fix: use TemplateParameterInfos public APIs instead of accessing private members

Fixes build failures caused by a faulty rebase
in `a29e06bbeaad7012ac85b221f1aaba3fe1d5fd35`

Differential Revision: https://reviews.llvm.org/D140030
The file was modifiedlldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp
Commit 8e8dd110be5f1b4944a9dacd4f4a09bf8ecc6892 by michaelbuch12
[lldb][Test][NFC] TestCreateClassTemplateDecl: make variable names more readable

Suggested in https://reviews.llvm.org/D140030
The file was modifiedlldb/unittests/Symbol/TestTypeSystemClang.cpp
Commit 544f8c7f3959f21fa7d85768c3bbb5402bf15ea6 by i
[OpenMP] Fix stack overflow for test bug54082.c

When `N` is 1024, `int result[N][N]` is obviously large stack that Windows cannot support...

Fix #60326.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D142684
The file was modifiedopenmp/runtime/test/parallel/bug54082.c
Commit 760136ff13ba172787c3367664fe9f3f7b3b64ef by tbaeder
[clang][Interp] Implement __builtin_assume

Just ignore it.

As part of this, move the Ret and RetVoid implementation to Interp.h, so
they can be shared with InterpBuiltin.cpp.

Differential Revision: https://reviews.llvm.org/D141193
The file was modifiedclang/lib/AST/Interp/Interp.h
The file was modifiedclang/test/AST/Interp/builtins.cpp
The file was modifiedclang/lib/AST/Interp/Interp.cpp
The file was modifiedclang/lib/AST/Interp/InterpBuiltin.cpp
Commit 7b966e2156b8b461a29a49122286f804a30236e9 by tbaeder
[clang][Interp][NFC] Add GetPtrBasePop opcode

Change GetPtrBase to *not* pop the base pointer and add a *Pop variant.
This will be used in later patches.
The file was modifiedclang/lib/AST/Interp/ByteCodeExprGen.cpp
The file was modifiedclang/lib/AST/Interp/Opcodes.td
The file was modifiedclang/lib/AST/Interp/Interp.h
Commit 26e7cb24cb5dfa560683064d37f560558f00aa67 by ybrevnov
[JT][CT] Preserve exisiting BPI/BFI during JumpThreading

Currently, JT creates and updates local instances of BPI\BFI. As a result global ones have to be invalidated if JT made any changes.
In fact, JT doesn't use any information from BPI/BFI for the sake of the transformation itself. It only creates BPI/BFI to keep them up to date. But since it updates local copies (besides cases when it updates profile metadata) it just waste of time.

Current patch is a rework of D124439. D124439 makes one step and replaces local copies with global ones retrieved through AnalysisPassManager. Here we do one more step and don't create BPI/BFI if the only reason of creation is to keep BPI/BFI up to date. Overall logic is the following. If there is cached BPI/BFI then update it along the transformations. If there is no existing BPI/BFI, then create it only if it is required to update profile metadata.

Please note if BPI/BFI exists on exit from JT (either cached or created) it is always up to date and no reason to invalidate it.

Reviewed By: mkazantsev

Differential Revision: https://reviews.llvm.org/D136827
The file was modifiedllvm/test/Transforms/JumpThreading/select.ll
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-4.ll
The file was modifiedllvm/test/Transforms/JumpThreading/threading_prof1.ll
The file was modifiedllvm/include/llvm/Transforms/Scalar/JumpThreading.h
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-5.ll
The file was modifiedllvm/test/Transforms/JumpThreading/threading_prof2.ll
The file was modifiedllvm/test/Transforms/JumpThreading/threading_prof3.ll
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-2.ll
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-3.ll
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-6.ll
Commit 435225c6e2f860ecc53fcd65e193f832569d090e by tbaeder
[clang][Interp][NFC] Remove an unnecessary isArray() check

We already do an isPrimitiveArray() check, so no need for the isArray()
check.
The file was modifiedclang/lib/AST/Interp/Pointer.cpp
Commit f2f8c25540753a8be375fc90ad703d4101562342 by tbaeder
[clang][Interp][NFC] Print parent class name of methods

in Function::dump().
The file was modifiedclang/lib/AST/Interp/Disasm.cpp
Commit c7b1176e9afbfcc3da9482abbf7c1eb8793ff254 by andrzej.warzynski
[mlir][linalg] Make Linalg vectorizer lower affine.apply

It is possible that the input to the Linalg vectorizer contains
`affine.apply` ops (see the example in [1]). Such operations are not
vectarizable at the moment, but this can be fixed by simply converting
them to arithmetic operations. This is basically what this patch
introduces.

The IR change enabled in this patch could be part of a larger set of
"linalgOp pre-processing" transformations that happens right before
vectorization starts but after we know we can vectorize the op. I am
leaving this as a TODO.

[1] https://github.com/iree-org/iree/issues/10876.

Differential Revision: https://reviews.llvm.org/D142371
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Utils/Utils.cpp
The file was modifiedmlir/test/Dialect/Linalg/vectorization.mlir
Commit f7c1982309082387c2f2d4587cbbc5618a9662f1 by ybrevnov
Revert "[JT][CT] Preserve exisiting BPI/BFI during JumpThreading"

This reverts commit 26e7cb24cb5dfa560683064d37f560558f00aa67.
The file was modifiedllvm/lib/Transforms/Scalar/JumpThreading.cpp
The file was modifiedllvm/test/Transforms/JumpThreading/threading_prof1.ll
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-3.ll
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-5.ll
The file was modifiedllvm/include/llvm/Transforms/Scalar/JumpThreading.h
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-4.ll
The file was modifiedllvm/test/Transforms/JumpThreading/threading_prof2.ll
The file was modifiedllvm/test/Transforms/JumpThreading/threading_prof3.ll
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-2.ll
The file was modifiedllvm/test/Transforms/JumpThreading/thread-prob-6.ll
The file was modifiedllvm/test/Transforms/JumpThreading/select.ll
Commit 88a3dc0ee88009a145e8daa875235650f07554c9 by zinenko
[mlir] fail gracefull in CallOpSignatureConversion

Previously, the CallOpSignatureConversion pattern would assert if
function signature change affected the number of results. Fail the
pattern instead and let the caller propagate failure.

Fixes #60186.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D142624
The file was modifiedmlir/lib/Dialect/Func/Transforms/FuncConversions.cpp
The file was modifiedmlir/test/Transforms/test-legalizer.mlir
Commit cb4ccd38fa0407928feed7e39d197169eabc95b2 by quentin.colombet
[mlir][Conversion] Rename the MemRefToLLVM pass

Since the recent MemRef refactoring that centralizes the lowering of
complex MemRef operations outside of the conversion framework, the
MemRefToLLVM pass doesn't directly convert these complex operations.

Instead, to fully convert the whole MemRef dialect space, MemRefToLLVM
needs to run after `expand-strided-metadata`.

Make this more obvious by changing the name of the pass and the option
associated with it from `convert-memref-to-llvm` to
`finalize-memref-to-llvm`.
The word "finalize" conveys that this pass needs to run after something
else and that something else is documented in its tablegen description.

This is a follow-up patch related to the conversation at:
https://discourse.llvm.org/t/psa-you-need-to-run-expand-strided-metadata-before-memref-to-llvm-now/66956/14

Differential Revision: https://reviews.llvm.org/D142463
The file was modifiedmlir/test/mlir-opt/async.mlir
The file was modifiedmlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-sparse-dot-product.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-3d.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-maskedload.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-1d.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-collapse-tensor.mlir
The file was modifiedmlir/test/Conversion/MemRefToLLVM/convert-alloca-scope.mlir
The file was modifiedmlir/tools/mlir-vulkan-runner/mlir-vulkan-runner.cpp
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf-full.mlir
The file was modifiedmlir/test/Integration/Dialect/Standard/CPU/test_subview.mlir
The file was modifiedmlir/test/mlir-cpu-runner/memref-reinterpret-cast.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-tensor-matmul.mlir
The file was modifiedmlir/test/python/integration/dialects/linalg/opsrun.py
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-tensor-e2e.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-transfer-write.mlir
The file was modifiedmlir/test/python/execution_engine.py
The file was modifiedmlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
The file was modifiedmlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-ext.mlir
The file was modifiedmlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-transfer-to-loops.mlir
The file was modifiedmlir/docs/TargetLLVMIR.md
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/matmul-vs-matvec.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-maskedstore.mlir
The file was modifiedmlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-transfer-read-2d.mlir
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/microbench-scf-async-parallel-for.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-call.mlir
The file was modifiedmlir/test/Conversion/MemRefToLLVM/convert-static-memref-ops.mlir
The file was modifiedmlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
The file was modifiedmlir/lib/Conversion/OpenMPToLLVM/OpenMPToLLVM.cpp
The file was modifiedmlir/test/Integration/Dialect/LLVMIR/CPU/test-complex-sparse-constant.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-call.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-mulf.mlir
The file was modifiedmlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
The file was modifiedmlir/test/mlir-cpu-runner/sgemm-naive-codegen.mlir
The file was modifiedmlir/test/Conversion/MemRefToLLVM/generic-functions.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-0-d-vectors.mlir
The file was modifiedmlir/test/Conversion/FuncToLLVM/calling-convention.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli-full.mlir
The file was modifiedmlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-gather.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-2d-nhwc-hwcf-call.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero.mlir
The file was modifiedmlir/test/mlir-cpu-runner/utils.mlir
The file was modifiedmlir/include/mlir/Conversion/Passes.td
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-realloc.mlir
The file was modifiedmlir/test/mlir-cpu-runner/bare-ptr-call-conv.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/X86Vector/test-inline-asm-vector-avx512.mlir
The file was modifiedmlir/test/Integration/Dialect/LLVMIR/CPU/test-vp-intrinsic.mlir
The file was modifiedmlir/test/lib/Dialect/LLVM/TestLowerToLLVM.cpp
The file was modifiedmlir/include/mlir/Conversion/MemRefToLLVM/MemRefToLLVM.h
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-2d.mlir
The file was modifiedmlir/test/Integration/Dialect/Memref/cast-runtime-verification.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-elementwise.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-padtensor.mlir
The file was modifiedmlir/unittests/ExecutionEngine/Invoke.cpp
The file was modifiedmlir/test/mlir-cpu-runner/unranked-memref.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-compress.mlir
The file was modifiedmlir/test/Integration/Dialect/Complex/CPU/correctness.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-transfer-read.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-nwc-wcf-call.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-expand-tensor.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/ArmSVE/test-sve.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-expand.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-tilezero-block.mlir
The file was modifiedmlir/examples/toy/Ch6/mlir/LowerToLLVM.cpp
The file was modifiedmlir/examples/toy/Ch7/mlir/LowerToLLVM.cpp
The file was modifiedmlir/test/mlir-cpu-runner/memref-reshape.mlir
The file was modifiedmlir/test/mlir-cpu-runner/global-memref.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-1d-call.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-sparse-dot-matvec.mlir
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/microbench-linalg-async-parallel-for.mlir
The file was modifiedmlir/test/Conversion/MemRefToLLVM/convert-dynamic-memref-ops.mlir
The file was modifiedmlir/test/mlir-cpu-runner/async.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-conv-3d-ndhwc-dhwcf-call.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-subtensor-insert-multiple-uses.mlir
The file was modifiedmlir/test/mlir-cpu-runner/async-value.mlir
The file was modifiedmlir/test/Integration/Dialect/Standard/CPU/test-ceil-floor-pos-neg.mlir
The file was modifiedmlir/test/Integration/Dialect/Memref/memref_abi.c
The file was modifiedmlir/test/Integration/Dialect/Async/CPU/test-async-parallel-for-1d.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-scatter.mlir
The file was modifiedmlir/test/Conversion/MemRefToLLVM/expand-then-convert-to-llvm.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/test-sparse-saxpy-jagged-matvec.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/test-one-shot-bufferize.mlir
The file was modifiedmlir/test/mlir-cpu-runner/copy.mlir
The file was modifiedmlir/test/Integration/Dialect/Vector/CPU/AMX/test-muli.mlir
The file was modifiedmlir/test/Integration/Dialect/Linalg/CPU/rank-reducing-subview.mlir
Commit e195e6bad6706230a4b5fd4b5cc13de1f16f25cc by springerm
[mlir] GreedyPatternRewriteDriver: Enqueue ancestors in MultiOpPatternRewriteDriver

The `GreedyPatternRewriteDriver` was extended to enqueue ancestors in D140304. With this change, `MultiOpPatternRewriteDriver` behaves the same way.

Note: `MultiOpPatternRewriteDriver` now also has a scope that limits how far we go when checking ancestors. By default, this is the first common region of all given ops.

Differential Revision: https://reviews.llvm.org/D141945
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
The file was modifiedmlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
Commit cadd5666a6d669fa0507bd4f86e9570af4250869 by springerm
[mlir][NFC] GreedyPatternRewriteDriver: Remove OpPatternRewriteDriver

The `MultiOpPatternRewriteDriver` can be reused. This gives us better debug messages and more code reuse. Debug messages such as `** Replace: (op name)` were previously not printed when using the `applyOpPatternsAndFold(Operation *, ...)` overload.

Differential Revision: https://reviews.llvm.org/D142613
The file was modifiedmlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Commit 67760d7e315ff90198bccfd4b0a3934f7a30e6ce by springerm
[mlir] GreedyPatternRewriteDriver: Make classes single-use

Less mutable state, more `const`. This is to address a concern about complexity of state in D140304.

Differential Revision: https://reviews.llvm.org/D141949
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
Commit bfedf169f4261a0fbe097f4a717d375dda2503c4 by thomas.preudhomme
[MLIR] Fix tensor shapes in Toy chapter 1

In Toy tutorial chapter 1, multiply_transpose() is called with b<2, 3>
and c<3, 2> when both parameters should have the same shape. This commit
fixes this by instead using c and d as parameters and fix a comment typo
where c and d are mentioned to have shape <2, 2> when they actually have
shape <3, 2>.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D142622
The file was modifiedmlir/docs/Tutorials/Toy/Ch-1.md
The file was modifiedmlir/test/Examples/Toy/Ch1/ast.toy
Commit bf5f63e59fd729efd6dd69318b365293f7ce385d by quentin.colombet
[memref][Transform][NFC] Improve the doc for masked_vectorize

The `transform.structured.masked_vectorize` operator assumes that the
iteration space of the given linalg op is smaller than the given vector
sizes.
Explicitly states this requirement in the description of the operation.

Also fix the related comment and assert message in the vectorization code.
The wording was flipped.

NFC

Differential Revision: https://reviews.llvm.org/D142628
The file was modifiedmlir/include/mlir/Dialect/Linalg/TransformOps/LinalgTransformOps.td
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
Commit a2b837ab0448869c74cc042155dd454833c60d62 by springerm
[mlir] GreedyPatternRewriteDriver: Entry point takes single region

The rewrite driver is typically applied to a single region or all regions of the same op. There is no longer an overload to apply the rewrite driver to a list of regions.

This simplifies the rewrite driver implementation because the scope is now a single region as opposed to a list of regions.

Note: This change is not NFC because `config.maxIterations` and `config.maxNumRewrites` is now counted for each region separately. Furthermore, worklist filtering (`scope`) is now applied to each region separately.

Differential Revision: https://reviews.llvm.org/D142611
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
The file was modifiedmlir/lib/Dialect/Vector/Transforms/LowerVectorMask.cpp
The file was modifiedmlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
The file was modifiedmlir/lib/Dialect/MemRef/Transforms/ExpandStridedMetadata.cpp
The file was modifiedmlir/lib/Dialect/MemRef/Transforms/FoldMemRefAliasOps.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
The file was modifiedmlir/lib/Dialect/MemRef/Transforms/ResolveShapedTypeResultDims.cpp
Commit c864288dcf169fd1aa663320b7414c0ee72d5c2b by springerm
[mlir][transforms] Simplify OperationEquivalence and CSE

Replace `mapOperands` and `mapResults` with two new callbacks. It was not clear what "mapping" meant and why the equivalence relationship was a property of the Operand/OpResult as opposed to just SSA values.

This revision changes the contract of the two callbacks: `checkEquivalent` compares two values for equivalence. `markEquivalent` informs the caller that the analysis determined that two values are equivalent. This simplifies the API because callers do not have to reason about operands/results, but just SSA values.

`OperationEquivalence::isEquivalentTo` can be used directly in CSE and there is no need for a custom op equivalence analysis.

Differential Revision: https://reviews.llvm.org/D142558
The file was modifiedmlir/lib/IR/OperationSupport.cpp
The file was modifiedmlir/test/lib/IR/TestOperationEquals.cpp
The file was modifiedmlir/lib/Transforms/CSE.cpp
The file was modifiedmlir/lib/Transforms/Utils/RegionUtils.cpp
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
Commit 846ec9092483cc7212d3334f1fecd539b026db62 by llvm-dev
[PowerPC] ppc64-P9-vabsd.ll - add some basic ISD::ABDS test coverage

Test coverage to ensure D142313 lowers ISD::ABDU -> VABSD but not ISD::ABDS (although I think v4i32 would be compatible with the XVNEGSP trick)
The file was modifiedllvm/test/CodeGen/PowerPC/ppc64-P9-vabsd.ll
Commit aa4e54f2f444c266310105fccbdbb07fc71894da by springerm
[mlir][transforms] CSE ops with multiple regions

There were issues with the CSE equivalence analysis that have been fixed with D142558. This makes it possible to CSE ops with multiple regions.

Differential Revision: https://reviews.llvm.org/D142562
The file was modifiedmlir/test/Transforms/cse.mlir
The file was modifiedmlir/lib/Transforms/CSE.cpp
Commit 1efde67d990c198b1480b2ab7b820f86388b84da by david.spickett
Revert "[lldb] Add support for DW_AT_default_value in template params"

This reverts commit 1cf52e540242f968e0cf789587bcf76c01332aeb.

Due to test failures on Arm and AArch64 bots:
https://lab.llvm.org/buildbot/#/builders/96/builds/34718

(which were obscured by an earlier build failure)
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py
The file was modifiedlldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
The file was removedlldb/unittests/SymbolFile/DWARF/Inputs/DW_AT_default_value-test.yaml
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
The file was modifiedlldb/unittests/SymbolFile/DWARF/CMakeLists.txt
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py
Commit 86e6a8c33a410c9219806ee87acff2ea011de979 by jperier
[flang][hlfir] Handle scalar to array in hlfir.assign codegen.

The scalar must be placed in memory before creating descriptors and
calling the runtime assignment API.

Differential Revision: https://reviews.llvm.org/D142698
The file was modifiedflang/lib/Optimizer/HLFIR/Transforms/ConvertToFIR.cpp
The file was modifiedflang/test/HLFIR/assign-codegen.fir
Commit 36e1890f6bf50c247519b1867838ffc1ed7eca54 by jperier
[flang][hlfir] Handle box and non constant must_free in end_associate.

Differential Revision: https://reviews.llvm.org/D142700
The file was modifiedflang/test/HLFIR/associate-codegen.fir
The file was modifiedflang/lib/Optimizer/HLFIR/Transforms/BufferizeHLFIR.cpp
Commit 9922c78a67eb1eaffc0337dbda7777caa841929c by shivam98.tkg
[Docs] Fix a statement wrt instruction alignment of 0

This fix https://github.com/llvm/llvm-project/issues/53371
Zero is not a legal alignment.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D142633
The file was modifiedllvm/docs/LangRef.rst
Commit 0a51bc731bcc2c27e4fe97957a83642d93d989be by luca.disera
Add clang_CXXMethod_isExplicit to libclang

The new method is a wrapper of `CXXConstructorDecl::isExplicit` and
`CXXConversionDecl::isExplicit`, allowing the user to recognize whether
the declaration pointed to by a cursor was marked with the explicit
specifier.

An export for the function, together with its documentation, was added
to "clang/include/clang-c/Index.h" with an implementation provided in
"clang/tools/libclang/CIndex.cpp".

The implementation is based on similar `clang_CXXMethod`
implementations, returning a falsy unsigned value when the cursor is not
a declaration, is not a declaration for a constructor or conversion
function or is not a relevant declaration that was marked with the
`explicit` specifier.

The new symbol was added to "clang/tools/libclang/libclang.map" to be
exported, under the LLVM16 tag.

"clang/tools/c-index-test/c-index-test.c" was modified to print a
specific tag, "(explicit)", for cursors that are recognized by
`clang_CXXMethod_isExplicit`.

Two new regression files, "explicit-constructor.cpp" and
"explicit-conversion-function.cpp", were added to "clang/test/Index", to
ensure that the behavior of the new function is correct for constructors
and conversion functions, respectively.

The "get-cursor.cpp", "index-file.cpp" and
"recursive-cxx-member-calls.cpp" regression files in "clang/test/Index"
were updated as they were affected by the new "(explicit)" tag.

A binding for the new function was added to libclang's python's
bindings, in "clang/bindings/python/clang/cindex.py", as the
"is_explicit_method" method under `Cursor`.

An accompanying test was added to
"clang/bindings/python/tests/cindex/test_cursor.py", mimicking the
regression tests for the C side.

The current release note for Clang, "clang/docs/ReleaseNotes.rst" was
modified to report the new addition under the "libclang" section.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D140756
The file was addedclang/test/Index/explicit-conversion-function.cpp
The file was modifiedclang/tools/c-index-test/c-index-test.c
The file was modifiedclang/test/Index/index-file.cpp
The file was modifiedclang/test/Index/recursive-cxx-member-calls.cpp
The file was addedclang/test/Index/explicit-constructor.cpp
The file was modifiedclang/include/clang-c/Index.h
The file was modifiedclang/tools/libclang/CIndex.cpp
The file was modifiedclang/bindings/python/tests/cindex/test_cursor.py
The file was modifiedclang/bindings/python/clang/cindex.py
The file was modifiedclang/tools/libclang/libclang.map
The file was modifiedclang/test/Index/get-cursor.cpp
Commit 9ea00fc74c3c0032ff2d9a6774e13449a30e4549 by lucas.prates
[NFC][AArch64] Use optional returns in target parser instead of 'invalid' objects

This updates the parsing methods in AArch64's Target Parser to make use
of optional returns instead of "invalid" enum values, making the API's
behaviour clearer.

Reviewed By: lenary, tmatheson

Differential Revision: https://reviews.llvm.org/D142539
The file was modifiedclang/lib/Basic/Targets/AArch64.cpp
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.cpp
The file was modifiedllvm/include/llvm/TargetParser/AArch64TargetParser.h
The file was modifiedllvm/unittests/TargetParser/TargetParserTest.cpp
The file was modifiedllvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
The file was modifiedllvm/lib/TargetParser/AArch64TargetParser.cpp
Commit 0753cf2caca707e3957a70c9756b7f1d42fab2af by lucas.prates
[NFC][AArch64] Get default features directly from ArchInfo and CpuInfo objects

This updates the AArch64's Target Parser and its uses to capture
information about default features directly from ArchInfo and CpuInfo
objects, instead of relying on an API function to access them
indirectly.

Reviewed By: tmatheson

Differential Revision: https://reviews.llvm.org/D142540
The file was modifiedclang/lib/Driver/ToolChains/Arch/AArch64.cpp
The file was modifiedllvm/lib/TargetParser/AArch64TargetParser.cpp
The file was modifiedllvm/unittests/TargetParser/TargetParserTest.cpp
The file was modifiedclang/lib/Basic/Targets/AArch64.cpp
The file was modifiedllvm/include/llvm/TargetParser/AArch64TargetParser.h
The file was modifiedllvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
Commit 78fee46d8d8e82158b79a4ad948e8723e89f7f65 by michaelbuch12
[lldb][Target] GetScratchTypeSystems: sort TypeSystems with strict weak ordering

`std::sort` requires a comparison operator that obides by strict weak
ordering. `operator<=` on pointer does not and leads to undefined
behaviour. Specifically, when we grow the `scratch_type_systems` vector
slightly larger (and thus take `std::sort` down a slightly different
codepath), we segfault. This happened while working on a patch that
would in fact grow this vector. In such a case ASAN reports:

```
$ ./bin/lldb ./lldb-test-build.noindex/lang/cpp/complete-type-check/TestCppIsTypeComplete.test_builtin_types/a.out -o "script -- lldb.target.FindFirstType(\"void\")"
(lldb) script -- lldb.target.FindFirstType("void")
=================================================================
==59975==ERROR: AddressSanitizer: container-overflow on address 0x000108f6b510 at pc 0x000280177b4c bp 0x00016b7d7430 sp 0x00016b7d7428
READ of size 8 at 0x000108f6b510 thread T0
    #0 0x280177b48 in std::__1::shared_ptr<lldb_private::TypeSystem>::shared_ptr[abi:v15006](std::__1::shared_ptr<lldb_private::TypeSystem> const&)+0xb4 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x177b48)
(BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #1 0x280dcc008 in void std::__1::__introsort<std::__1::_ClassicAlgPolicy, lldb_private::Target::GetScratchTypeSystems(bool)::$_3&, std::__1::shared_ptr<lldb_private::TypeSystem>*>(std::__1::shared_ptr<lldb_private::TypeSystem>*, std::__1::shared_
ptr<lldb_private::TypeSystem>*, lldb_private::Target::GetScratchTypeSystems(bool)::$_3&, std::__1::iterator_traits<std::__1::shared_ptr<lldb_private::TypeSystem>*>::difference_type)+0x1050 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblld
b.17.0.0git.dylib:arm64+0xdcc008) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #2 0x280d88788 in lldb_private::Target::GetScratchTypeSystems(bool)+0x5a4 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xd88788) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #3 0x28021f0b4 in lldb::SBTarget::FindFirstType(char const*)+0x624 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x21f0b4) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #4 0x2804e9590 in _wrap_SBTarget_FindFirstType(_object*, _object*)+0x26c (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x4e9590) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #5 0x1062d3ad4 in cfunction_call+0x5c (/opt/homebrew/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/Python:arm64+0xcfad4) (BuildId: c9efc4bbb1943f9a9b7cc4e91fce477732000000200000000100000000000d00)

<--- snipped --->

0x000108f6b510 is located 400 bytes inside of 512-byte region [0x000108f6b380,0x000108f6b580)
allocated by thread T0 here:
    #0 0x105209414 in wrap__Znwm+0x74 (/Applications/Xcode2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.3/lib/darwin/libclang_rt.asan_osx_dynamic.dylib:arm64e+0x51414) (BuildId: 0a44828ceb64337bbfff60b22cd838f0320000
00200000000100000000000b00)
    #1 0x280dca3b4 in std::__1::__split_buffer<std::__1::shared_ptr<lldb_private::TypeSystem>, std::__1::allocator<std::__1::shared_ptr<lldb_private::TypeSystem>>&>::__split_buffer(unsigned long, unsigned long, std::__1::allocator<std::__1::shared_pt
r<lldb_private::TypeSystem>>&)+0x11c (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xdca3b4) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #2 0x280dc978c in void std::__1::vector<std::__1::shared_ptr<lldb_private::TypeSystem>, std::__1::allocator<std::__1::shared_ptr<lldb_private::TypeSystem>>>::__push_back_slow_path<std::__1::shared_ptr<lldb_private::TypeSystem> const&>(std::__1::s
hared_ptr<lldb_private::TypeSystem> const&)+0x13c (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xdc978c) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #3 0x280d88dec in std::__1::vector<std::__1::shared_ptr<lldb_private::TypeSystem>, std::__1::allocator<std::__1::shared_ptr<lldb_private::TypeSystem>>>::push_back[abi:v15006](std::__1::shared_ptr<lldb_private::TypeSystem> const&)+0x80 (/Users/mic
haelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xd88dec) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #4 0x280d8857c in lldb_private::Target::GetScratchTypeSystems(bool)+0x398 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0xd8857c) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #5 0x28021f0b4 in lldb::SBTarget::FindFirstType(char const*)+0x624 (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x21f0b4) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #6 0x2804e9590 in _wrap_SBTarget_FindFirstType(_object*, _object*)+0x26c (/Users/michaelbuch/Git/lldb-build-main-no-modules/lib/liblldb.17.0.0git.dylib:arm64+0x4e9590) (BuildId: ea963d2c0d47354fb647f5c5f32b76d932000000200000000100000000000d00)
    #7 0x1062d3ad4 in cfunction_call+0x5c (/opt/homebrew/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/Python:arm64+0xcfad4) (BuildId: c9efc4bbb1943f9a9b7cc4e91fce477732000000200000000100000000000d00)
    #8 0x10627fff0 in _PyObject_MakeTpCall+0x7c (/opt/homebrew/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/Python:arm64+0x7bff0) (BuildId: c9efc4bbb1943f9a9b7cc4e91fce477732000000200000000100000000000d00)
    #9 0x106378a98 in _PyEval_EvalFrameDefault+0xbcf8 (/opt/homebrew/Cellar/python@3.11/3.11.1/Frameworks/Python.framework/Versions/3.11/Python:arm64+0x174a98) (BuildId: c9efc4bbb1943f9a9b7cc4e91fce477732000000200000000100000000000d00)
```

Differential Revision: https://reviews.llvm.org/D142709
The file was modifiedlldb/source/Target/Target.cpp
Commit 977cddb95eac67a6dc6680a7d0fadee81114de11 by springerm
[mlir] GreedyPatternRewriteDriver: All entry points take a config

The multi-op entry point now also takes a GreedyPatternRewriteConfig and respects config.maxNumRewrites. The scope is also a part of the config now.

Differential Revision: https://reviews.llvm.org/D142614
The file was modifiedmlir/lib/Dialect/Affine/Utils/Utils.cpp
The file was modifiedmlir/lib/Dialect/Affine/Utils/LoopUtils.cpp
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
The file was modifiedmlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
Commit 72121a20cda4dc91d0ef5548f93046e71c5ec6f6 by flo
[SCCP] Use range info to prove AddInst has NSW flag.

This patch updates SCCP to use the value ranges of AddInst operands to
try to prove the AddInst does not overflow in the signed sense and
adds the NSW flag. The reasoning is done with
makeGuaranteedNoWrapRegion (thanks @nikic for point it out!).

Follow-ups will include extending this to more
OverflowingBinaryOperators.

Depends on D142387.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D142390
The file was modifiedllvm/test/Transforms/SCCP/conditions-ranges-with-undef.ll
The file was modifiedllvm/test/Transforms/SCCP/ip-ranges-select.ll
The file was modifiedllvm/test/Transforms/SCCP/binaryops-constexprs.ll
The file was modifiedllvm/test/Transforms/SCCP/conditions-ranges.ll
The file was modifiedllvm/test/Transforms/SCCP/add-nuw-nsw-flags.ll
The file was modifiedllvm/test/Transforms/SCCP/ip-ranges-casts.ll
The file was modifiedllvm/test/Transforms/SCCP/ip-ranges-binaryops.ll
The file was modifiedllvm/test/Transforms/SCCP/return-constants.ll
The file was modifiedllvm/lib/Transforms/Utils/SCCPSolver.cpp
The file was modifiedllvm/test/Transforms/SCCP/ip-add-range-to-call.ll
The file was modifiedllvm/test/Transforms/SCCP/ip-constant-ranges.ll
The file was modifiedllvm/test/Transforms/SCCP/return-argument.ll
The file was modifiedllvm/test/Transforms/SCCP/ip-ranges-phis.ll
The file was modifiedllvm/test/Transforms/SCCP/widening.ll
Commit 6bdecbcb99bc6b8fa25a2841bf2087bdbb91b4aa by springerm
[mlir] GreedyPatternRewriteDriver: Move strict mode to GreedyPatternRewriteDriver

`strictMode` is moved to GreedyRewriteConfig to simplify the API and state of rewriter classes. The region-based GreedyPatternRewriteDriver now also supports strict mode.

MultiOpPatternRewriteDriver becomes simpler: fewer method must be overridden.

Differential Revision: https://reviews.llvm.org/D142623
The file was modifiedmlir/lib/Dialect/Affine/Utils/LoopUtils.cpp
The file was modifiedmlir/include/mlir/Transforms/GreedyPatternRewriteDriver.h
The file was modifiedmlir/lib/Dialect/Affine/Transforms/SimplifyAffineStructures.cpp
The file was modifiedmlir/lib/Reducer/ReductionTreePass.cpp
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
The file was modifiedmlir/lib/Dialect/Affine/TransformOps/AffineTransformOps.cpp
The file was modifiedmlir/lib/Dialect/Affine/Transforms/AffineDataCopyGeneration.cpp
The file was modifiedmlir/lib/Dialect/Affine/Utils/Utils.cpp
The file was modifiedmlir/test/lib/Dialect/Affine/TestAffineDataCopy.cpp
The file was modifiedmlir/test/lib/Dialect/Test/TestPatterns.cpp
Commit 57b491b5c10a0de5eed83cb5e19c9f8dedc11e67 by tstellar
Workflows: Fix version-check.py script for when there is no RC tag yet

Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D142598
The file was modified.github/workflows/version-check.py
Commit a369bb8a3b18804898cefe70938fb63a41a2a5db by lntue
[libc][cmake] Fix LIBC_TARGET_OS query from compiler triple for `darwin`.

Currently LIBC_TARGET_OS query from compiler triple returns `apple` for
macOS.  This change will fix it back to `darwin` as before.

Differential Revision: https://reviews.llvm.org/D141282
The file was modifiedlibc/cmake/modules/LLVMLibCArchitectures.cmake
Commit 852bb68ddb2bf9c91421a6ce59a07a6f44d20641 by lucas.prates
[NFC][AArch64] Get extension strings directly from ArchInfo in target parser

Reviewed By: tmatheson

Differential Revision: https://reviews.llvm.org/D142541
The file was modifiedllvm/include/llvm/TargetParser/AArch64TargetParser.h
The file was modifiedllvm/lib/TargetParser/AArch64TargetParser.cpp
The file was modifiedclang/lib/Basic/Targets/AArch64.cpp
Commit e60b91df1357e6a5f66840581f4d5f57e258c0b4 by sam.parker
Revert "[DAGCombine] fp_to_sint isSaturatingMinMax"

This reverts commit 85395af27241ab9c8d5763b8afcaa07f1bab26d5.

This is causing trouble with scalable vectors.
The file was modifiedllvm/include/llvm/ADT/APFloat.h
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
The file was modifiedllvm/lib/Support/APFloat.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/WebAssembly/fpclamptosat.ll
Commit b59bc7812493248b59b8da0e0ec6ac038283d227 by thakis
[gn] port a3b0dde4edb9 (llvm-cov -> Debuginfod dep)
The file was modifiedllvm/utils/gn/secondary/llvm/tools/llvm-cov/BUILD.gn
Commit 63d6b8be6cf2422228a1a8800d85a11be469c6e2 by aaron
Stop diagnosing member and array access in offsetof as an extension

This was a mistake from e7300e75b51a7e7d4e81975b4be7a6c65f9a8286
(https://reviews.llvm.org/D133574) caused by us accidentally tracking
an older copy of the C DR list for DR496. The text in
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2396.htm#dr_496 makes
it clear that subobjects are allowed, which means member and array
access expressions are allowed.

This backs out the changes from the previous commit that relate to this
diagnostic.
The file was modifiedclang/docs/LanguageExtensions.rst
The file was modifiedclang/test/C/drs/dr4xx.c
The file was modifiedclang/include/clang/Basic/DiagnosticParseKinds.td
The file was modifiedclang/lib/Parse/ParseExpr.cpp
The file was modifiedclang/test/CXX/drs/dr4xx.cpp
The file was modifiedclang/test/C/C2x/n2350.c
Commit 7296eae9465411eb07386cb06cb73efb662f0707 by flo
[SCCP] Add test cases with switch on range containing undef.
The file was modifiedllvm/test/Transforms/SCCP/switch.ll
Commit 4fa997ddf4b93f8255e1643599a523198f3e026c by koraq
[libc++] Disables a test in clang-17.

This test already had issues and bumping main to 17 causes them to fail
again.
The file was modifiedlibcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp
Commit 46b15fd19e84f6914e067ef9812c282a43b5924d by lntue
[libc][math] Implement asinhf function correctly rounded for all rounding modes.

Implement asinhf function correctly rounded for all rounding modes.

Reviewed By: zimmermann6

Differential Revision: https://reviews.llvm.org/D142681
The file was addedlibc/src/math/generic/asinhf.cpp
The file was addedlibc/test/src/math/exhaustive/asinhf_test.cpp
The file was modifiedlibc/spec/stdc.td
The file was modifiedlibc/test/src/math/exhaustive/CMakeLists.txt
The file was addedlibc/test/src/math/asinhf_test.cpp
The file was modifiedlibc/utils/MPFRWrapper/MPFRUtils.h
The file was modifiedlibc/utils/MPFRWrapper/MPFRUtils.cpp
The file was modifiedlibc/config/linux/aarch64/entrypoints.txt
The file was modifiedlibc/src/math/CMakeLists.txt
The file was modifiedlibc/src/math/generic/CMakeLists.txt
The file was modifiedlibc/config/windows/entrypoints.txt
The file was modifiedlibc/docs/math.rst
The file was modifiedlibc/test/src/math/exhaustive/exhaustive_test.cpp
The file was modifiedlibc/config/linux/x86_64/entrypoints.txt
The file was modifiedlibc/config/darwin/arm/entrypoints.txt
The file was modifiedlibc/src/math/generic/explogxf.h
The file was modifiedlibc/test/src/math/CMakeLists.txt
The file was addedlibc/src/math/asinhf.h
Commit 8d4b0976d5fe92a51f43ccfea50d1f10c4c77e5d by aaron
Correct the link to the latest C DR status page for C11 and C17

We were linking against:
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2148.htm

However, the latest DR page for the 400s is:
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2396.htm
The file was modifiedclang/www/c_dr_status.html
Commit 3c3dcb16837e1d89cee0a6dd6c669ac30998e55d by thakis
[gn] merge 650bbc56203c9

Needed to link e.g. LexTests after ca446037af0.
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Frontend/OpenMP/BUILD.gn
Commit 7d2e198729df14a7e025d44ae8aa21ce14be9baa by mats.petersson
[flang] Add Count to simplified intrinsics

This patch adds a simplfiied version of count for the simplify intrinsics pass, allowing the function to be inlined.

This was done specifically to help improve performance for exchange2, and provides a ~12% performance increase.

Reviewed By: vzakhari, Leporacanthicus

Differential Revision: https://reviews.llvm.org/D142209
The file was modifiedflang/test/Transforms/simplifyintrinsics.fir
The file was modifiedflang/lib/Optimizer/Transforms/SimplifyIntrinsics.cpp
Commit 9d5c63f641c8318808e8e62df0a9290d1072ae41 by springerm
[mlir][NFC] GreedyPatternRewriteDriver: Merge region-based and multi-op-based drivers

Deduplicate large parts of the worklist processing (`GreedyPatternRewriteDriver::processWorklist`).

The new class hierarchy is as follows:
```
          GreedyPatternRewriteDriver (abstract)
                       ^
                       |
      -----------------------------------
      |                                 |
RegionPatternRewriteDriver         MultiOpPatternRewriteDriver
```

Also update the Markdown documentation.

Differential Revision: https://reviews.llvm.org/D141396
The file was modifiedmlir/lib/Transforms/Utils/GreedyPatternRewriteDriver.cpp
The file was modifiedmlir/docs/PatternRewriter.md
Commit d194d817b0b29c6e244d01cf7b836b9e4bbe2794 by michaelbuch12
[clang][ASTImporter] Propagate TemplateArgument::IsDefaulted during import

With https://reviews.llvm.org/D141826 `TemplateArgument`s have an
additional field that indicates their defaulted-ness. This gets
used during debug-info generation and in the `clang::TypePrinter`.

This patch copies the field during the import process so consumers
of the ASTImporter can benefit from the other Clang components that
read the field.

**Testing**

* Added unit-test
* Checked that this fixes (in addition to a follow-up LLDB patch)
  fix current test failures in LLDB

Differential Revision: https://reviews.llvm.org/D142713
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
The file was modifiedclang/lib/AST/ASTImporter.cpp
Commit 12e8e3fe90c976d08d466b24ce21a7f7e86f4249 by michaelbuch12
[lldb][CXXModuleHandler] Set TemplateArgument::IsDefaulted

Since https://reviews.llvm.org/D141827 this field gets used
to print type names. Thus propagate it after importing TemplateArguments
from modules.

**Testing**

* Confirmed that this fixes the ongoing `import-std-module` test
  failures.

Differential Revision: https://reviews.llvm.org/D142714
The file was modifiedlldb/source/Plugins/ExpressionParser/Clang/CxxModuleHandler.cpp
Commit 7d4ce7050505baadd0d40c30d0726a136a64c717 by jhuber6
[LinkerWrapper][NFC] Remove unused options

Summary:
These options are no longer used, we don't need to keep them.
The file was modifiedclang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
Commit aab46c7579c29b2ce44fc0febeb46c2df300780e by springerm
[mlir][sparse][NFC] Disallow writing into sparse_tensor.to_... results

Writing into the memrefs returned by `sparse_tensor.to_values` etc. can cause additional copies during bufferization.

Differential Revision: https://reviews.llvm.org/D142728
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
Commit fa639d3b43a9034133b7566d0ec2a91fcd79c361 by springerm
[mlir][sparse] Implement BufferizableOpInterface for additional ops

The handling of unknown ops will be tightened in a subsequent change. All sparse_tensor ops should implement BufferizableOpInterface, otherwise, they are treated as "unknown" and additional buffer allocs/copies may be inserted around them.

Differential Revision: https://reviews.llvm.org/D142005
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/BufferizableOpInterfaceImpl.cpp
Commit 3b387d10707d3ec5f4786812cc055c89c3eaa161 by Stefan Gränitz
Lift EHPersonalities from Analysis to IR (NFC)

Computing EH-related information was only relevant for analysis passes so far. Lifting it to IR will allow the IR Verifier to calculate EH funclet coloring and validate funclet operand bundles in a follow-up step.

Reviewed By: rnk, compnerd

Differential Revision: https://reviews.llvm.org/D138122
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
The file was modifiedllvm/lib/CodeGen/MachineVerifier.cpp
The file was modifiedllvm/lib/Transforms/Utils/EscapeEnumerator.cpp
The file was modifiedllvm/lib/Target/M68k/M68kExpandPseudo.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
The file was modifiedllvm/include/llvm/Analysis/MustExecute.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
The file was modifiedllvm/lib/CodeGen/WinEHPrepare.cpp
The file was modifiedclang/docs/tools/clang-formatted-files.txt
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Analysis/BUILD.gn
The file was modifiedllvm/lib/Target/X86/X86FrameLowering.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
The file was modifiedllvm/lib/CodeGen/MachineFunction.cpp
The file was modifiedllvm/lib/Target/X86/X86ExpandPseudo.cpp
The file was modifiedllvm/lib/Transforms/ObjCARC/ObjCARC.h
The file was modifiedllvm/lib/Transforms/Utils/Local.cpp
The file was modifiedllvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
The file was modifiedllvm/lib/IR/CMakeLists.txt
The file was addedllvm/lib/IR/EHPersonalities.cpp
The file was modifiedllvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn
The file was modifiedllvm/lib/Target/M68k/M68kCollapseMOVEMPass.cpp
The file was modifiedllvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp
The file was removedllvm/lib/Analysis/EHPersonalities.cpp
The file was modifiedllvm/lib/Target/X86/X86ISelLowering.cpp
The file was modifiedllvm/lib/Transforms/Utils/InlineFunction.cpp
The file was modifiedllvm/lib/Target/X86/X86WinEHState.cpp
The file was modifiedllvm/lib/CodeGen/DwarfEHPrepare.cpp
The file was modifiedllvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
The file was addedllvm/include/llvm/IR/EHPersonalities.h
The file was modifiedllvm/lib/CodeGen/StackProtector.cpp
The file was removedllvm/include/llvm/Analysis/EHPersonalities.h
The file was modifiedllvm/lib/Analysis/CMakeLists.txt
The file was modifiedllvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h
Commit bb4a04e794aadadc411e7e42a661c6d836d9e8a0 by Stefan Gränitz
[Verifier][WinEH] Check funclet tokens on intrinsic calls that may lower to function calls

WinEHPrepare requires funclet operand bundles ("tokens") on function calls from EH funclets to prevent them from getting removed as "implausible" calls. This includes calls to intrinsic functions that lower to function calls in the course of IR transformations (e.g. ObjC ARC runtime calls).

We can not detect such cases in WinEHPrepare itself, because at this point they mixed up with valid implausible calls. These must be removed to guarantee that the EH backend can assign unique colors and EH state numbers to all blocks.

This patch allows the IR Verifier to detect missing and dangling funclet tokens. Non-conforming IR becomes illegal and miscompilations are detected early. In order to find funclet pad instructions for funclets that extend over multiple blocks, we have to calculate EH funclet colors. As coloring can be expensive, it runs on-demand and results are cached per function.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D138123
The file was modifiedllvm/test/Transforms/ObjCARC/invoke-2.ll
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was addedllvm/test/Verifier/operand-bundles-wineh.ll
Commit 4f9964738b9c01f16bc962aac68e441377c8c842 by jhuber6
[LinkerWrapper] Add support for --[no-]whole-archive into the linker wrapper

Summary:
This patch adds support for `--[no-]whole-archive` to the linker
wrapper. This allows us to bypass the symbol resolution logic that is
normally used for static archives. For multi-architecture binaries this
also allows us to build for every single member.
The file was modifiedclang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp
The file was modifiedclang/tools/clang-linker-wrapper/LinkerWrapperOpts.td
The file was modifiedclang/test/Driver/linker-wrapper-libs.c
Commit 841b26f1d80f69c45bbf2426761f3e3b9c927d86 by Jason Molenda
Don't flag memory-only mach-o corefiles as invalid

It is possible to have a memory-only mach-o corefile, with the
threads provided by an os-plugin thread provider, or a scripted
process, in Python.

Differential Revision: https://reviews.llvm.org/D142662
rdar://102579544
The file was modifiedlldb/source/Plugins/Process/mach-core/ProcessMachCore.cpp
Commit 8112bd2cb4845e0449088c764ad36748514259b8 by Jason Molenda
disable-language-runtime-unwindplans desc rewrite to be searchable

The description for disable-language-runtime-unwindplans did not
include likely search terms ("backtrace", "stack"), rewrite it
to include those so it is more easily discoverable with apropos.
The text is still not the clearest description of what a language
runtime is / what it might do, but this is better.

Differential Revision: https://reviews.llvm.org/D142663
The file was modifiedlldb/source/Target/TargetProperties.td
Commit bcc10817d5569172ee065015747e226280e9b698 by benny.kra
Fix tsan problem where the per-thread shared_ptr() can be locked right before the cache is destroyed causing a race where it tries to remove an entry from a destroyed cache.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D142394
The file was modifiedmlir/include/mlir/Support/ThreadLocalCache.h
Commit 41e776386dd5930565b338b776816c48245f52f3 by aeubanks
[gn build] Enable check-bolt on Linux

It builds but not all tests pass, mostly due to missing libbolt_rt_instr.a.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D141881
The file was modifiedllvm/utils/gn/secondary/BUILD.gn
Commit 805600c7d573cf88cf035d01a2ea9389fc24d435 by jgorbe
[lldb] Make SBSection::GetSectionData call Section::GetSectionData.

`SBSection::GetSectionData` and `Section::GetSectionData` are
implemented differently, and the `SBSection` method doesn't handle
compressed sections correctly.

Differential Revision: https://reviews.llvm.org/D142672
The file was modifiedlldb/test/API/python_api/section/TestSectionAPI.py
The file was modifiedlldb/source/API/SBSection.cpp
The file was addedlldb/test/API/python_api/section/compressed-sections.yaml
Commit 131b955a4f7015c718c1780d0320353d488f85be by aaupov
[CMake] Include clang-bolt bootstrap target in BOLT-PGO.cmake

Preemptively include clang-bolt target in BOLT-PGO CMake cache file,
in preparation of https://reviews.llvm.org/D139454 to avoid breaking
bolt-x86_64-ubuntu-clang-bolt-lto-pgo buildbot.
The file was modifiedclang/cmake/caches/BOLT-PGO.cmake
Commit 409f42b10ac6dc1c6a4e68d20ccd3adf6770e238 by tstellar
libclc: Set CMAKE_CXX_STANDARD to 17 to match llvm

Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D142720
The file was modifiedlibclc/CMakeLists.txt
Commit 1d02dd241816e3d5865e7d395ee7310167198b09 by me
[clang-tidy] Fix warning in portability-simd-intrinsics

When portability-simd-intrinsics.Suggest were set to false,
produced warning were missing source location,
and due to that such warning coudn't be NOLINTed.

Added missing tests.

Fixes issues: https://github.com/llvm/llvm-project/issues/52831

Differential Revision: https://reviews.llvm.org/D142565
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/portability/simd-intrinsics-x86.cpp
The file was modifiedclang-tools-extra/clang-tidy/portability/SIMDIntrinsicsCheck.cpp
The file was modifiedclang-tools-extra/test/clang-tidy/checkers/portability/simd-intrinsics-ppc.cpp
Commit 9f307a02bebf9029079f3d13c8b0ccd3b09c5241 by tstellar
workflows: Bump python version on Windows to try to fix lldb failure

Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D142719
The file was modified.github/workflows/llvm-project-tests.yml
Commit 42667563721e139a93ab886119ea2780ebc3fecc by erich.keane
Fix recursive error for constraints depending on itself incorrectly

Fixes: #60323

https://github.com/llvm/llvm-project/issues/60323

The problem is that we are profiling the 'Expr' components directly,
however when they contain an unresolved lookup, those canonicalize
identically.  The result was the two versions of calls to 'go' were
canonicalized identically.

This patch fixes this by ensuring we consider the declaration the
constraint is attached to, when possible.  When not, we skip the
diagnostic.

The result is that we are relaxing our diagnostic in some cases (Of
which I couldn't come up with a reproducer), such that we might see
overflows when evaluating constraints that depend on themselves in a way
that they are not attached to a declaration directly, such as if
they are nested requirements, though the hope is this won't be a
problem, since the 'parent' named constraint would catch this.  I'm
hopeful that the 'worst case' is that we catch recursion 'later' in the
process, instead of immediately.
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/lib/Sema/SemaConcept.cpp
The file was modifiedclang/test/SemaTemplate/concepts-recursive-inst.cpp
Commit 8040e3a4deeb25edc34fb4f89e032ff58ad50572 by tstellar
libclc: Fix building against an llvm build directory

Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D142718
The file was modifiedlibclc/CMakeLists.txt
Commit 683b83abaab4e7f10446bec4007277430cd987ea by tstellar
workflows: Fix libclc tests

libclc requires using cmake files to detect the LLVM installation instead
of llvm-config so we need to update our cmake invocation.

Reviewed By: thieta

Differential Revision: https://reviews.llvm.org/D142716
The file was modified.github/workflows/llvm-project-tests.yml
Commit 0eff46f87f16772f93bdc584865e945162aff170 by paulsson
[SystemZ] Fix handling of vectors and their exposure of the vector ABI.

- Global vector variables expose the vector ABI through their alignments only
  if they are >=16 bytes in size.

- Vectors passed between functions expose the vector ABI only if they are
  <=16 bytes in size.

LLVM test suite builds with gcc/clang now give the same gnu attributes emitted.

Reviewed By: Ulrich Weigand

Differential Revision: https://reviews.llvm.org/D141409
The file was addedclang/test/CodeGen/SystemZ/vec-abi-gnuattr-17b.c
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was addedclang/test/CodeGen/SystemZ/vec-abi-gnuattr-08b.c
The file was addedclang/test/CodeGen/SystemZ/vec-abi-gnuattr-03b.c
The file was modifiedclang/test/CodeGen/SystemZ/vec-abi-gnuattr-24.c
The file was addedclang/test/CodeGen/SystemZ/vec-abi-gnuattr-09b.c
Commit c549da959b81902789a17918c5b95d4449e6fdfa by listmail
[BranchRelaxation] Move faulting_op check into callee [nfc]

Mostly to remove a special case from an upcoming patch.
The file was modifiedllvm/lib/CodeGen/BranchRelaxation.cpp
Commit a7bf2e558feb954396c93fd3fa740775944a179b by peiming
[mlir][sparse] refactoring isAdmissibleTensorExp into codegen

This patch moves some utils into CodegenEnv class, it should make the code easier to follow and it eliminates several indirect value assignment that use `ptr**`.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D142040
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.cpp
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.h
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
Commit 73dba2f649a8e8c01e9c8b8df3bdc89cdf0fd7ee by blangmuir
[clang][deps] Fix modulemap file path for implementation of module

Use the name "as requested" for the path of the implemented module's
modulemap file, just as we do for other modulemap file paths. This fixes
fatal errors with modules where we tried to find framework headers
relative to the wrong directory when imported by an implementation file
of the same module.

rdar://104619123

Differential Revision: https://reviews.llvm.org/D142501
The file was modifiedclang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
The file was addedclang/test/ClangScanDeps/modules-implementation-vfs.m
Commit d199bf98229229d5ebd3c0999cc68d0d72558d83 by listmail
[RISCV][InsertVSETVLI] Handle partially transparent instructions in PRE

The PRE implementation was being overly strict when checking to see if a vsetvli was removed in the current block. For instructions which don't use all the fields of VTYPE or VL, we can propagate a changed state past the first instruction with an SEW operand and remove a vsetvli later in the block. We do need to be careful now to ensure that the state convergences before the end of the block or we'd invalidate the cached data flow results.

Taking a step back, we're modeling the effect of the emitVSETVLIs pass which runs just after PRE. This is unfortunate, and makes me think we should probably reevaluate doing the PRE as a post-pass instead of as surgery in the data flow phases. Doing that requires us to get more aggressive about mutating user written vsetvlis which we've tried not to do up to now, but well, maybe it's time? Anyways, that's a thought for the future, not something I'm proposing doing now.

Differential Revision: https://reviews.llvm.org/D142409
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsetvli-insert-crossbb.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
Commit 36244914b42e9ec6b9f01d95efe17c693ae950bc by listmail
Revert "[BranchRelaxation] Move faulting_op check into callee [nfc]"

This reverts commit c549da959b81902789a17918c5b95d4449e6fdfa.  Per buildbots, this was not NFC.
The file was modifiedllvm/lib/CodeGen/BranchRelaxation.cpp
Commit 5274a460dac6ab8620519859a2d59eea37123550 by sivachandra
[libc] Use a prebuilt libc-hdrgen binary if available.

This feature will primarily by used by the runtimes build. In the
runtimes build, we build libc-hdrgen once for the host and use it
to build the libc for other targets. So, the host libc-hdrgen is
like a prebuilt passed to the target builds.

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D141426
The file was modifiedlibc/CMakeLists.txt
The file was modifiedlibc/cmake/modules/LLVMLibCHeaderRules.cmake
The file was modifiedlibc/test/src/CMakeLists.txt
Commit 057a2c239e801810fc28d3e87fc4e9cf50be0fc5 by pklausler
[flang] Don't fold STORAGE_SIZE() on polymorphic argument

More generally, don't return a successful result from
Fortran::evaluate::DynamicType::MeasureSizeInBytes() when the
type is polymorphic.

Differential Revision: https://reviews.llvm.org/D142772
The file was modifiedflang/test/Evaluate/errors01.f90
The file was modifiedflang/lib/Evaluate/type.cpp
Commit 8583291dfc43f5769291d8e70d84125154e61341 by jhuber6
[libc] Do not install to the default triple in GPU mode

Currently this logic causes the `libcgpu.a` to be installed to the
user's default triple. The GPU target isn't really true to this in a
cross-compiling sense so we should just default to the regular `/lib`
directory

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D142774
The file was modifiedlibc/lib/CMakeLists.txt
Commit feedb4ad7d305c5864127e2b27ae650e8f04fc58 by jhuber6
[libc] Add code for detecting NVIDIA GPUs as well

Recently the `nvptx-arch` tool was added to address the lack of a
similar tool for detecting locally installed NVIDIA GPUs. This patch
adds similar functionality for the already existing `amdgpu-arch` tool
in libc. These will be used to run tests on the user's system in the
future. On a system with both GPUs installed we will just go with the
first GPU detected. In the future we may want to configure the tests to
run on both of them.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D142776
The file was modifiedlibc/cmake/modules/prepare_libc_gpu_build.cmake
Commit 9977b65ae240b2cc0dc512fe488b0063e51a517b by dthorn
[llvm-cov] Fix logic error in debuginfod lookup.

Differential Revision: https://reviews.llvm.org/D136702
The file was modifiedllvm/lib/ProfileData/Coverage/CoverageMapping.cpp
Commit d6fb08abf654b3ef9fdf990b3c11b7dde3fbbacd by Krzysztof.Drewniak
[mlri][ExecutionEngine] Don't globaly set CMake prefixes to find HIP

The HIP CMake files expect to find their own dependencies and don't
use or respect PATHS or HINTS, relying on CMAKE_PREFIX_PATH to contain
/opt/rocm and /opt/rocm/hip . This is not great for the rest of the
build. Therefore, copy the CMake prefix path, add the ROCm
directories, find HIP, and reset the path to its old value.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D142391
The file was modifiedmlir/lib/ExecutionEngine/CMakeLists.txt
Commit 054931dbf11687cb95576690d8f74ffd9b0da007 by tra
[NVPTX] Infer AS of pointers passed to kernels as integers.

When pointers are passed within aggregates, we sometimes end up with IR that
loads them as integers and the converts them back to pointers. Typically it's
due to a memcpy or SROA. E.g. https://godbolt.org/z/xM3n5daaa

Normally we treat all pointers passed to a CUDA kernel as global pointers and
the same treatment should be applied to the pointers we load/store as integers.

Differential Revision: https://reviews.llvm.org/D142664
The file was modifiedllvm/lib/Target/NVPTX/NVPTXLowerArgs.cpp
The file was modifiedllvm/test/CodeGen/NVPTX/lower-args.ll
Commit 54912dd2fbbd2e212099da94bb3aaf1bbae642c3 by pklausler
[flang] Catch obscure error in defined assignment

A subroutine that implements a defined assignment cannot have
a dummy argument for its second operand (the RHS of the assignment)
with the POINTER or ALLOCATABLE attributes, since the RHS of
an assignment is always an expression.  This problem is flagged
as a fatal error in other compilers, so let's make it fatal here
as well.

Differential Revision: https://reviews.llvm.org/D142752
The file was modifiedflang/test/Semantics/resolve65.f90
The file was modifiedflang/lib/Semantics/check-declarations.cpp
Commit 47f0384bb96964e1416a52fc03b184a37fe05588 by davelee.com
[lldb][test] Set minimum compiler_versions

Set compiler_versions on these tests, as they fail if tested on lower compiler
versions versions.

Differential Revision: https://reviews.llvm.org/D142513
The file was modifiedlldb/test/API/commands/expression/import-std-module/vector-dbg-info-content/TestDbgInfoContentVectorFromStdModule.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/ranges/ref_view/TestDataFormatterLibcxxRangesRefView.py
The file was modifiedlldb/test/API/lang/objc/objc_direct-methods/TestObjCDirectMethods.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/deque-dbg-info-content/TestDbgInfoContentDequeFromStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/list-dbg-info-content/TestDbgInfoContentListFromStdModule.py
Commit 6179623628ed52d6fa621ad4be86b83224097423 by pklausler
[flang] Don't apply intrinsic assignment check for PURE subprograms to defined assignment

A semantic constraint on assignments in PURE subprograms (C1594) applies
only to an intrinsic assignment and should not be checked in the case of
a defined assignment.

Differential Revision: https://reviews.llvm.org/D142748
The file was modifiedflang/test/Semantics/assign04.f90
The file was modifiedflang/lib/Semantics/assignment.cpp
Commit f7be1aadf2d040b943b96a9ed52bf654faf33f08 by pklausler
[flang] Prohibit multiple separate module procedure definitions

Ensure that non-BIND(C) separate module procedures are not
defined more than once.

Differential Revision: https://reviews.llvm.org/D142750
The file was modifiedflang/lib/Semantics/scope.cpp
The file was addedflang/test/Semantics/separate-mp04.f90
The file was modifiedflang/lib/Semantics/resolve-names.cpp
The file was modifiedflang/lib/Semantics/check-declarations.cpp
Commit ce6a56e66781eaad11c7285d37c1c410414676de by michaelbuch12
Reland "[lldb] Add support for DW_AT_default_value in template params"

**Summary**

This patch makes LLDB understand the `DW_AT_default_value` on
template argument DIEs. As a result, type summaries will no
longer contain the defaulted template arguments, reducing
noise substantially. E.g.,

Before:
```
(lldb) v nested
(std::vector<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >, std::allocator<std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator <char> > > > > >) nested = size=0 {}
```

After:
```
(lldb) v nested
(std::vector<std::vector<std::basic_string<char> > >) nested = size=0 {}
```

See discussion in https://reviews.llvm.org/D140423

**Testing**

* Adjust API tests
* Added unit-test

Differential Revision: https://reviews.llvm.org/D141828
The file was modifiedlldb/unittests/SymbolFile/DWARF/CMakeLists.txt
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string/TestDataFormatterLibcxxString.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/shared_ptr/TestDataFormatterLibcxxSharedPtr.py
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/unique_ptr/TestDataFormatterLibcxxUniquePtr.py
The file was addedlldb/unittests/SymbolFile/DWARF/Inputs/DW_AT_default_value-test.yaml
The file was modifiedlldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/string_view/TestDataFormatterLibcxxStringView.py
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
The file was modifiedlldb/test/API/commands/expression/import-std-module/retry-with-std-module/TestRetryWithStdModule.py
The file was modifiedlldb/test/API/commands/expression/import-std-module/non-module-type-separation/TestNonModuleTypeSeparation.py
The file was modifiedlldb/unittests/SymbolFile/DWARF/DWARFASTParserClangTests.cpp
Commit 036701a1773320e7a2ea4f9cdba1e90b1a4a17d7 by pklausler
[flang] Correct procedure pointer (or dummy) compatibility check

Fix a subtle bug in procedure compatibility checking with base
derived types vs. their extensions to ensure that a procedure
expecting an extended type cannot be associated with a pointer
(or dummy procedure) to a procedure expecting a base type.

  subroutine s1(base); ... subroutine s2(extended)
  procedure(s1), pointer :: p
  p => s2 ! <- must be caught as an error

Differential Revision: https://reviews.llvm.org/D142753
The file was modifiedflang/test/Semantics/assign09.f90
The file was modifiedflang/lib/Evaluate/characteristics.cpp
The file was addedflang/test/Semantics/assign12.f90
The file was modifiedflang/test/Semantics/call05.f90
The file was modifiedflang/lib/Semantics/expression.cpp
The file was modifiedflang/test/Semantics/global01.f90
The file was modifiedflang/lib/Evaluate/formatting.cpp
The file was modifiedflang/lib/Evaluate/type.cpp
Commit c7f8bc0ee8d391e47286adcf6998a217bcfebd32 by pklausler
[flang][parser] Diagnose an invalid space

In free form, don't silently skip over an invalid space between
an underscore and a kind parameter.

Differential Revision: https://reviews.llvm.org/D142760
The file was addedflang/test/Parser/bad-space.f90
The file was modifiedflang/lib/Parser/Fortran-parsers.cpp
Commit 9bcef91694e2eefeefb4659058a435c12efcaa1c by ajcbik
[mlir][sparse] fixed typo

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D142784
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/SparseTensorStorageLayout.h
Commit f58de2125caf75ec0d40bc3e094a93c0b314a66a by michaelbuch12
[lldb][Test] TestVSCode_completions.py: fix expected type strings

Fixes build failures following https://reviews.llvm.org/D141828
The file was modifiedlldb/test/API/tools/lldb-vscode/completions/TestVSCode_completions.py
Commit 03d136cf5f3f10b618b7e17f897ebf6019518dcc by riddleriver
[mlir] Promote the SubElementInterfaces to a core Attribute/Type construct

This commit restructures the sub element infrastructure to be a core part
of attributes and types, instead of being relegated to an interface. This
establishes sub element walking/replacement as something "always there",
which makes it easier to rely on for correctness/etc (which various bits of
infrastructure want, such as Symbols).

Attribute/Type now have `walk` and `replace` methods directly
accessible, which provide power API for interacting with sub elements. As
part of this, a new AttrTypeWalker class is introduced that supports caching
walked attributes/types, and a friendlier API (see the simplification of symbol
walking in SymbolTable.cpp).

Differential Revision: https://reviews.llvm.org/D142272
The file was removedmlir/lib/IR/SubElementInterfaces.cpp
The file was modifiedmlir/include/mlir/IR/Attributes.h
The file was modifiedmlir/include/mlir/IR/Visitors.h
The file was modifiedmlir/include/mlir/IR/StorageUniquerSupport.h
The file was modifiedmlir/lib/IR/SymbolTable.cpp
The file was modifiedmlir/include/mlir/IR/BuiltinLocationAttributes.td
The file was modifiedmlir/include/mlir/IR/CMakeLists.txt
The file was modifiedmlir/include/mlir/IR/Location.h
The file was modifiedmlir/test/IR/test-symbol-rauw.mlir
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h
The file was addedmlir/include/mlir/IR/AttrTypeSubElements.h
The file was modifiedmlir/unittests/IR/CMakeLists.txt
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMTypes.td
The file was addedmlir/lib/IR/AttrTypeSubElements.cpp
The file was modifiedmlir/include/mlir/IR/BuiltinAttributes.h
The file was modifiedmlir/lib/IR/Types.cpp
The file was modifiedmlir/unittests/IR/InterfaceTest.cpp
The file was modifiedmlir/include/mlir/IR/BuiltinAttributes.td
The file was modifiedmlir/lib/IR/CMakeLists.txt
The file was removedmlir/include/mlir/IR/SubElementInterfaces.h
The file was modifiedmlir/test/lib/Dialect/Test/TestTypes.h
The file was modifiedmlir/lib/IR/AsmPrinter.cpp
The file was modifiedmlir/lib/IR/TypeDetail.h
The file was modifiedmlir/lib/IR/ExtensibleDialect.cpp
The file was modifiedmlir/include/mlir/IR/BuiltinTypes.h
The file was modifiedmlir/include/mlir/IR/Types.h
The file was removedmlir/unittests/IR/SubElementInterfaceTest.cpp
The file was modifiedmlir/include/mlir/IR/BuiltinTypes.td
The file was removedmlir/include/mlir/IR/SubElementInterfaces.td
The file was modifiedmlir/unittests/Dialect/LLVMIR/LLVMTypeTest.cpp
The file was modifiedmlir/include/mlir/IR/AttributeSupport.h
The file was modifiedmlir/unittests/IR/AttributeTest.cpp
The file was modifiedmlir/lib/Dialect/GPU/Transforms/LowerMemorySpaceAttributes.cpp
The file was modifiedmlir/include/mlir/IR/TypeRange.h
The file was modifiedmlir/test/lib/Dialect/Test/TestAttrDefs.td
The file was modifiedmlir/include/mlir/IR/TypeSupport.h
The file was modifiedmlir/lib/IR/Attributes.cpp
Commit 44977a155f24be3cdbcd2a57acbfd6da2529abde by goldstein.w.n
Add tests for binops with conditions/assume constraints

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D140849
The file was addedllvm/test/Transforms/InstCombine/icmp-binop.ll
Commit aa250ceb3ff15d55bb506b4bc8196f143133d8b5 by goldstein.w.n
Add optimizations for icmp eq/ne (mul(X, Y), 0)

1. Add checks if X and/or Y are odd. The Odd values are unnecessary to
   the icmp: isZero(Odd * N) == isZero(N)

2. If neither X nor Y is known odd, then if X * Y cannot overflow AND
   if X and/or Y is non-zero, the non-zero values are unnecessary to the
   icmp.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D140850
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/test/Transforms/InstCombine/icmp-binop.ll
The file was modifiedllvm/test/Transforms/InstCombine/pr38677.ll
Commit 8c884655862ed2e4ca0f00de349387db77294c8b by goldstein.w.n
Add tests for reoredering (shift (add (shift x, C0), y), C1); NFC

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D141874
The file was modifiedllvm/test/Transforms/InstCombine/shift-logic.ll
Commit edd80befeeb92000800ded2a6f3dcdfd672d95ea by goldstein.w.n
Reorder (shl (add/sub (shl x, C0), y), C1) -> (add/sub (shl x, C0 + C1), (shl y, C1))

This is just expanding the existing pattern that exists for AND/XOR/OR
and gets a bit more parallelism in from the instruction sequence.

Alive2:
Add  - https://alive2.llvm.org/ce/z/dSmPkV
Sub1 - https://alive2.llvm.org/ce/z/6rpi5V
Sub2 - https://alive2.llvm.org/ce/z/UfYeUd

Reviewed By: spatel

Differential Revision: https://reviews.llvm.org/D141875
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
The file was modifiedllvm/test/Transforms/InstCombine/shift-logic.ll
Commit 864133c5f95070e273cc6515e52c7a752fbfea30 by ayermolo
[BOLT][DWARF] Add logging for split dwarf

Added logging when bolt is processing binary with split dwarf.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D142576
The file was addedbolt/test/X86/dwarf-test-df-logging.test
The file was modifiedbolt/lib/Core/BinaryContext.cpp
Commit f0c5a4d8546fd49f71c83b8aea0121bb2e639da5 by pklausler
[flang] Fix shared library build

A recent patch introduced a dependency upon Semantics from
Evaluate; fixing immediately.
The file was modifiedflang/lib/Evaluate/type.cpp
Commit 9000a36f5cbd2993cd9c746610f7666ed173991a by Adrian Prantl
Manual DWARF index: don't skip over -gmodules debug info

This fixes a regression introduced by
https://reviews.llvm.org/D131437. The intention of the patch was to
avoid indexing DWO skeleton units, but it also skipped over full DWARF
compile units linked via a -gmodules DW_AT_dwo_name attribute. This
patch restores the functionality and adds a test for it.

Differential Revision: https://reviews.llvm.org/D142683
The file was addedlldb/test/Shell/SymbolFile/DWARF/Inputs/pch.h
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
The file was addedlldb/test/Shell/SymbolFile/DWARF/clang-gmodules-type-lookup.c
Commit f9a01630988716f1b52afe6727f34fe86c07c58a by kstoimenov
[LSAN][HWASAN] Run LSAN tests with HWASAN enabled

A lot of tests are disabled by using UNSUPPORTED. The plan is to remove UNSUPPORTED for tests that are fixed.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D142676
The file was modifiedcompiler-rt/test/lsan/TestCases/many_tls_keys_pthread.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/use_after_return.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/use_globals_uninitialized.cpp
The file was modifiedcompiler-rt/test/lsan/CMakeLists.txt
The file was modifiedcompiler-rt/test/lsan/lit.common.cfg.py
The file was modifiedcompiler-rt/test/lsan/TestCases/use_stacks.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/cleanup_in_tsd_destructor.c
The file was modifiedcompiler-rt/test/lsan/TestCases/use_registers.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/high_allocator_contention.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/pointer_to_self.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/use_globals_initialized.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/log-path_test.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/leak_check_at_exit.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/default_options.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/malloc_zero.c
The file was modifiedcompiler-rt/test/lsan/TestCases/use_registers_extra.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/use_tls_static.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/do_leak_check_override.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/disabler.c
The file was modifiedcompiler-rt/test/lsan/TestCases/suppressions_default.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/many_tls_keys_thread.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/ignore_object.c
The file was modifiedcompiler-rt/test/lsan/TestCases/swapcontext.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/register_root_region.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/fork_threaded.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/guard-page.c
The file was modifiedcompiler-rt/test/lsan/TestCases/use_stacks_threaded.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/libdl_deadlock.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/use_unaligned.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_static.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/recoverable_leak_check.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/link_turned_off.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/suppressions_file.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/disabler_in_tsd_destructor.c
The file was modifiedcompiler-rt/test/lsan/TestCases/Linux/use_tls_pthread_specific_dynamic.cpp
The file was modifiedcompiler-rt/test/lsan/TestCases/realloc_too_big.c
Commit abf44b5b1dbff845a59a7be0c57553cbfd6c4f4c by arsenm2
llvm-reduce: Use consistent type for reducer function
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceAliases.cpp
Commit 4c7f500bd202dc8ed0a4229022571305b6edf734 by arsenm2
llvm-reduce: Use ThreadPool feature to wait for tasks to complete

Don't use the hackier barrier I wrote using the task queue.
The file was modifiedllvm/tools/llvm-reduce/deltas/Delta.cpp
Commit c0a10b2772ec2ebaeffe00bf46fdb5e7f20e7529 by arsenm2
llvm-reduce: Use WithColor in another place

Use more consistently capitalized/colorized/punctuated error messages.
The file was modifiedllvm/tools/llvm-reduce/ReducerWorkItem.cpp
Commit c5fa6b1610a3a665c22f70314ed65e7230091028 by arsenm2
llvm-reduce: Parse file from the opened buffer instead of the file

If this wasn't bitcode this was opening a second MemoryBuffer.
The file was modifiedllvm/tools/llvm-reduce/ReducerWorkItem.cpp
Commit 1ce3afd97784b7e638c6a562451dc008a6bc3907 by craig.topper
[ValueTracking] Teach computeKnownBits about riscv.vsetvli.opt and riscv.vsetvlimax.opt intrinsics.

These are like the intrinsic without opt, but don't have side effects.

Add missing test cases for riscv.vsetvlimax.
The file was modifiedllvm/test/Transforms/InstCombine/RISCV/riscv-vsetvli-knownbits.ll
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 4ea6d42b632d166e6ee2f38f6758ed71515a7f7a by craig.topper
[RISCV] Teach computeKnownBits that vsetvli returns <= 65536.

Resolves a FIXME. We could do even better taking into account SEW/LMUL.
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsetvl-ext.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/Transforms/InstCombine/RISCV/riscv-vsetvli-knownbits.ll
Commit e7e3d723a592d3f626e5371788655851672aa204 by goldstein.w.n
Revert "Add optimizations for icmp eq/ne (mul(X, Y), 0)"

This reverts commit aa250ceb3ff15d55bb506b4bc8196f143133d8b5.

Caused test failures in Clangd: https://lab.llvm.org/buildbot/#/builders/183/builds/10447
reverting while investigating.
The file was modifiedllvm/test/Transforms/InstCombine/pr38677.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
The file was modifiedllvm/test/Transforms/InstCombine/icmp-binop.ll
Commit 423bcf89f13f1dc8967f7643908679d03a79eed8 by goldstein.w.n
Revert "Reorder (shl (add/sub (shl x, C0), y), C1) -> (add/sub (shl x, C0 + C1), (shl y, C1))"

This reverts commit edd80befeeb92000800ded2a6f3dcdfd672d95ea.

Caused test failures in Clangd: https://lab.llvm.org/buildbot/#/builders/183/builds/10447
reverting while investigating.
The file was modifiedllvm/test/Transforms/InstCombine/shift-logic.ll
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
Commit b4b9786f4ac4cb2d9b6e7c3ce221b06d21d6ab06 by kstoimenov
[LSAN] Disable leak_check_before_thread_started for hwasan
The file was modifiedcompiler-rt/test/lsan/TestCases/leak_check_before_thread_started.cpp
Commit aad5984b56280d7dc71a43c258c5ed349c9a239f by pklausler
[flang] Portability warnings for an ambiguous ASSOCIATED() case

The standard's specification for the ASSOCIATED() intrinsic function
describes its optional second argument (TARGET=) as being required
to be a valid target for a pointer assignment statement in which the
first argument (POINTER=) was the left-hand side.  Some Fortran compilers
apparently interpret this text as a requirement that the POINTER= argument
actually be a valid left-hand side to a pointer assignment statement,
and emit an error if it is not so.  This particularly affects the
use of an explicit NULL pointer as the first argument.

Such usage is well-defined, benign, useful, and supported by at least
two other compilers, so we should continue to accept it.  This patch
adds a portability warning and some documentation.

In order to implement the portability warning in the best way, the
special checks on calls to the ASSOCIATED() intrinsic function have
been moved from intrinsic processing to Semantics/check-calls.cpp,
whence they have access to semantics' toolchest.  Special checks for
other intrinsic functions might also migrate in the future in order
to keep them all in one place.

Differential Revision: https://reviews.llvm.org/D142768
The file was modifiedflang/test/Evaluate/folding06.f90
The file was modifiedflang/lib/Evaluate/intrinsics.cpp
The file was modifiedflang/lib/Evaluate/tools.cpp
The file was modifiedflang/lib/Semantics/check-call.cpp
The file was modifiedflang/lib/Semantics/definable.cpp
The file was modifiedflang/test/Semantics/associated.f90
The file was modifiedflang/docs/Extensions.md
The file was modifiedflang/lib/Semantics/check-call.h
The file was modifiedflang/lib/Semantics/expression.cpp
The file was modifiedflang/include/flang/Evaluate/tools.h