Changes

Summary

  1. [lldb] Fix nondeterminism in DWARFIndexCachingTest (details)
  2. [LV][SLP] Mark fptosi_sat as vectorizable (details)
  3. [NFC] Minimal refactor of TTI to avoid clangsa complaint (details)
  4. [DebugInfo][InstrRef] Don't generate redundant DBG_PHIs (details)
  5. [mlir][MemRef] Return `0` for the canonical strided layout expr of a 0d memref (details)
  6. [clang-format] Add a regression test for aligning macros with keywords. (details)
  7. [LoopVectorize] Support reductions that store intermediary result (details)
  8. [Analyzer] Fix assumptions about const field with member-initializer (details)
  9. sanitizer: support GCC's fallthrough attribute (details)
  10. In MSVC compatibility mode, friend function declarations behave as function declarations (details)
  11. [mlir] improve and test TransformState::Extension (details)
  12. [ValueTracking] A and (B & ~A) have no common bits set (details)
  13. sanitizer: use pragma clang conditionally (details)
  14. [AArch64][SVE] Only fold frame indexes referencing SVE objects into SVE loads/stores (details)
  15. [SLP][X86] Add test case for Issue #48223 (details)
  16. [lldb] Fix ppc64 detection in lldb (details)
  17. [SDAG] Extract commutative helper from haveNoCommonBitsSet() (NFC) (details)
  18. tsan: fix deadlock in libbacktrace (details)
  19. [Windows] Fix cmd line tokenization of unclosed quotes. (details)
  20. [Windows] Fix handling of \" in program name on cmd line. (details)
  21. Fix Clang sphinx build (details)
  22. [ARM] Only update the successor edges for immediate predecessors of PrologueMBB (details)
  23. sanitizer: Fix fallthrough detection. (details)
  24. [analyzer] Check for std::__addressof for inner pointer checker (details)
  25. AMDGPU/GISel: Update some MIR tests to reduce future churn (details)
  26. [Linalg] Remove Optional from getStaticLoopRanges interface method. (details)
  27. [pseudo] Simplify the forest dump, NFC. (details)
  28. [Doc] Refine description of llvm.is_fpclass (details)
  29. AMDGPU: Remove redundant call to MachineInstrBuilder::setMBB (details)
  30. [clang][AArch64][SVE] Implement conditional operator for SVE vectors (details)
  31. Revert "[lldb] Fix ppc64 detection in lldb" (details)
  32. [lldb][NFC] Add more tests for GenerateOptionsUsage (details)
  33. [pseudo] Implement the GLR parsing algorithm. (details)
  34. [demangler] Fold expressions of .* and ->* (details)
  35. [SDAG] Handle A and B&~A in haveNoCommonBitsSet() (details)
  36. [gn build] Port eac22d0754f7 (details)
  37. Revert "[pseudo] Implement the GLR parsing algorithm." (details)
  38. [gn build] Port 860eabb3953a (details)
  39. Fix a typo in an OpenMP test (details)
  40. Add explicit OpenMP 5.0 case for version macros; NFC (details)
  41. [bazel] Add test targets for dataflow framework (details)
  42. [X86] const-shift-of-constmasked.ll - replace X32 check prefix with X86 (details)
  43. [X86] load-local-v3i129.ll - add checks for targets with fast/slow shld funnel shift ops (details)
  44. [lldb][NFC] Simplify part of Options::GenerateOptionUsage (details)
  45. [AArch64] Support for Ampere1 core (details)
  46. [PowerPC] Regenerate urem-seteq-illegal-types.ll (details)
  47. [X86] Add additional add of and not tests (NFC) (details)
  48. [AArch64] Add native CPU detection for Ampere1 (details)
  49. [BOLT] [NFC] Remove unused variable (details)
  50. [lldb][NFC] Refactor printing of short options in help (details)
  51. [NFC][GVNSink] Don't pretend that iteration is over instructions when it's actually over blocks (details)
  52. [X86] Autogen a few tests for ease of update [nfc] (details)
  53. [Clang][OpenMP] Add the support for floating-point variables for specific atomic clauses (details)
  54. [SCEV] Regenerate test checks (NFC) (details)
  55. [ELF] Fix branch range computation when picking ThunkSection (details)
  56. [X86] Add test showing failure to modulo the rotation amounts before merging an inner rotation (details)
  57. [RFC] Add and sort decl to maintain order instead of inserting in order (details)
  58. [DAG] Fix issue with rot(rot(x,c1),c2) -> rot(x,c1+c2) fold with unnormalized rotation amounts (details)
  59. [mlir][LLVMIR] Add support for translating Switch instruction (details)
  60. [llvm-ar] Modify usage printouts to use the correct toolname (details)
  61. [libc] fix strtold tests on 32 bit systems (details)
  62. [libc] add printf writer (details)
  63. BuildLibCalls: simplify switch statement slightly (details)
  64. tsan: for unittests, change to use test fixtures to clear racy stacks (details)
  65. [mlir] Add sin & cos ops to complex dialect (details)
  66. [lldb] Add setting for max depth of value object printing (NFC) (details)
  67. [randstruct] Move initializer check to be more effective (details)
  68. [pseudo] Implement the GLR parsing algorithm. (details)
  69. [gn build] Port 9f38da258ea7 (details)
  70. [clang-format][NFC] Clean up tryToParseLambdaIntroducer() (details)
  71. Minor correction in bitreverse intrinsic semantics (details)
  72. Fix some places where PseudoObjectExpr handling assumed that a (details)
  73. ExtractAPI: Use %clang_cc1 and -verify in enum.c (details)
  74. [BOLT][TEST] Fix test failures on AArch64 builder (details)
  75. Revert "[BOLT][TEST] Fix test failures on AArch64 builder" (details)
  76. [OpenMP] Possible fix for sporadic test failure from loop_dispatch.c (details)
  77. [pseudo] Print the GSS::Node details when the unittest fails, NFC. (details)
  78. [clang][OpenMP] Local variable alignment incorrect with align clause (details)
  79. [InstCombine] add tests for min/max with shuffled operands; NFC (details)
  80. [InstCombine] move shuffle after min/max with same-shuffled operands (details)
  81. [pseudo] Use a real language option in the parser. (details)
  82. [mlir][sparse] Add lowering for unary and binary ops (details)
  83. [riscv] Add debug printing support for VSETVLIInfo class [nfc] (details)
  84. [bazel] Fix the build after 2c3326608460 (details)
  85. [mlir] Fix Visual Studio warnings (details)
  86. [SCEV] Removed an unnecessary assertion (details)
  87. [mlir][sparse] add missing types to from/to-MLIR conversion routines (details)
  88. Fix a buildbot warning [nfc] (details)
  89. Fix DXBC magic parsing (details)
  90. Fix zero-width bitfield extracts to emit 0 (details)
  91. [mlir][sparse] fix build issue with unused local under opt builds (details)
  92. [lldb] Session transcript should use the async debugger streams (details)
  93. [lldb] Add a function to check if lldb is running in an interactive session (details)
  94. Implement support for __llvm_addrsig for MachO in llvm-mc (details)
  95. [BOLT][TEST] Fix test failures on AArch64 builder (details)
  96. llvm-reduce: Reduce includes (details)
  97. AMDGPU: Regenerate test checks (details)
  98. AMDGPU: Remove some invalid kill flags in tests (details)
  99. ARM: Cleanup MIR test (details)
  100. ARM: Fix using undefined virtual registers in test (details)
  101. [trace][intelpt] Fix out-of-bounds access. (details)
  102. [psuedo] Fix for unused warning by moving code into debug macro. (details)
  103. [riscv] Add a couple more vsetvli tests (details)
Commit 51e72570d7e163d03ff211b7127899a1efd08174 by pavel
[lldb] Fix nondeterminism in DWARFIndexCachingTest

The entries in the input map need to be sorted as well, as there's no
guarantee that the entries (ConstStrings) will be inserted in the proper
order.
The file was modifiedlldb/unittests/SymbolFile/DWARF/DWARFIndexCachingTest.cpp
Commit 6f81903e891cdc19d856d19efcc45a0d19f3ff8d by david.green
[LV][SLP] Mark fptosi_sat as vectorizable

This adds fptosi_sat and fptoui_sat to the list of trivially
vectorizable functions, mainly so that the loop vectorizer can vectorize
the instruction. Marking them as trivially vectorizable also allows them
to be SLP vectorized, and Scalarized.

The signature of a fptosi_sat requires two type overrides
(@llvm.fptosi.sat.v2i32.v2f32), unlike other intrinsics that often only
take a single. This patch alters hasVectorInstrinsicOverloadedScalarOpd
to isVectorIntrinsicWithOverloadTypeAtArg, so that it can mark the first
operand of the intrinsic as a overloaded (but not scalar) operand.

Differential Revision: https://reviews.llvm.org/D124358
The file was modifiedllvm/include/llvm/Analysis/VectorUtils.h
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/fpsat.ll
The file was modifiedllvm/test/Transforms/Scalarizer/intrinsics.ll
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/fpsat.ll
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/lib/Transforms/Scalar/Scalarizer.cpp
The file was modifiedllvm/lib/Analysis/VectorUtils.cpp
The file was modifiedllvm/lib/Analysis/ConstantFolding.cpp
The file was modifiedllvm/lib/CodeGen/ReplaceWithVeclib.cpp
Commit dd8cf372c54fdb654d1a7e7578460eb95e6531f9 by markus.lavin
[NFC] Minimal refactor of TTI to avoid clangsa complaint

Differential Revision: https://reviews.llvm.org/D124754
The file was modifiedllvm/include/llvm/Analysis/TargetTransformInfoImpl.h
Commit 1d712c381819498940ee592b670a81eb0f762f7d by jeremy.morse
[DebugInfo][InstrRef] Don't generate redundant DBG_PHIs

In SelectionDAG, DBG_PHI instructions are created to "read" physreg values
and give them an instruction number, when they can't be traced back to a
defining instruction. The most common scenario if arguments to a function.
Unfortunately, if you have 100 inlined methods, each of which has the same
"this" pointer, then the 100 dbg.value instructions become 100
DBG_INSTR_REFs plus 100 DBG_PHIs, where only one DBG_PHI would suffice.

This patch adds a vreg cache for MachienFunction::salvageCopySSA, if we've
already traced a value back to the start of a block and created a DBG_PHI
then it allows us to re-use the DBG_PHI, as well as reducing work.

Differential Revision: https://reviews.llvm.org/D124517
The file was modifiedllvm/include/llvm/CodeGen/MachineFunction.h
The file was modifiedllvm/test/DebugInfo/X86/dbg-value-funcarg.ll
The file was addedllvm/test/DebugInfo/X86/dbg-value-funcarg4.ll
The file was modifiedllvm/lib/CodeGen/MachineFunction.cpp
The file was modifiedllvm/test/DebugInfo/X86/instr-ref-selectiondag.ll
Commit dccb73318a184752491fc1145c4ae01b828bdc3a by benny.kra
[mlir][MemRef] Return `0` for the canonical strided layout expr of a 0d memref

There can't be any strides, and the offset for the canonical expr is
always 0. Fixes #55229.

Differential Revision: https://reviews.llvm.org/D124795
The file was modifiedmlir/lib/IR/BuiltinTypes.cpp
The file was modifiedmlir/test/Conversion/MemRefToLLVM/memref-to-llvm.mlir
Commit c819dce2d304817ae7f47628067092f4353a148e by marek.kurdej+llvm.org
[clang-format] Add a regression test for aligning macros with keywords.

Test from issue https://github.com/llvm/llvm-project/issues/54953.
The file was modifiedclang/unittests/Format/FormatTest.cpp
Commit 4e5e042d9a4a842c6744d91ef1359403dee2edbb by Igor.Kirillov
[LoopVectorize] Support reductions that store intermediary result

Adds ability to vectorize loops containing a store to a loop-invariant
address as part of a reduction that isn't converted to SSA form due to
lack of aliasing info. Runtime checks are generated to ensure the store
does not alias any other accesses in the loop.

Ordered fadd reductions are not yet supported.

Differential Revision: https://reviews.llvm.org/D110235
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/VPlan.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/AArch64/scalable-reductions.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/vplan-printing.ll
The file was modifiedllvm/lib/Analysis/IVDescriptors.cpp
The file was modifiedllvm/lib/Analysis/LoopAccessAnalysis.cpp
The file was modifiedllvm/lib/Transforms/Vectorize/LoopVectorize.cpp
The file was modifiedllvm/include/llvm/Analysis/IVDescriptors.h
The file was modifiedllvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
The file was modifiedllvm/include/llvm/Analysis/LoopAccessAnalysis.h
The file was modifiedllvm/test/Transforms/LoopVectorize/reduction-with-invariant-store.ll
Commit 68ee5ec07d4a169baf287acad9ad7fa85d764a22 by marco.antognini
[Analyzer] Fix assumptions about const field with member-initializer

Essentially, having a default member initializer for a constant member
does not necessarily imply the member will have the given default value.

Remove part of a2e053638bbf ([analyzer] Treat more const variables and
fields as known contants., 2018-05-04).

Fix #47878

Reviewed By: r.stahl, steakhal

Differential Revision: https://reviews.llvm.org/D124621
The file was modifiedclang/lib/StaticAnalyzer/Core/RegionStore.cpp
The file was addedclang/test/Analysis/cxx-member-initializer-const-field.cpp
Commit bc8e6012577bab2e94babec965f1ad10172432ec by mliska
sanitizer: support GCC's fallthrough attribute

Fixes:
sanitizer_stack_store.cpp:257:13: warning: this statement may fall through [-Wimplicit-fallthrough=]

when being built with GCC.

Differential Revision: https://reviews.llvm.org/D124832
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
Commit ad47114ad8500c78046161d492ac13a8e3e610eb by marco.antognini
In MSVC compatibility mode, friend function declarations behave as function declarations

Before C++20, MSVC treated any friend function declaration as a function declaration, so the following code would compile despite funGlob being declared after its first call:

```
class Glob {
public:
  friend void funGlob();

  void test() {
    funGlob();
  }
};

void funGlob() {}
```
This proposed patch mimics the MSVC behavior when in MSVC compatibility mode

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D124613
The file was modifiedclang/unittests/AST/ASTImporterTest.cpp
The file was addedclang/test/SemaCXX/ms-friend-function-decl.cpp
The file was modifiedclang/lib/Sema/SemaDecl.cpp
Commit 6c57b0debedaa5f211a39a8d6765ad4c74db4059 by zinenko
[mlir] improve and test TransformState::Extension

Add the mechanism for TransformState extensions to update the mapping between
Transform IR values and Payload IR operations held by the state. The mechanism
is intentionally restrictive, similarly to how results of the transform op are
handled.

Introduce test ops that exercise a simple extension that maintains information
across the application of multiple transform ops.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D124778
The file was modifiedmlir/test/lib/Dialect/Transform/TestTransformDialectExtension.td
The file was modifiedmlir/test/lib/Dialect/Transform/TestTransformDialectExtension.cpp
The file was addedmlir/test/Dialect/Transform/transform-state-extension.mlir
The file was modifiedmlir/include/mlir/Dialect/Transform/IR/TransformInterfaces.h
The file was modifiedmlir/lib/Dialect/Transform/IR/TransformInterfaces.cpp
The file was addedmlir/test/lib/Dialect/Transform/TestTransformStateExtension.h
Commit 47255834e720b735ff1358a74fdf32345bb4daca by npopov
[ValueTracking] A and (B & ~A) have no common bits set

This extends haveNoCommonBitsSet() to two additional cases, allowing
the following folds:

* `A + (B & ~A)` --> `A | (B & ~A)`
    (https://alive2.llvm.org/ce/z/crxxhN)
* `A + ((A & B) ^ B)` --> `A | ((A & B) ^ B)`
    (https://alive2.llvm.org/ce/z/A_wsH_)

These should further fold to just `A | B`, though this currently
only works in the first case.

The reason why the second fold is necessary is that we consider
this to be the canonical form if B is a constant. (I did check
whether we can change that, but it looks like a number of folds
depend on the current canonicalization, so I ended up adding both
patterns here.)

Differential Revision: https://reviews.llvm.org/D124763
The file was modifiedllvm/test/Transforms/InstCombine/add.ll
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit f496a0eba4f7983257069b0bb2c2fb4463106b49 by mliska
sanitizer: use pragma clang conditionally

Use the pragma only when __clang__ is defined.

Fixes:
sanitizer_common_libcdep.cpp:101: warning: ignoring ‘#pragma clang diagnostic’ [-Wunknown-pragmas]

Differential Revision: https://reviews.llvm.org/D124829
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_common_libcdep.cpp
Commit 96bbd359edbf8582fc2d29b57d7e65e54e98709b by bradley.smith
[AArch64][SVE] Only fold frame indexes referencing SVE objects into SVE loads/stores

Currently we always fold frame indexes into SVE load/store instructions,
however these instructions can only encode VL scaled offests. This means
that when we are accessing a fixed length stack object with these
instructions, the folded in frame index gets pulled back out during frame
lowering. This can cause issues when we have no spare registers and no
emergency spill slot.

Rather than causing issues like this, don't fold in frame indexes that
reference fixed length objects.

Fixes: #55041

Differential Revision: https://reviews.llvm.org/D124457
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
The file was addedllvm/test/CodeGen/AArch64/sve-fixed-length-frame-offests-crash.ll
The file was addedllvm/test/CodeGen/AArch64/sve-fixed-length-frame-offests.ll
Commit 74634f4b9807d51b9e723b1ced0c18954893bc6c by llvm-dev
[SLP][X86] Add test case for Issue #48223
The file was addedllvm/test/Transforms/SLPVectorizer/X86/pr48879-sroa.ll
Commit f114f009486816ed4b3bf984f0fbbb8fc80914f6 by sguelton
[lldb] Fix ppc64 detection in lldb

Currently, ppc64le and ppc64 (defaulting to big endian) have the same
descriptor, thus the linear scan always return ppc64le. Handle that through
subtype.

Differential Revision: https://reviews.llvm.org/D124760
The file was modifiedlldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
The file was modifiedlldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
The file was addedlldb/test/API/functionalities/postmortem/elf-core/linux-ppc64.core
The file was modifiedlldb/source/Utility/ArchSpec.cpp
The file was addedlldb/test/API/functionalities/postmortem/elf-core/linux-ppc64.out
Commit e0892614b162f5f53aa44c88080d986649a50982 by npopov
[SDAG] Extract commutative helper from haveNoCommonBitsSet() (NFC)

To make it easier to add additional patterns, which will generally
want to handle commuted top-level operands.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Commit 0a1bcab9f3bf75c4c5d3e53bafb3eeb80320af46 by mliska
tsan: fix deadlock in libbacktrace

Fixes deadlock seen in GCC.

Fixes: #55226

Differential Revision: https://reviews.llvm.org/D124838
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
Commit 1be024ee450f2d3cb07086f6141d50f291c1910b by simon.tatham
[Windows] Fix cmd line tokenization of unclosed quotes.

When cl::TokenizeWindowsCommandLine received a command line with an
unterminated double-quoted string at the end, it would discard the
text within that string. That doesn't match the behavior of the
standard Windows C library, which will return the text in the unclosed
quoted string as an argv word.

Fixed, and added extra unit tests in that area.

In some cases (specifically the one in Bugzilla #47579) this could
cause TokenizeWindowsCommandLine to return a zero-length list of
arguments, leading to an array overrun at the call site in
windows::GetCommandLineArguments. Added a check there, for extra
safety: now windows::GetCommandLineArguments will return an error code
instead of failing an assertion.

(This change was written as part of https://reviews.llvm.org/D122914,
but split into a separate commit at the last minute at the code
reviewer's suggestion, because it's fixing an unrelated bug in the
same area. The rest of D122914 will follow in the next commit.)
The file was modifiedllvm/unittests/Support/CommandLineTest.cpp
The file was modifiedllvm/lib/Support/Windows/Process.inc
The file was modifiedllvm/lib/Support/CommandLine.cpp
Commit 32814df442690d4673759296d850804773a7ea5b by simon.tatham
[Windows] Fix handling of \" in program name on cmd line.

Bugzilla #47579: if you invoke clang on Windows via a pathname in
which a quoted section closes just after a backslash, e.g.

  "C:\Program Files\Whatever\"clang.exe

then cmd.exe and CreateProcess will correctly find the binary, because
when they parse the program name at the start of the command line,
they don't regard the \ before the " as having any kind of escaping
effect. This is different from the behaviour of the Windows standard C
library when it parses the rest of the command line, which would
consider that \" not to close the quoted string.

But this confuses windows::GetCommandLineArguments, because the
Windows API function GetCommandLineW() will return a command line
containing that \" sequence, and cl::TokenizeWindowsCommandLine will
tokenize the whole string according to the C library's rules. So it
will misidentify where the program name stops and the arguments start.

To fix this, I've introduced a new variant function
cl::TokenizeWindowsCommandLineFull(), intended to be applied to the
string returned from GetCommandLineW(). It parses the first word of
the command line according to CreateProcess's rules, considering \ to
never be an escaping character; thereafter, it switches over to the C
library rules for the rest of the command line.

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D122914
The file was modifiedllvm/unittests/Support/CommandLineTest.cpp
The file was modifiedllvm/lib/Support/CommandLine.cpp
The file was modifiedllvm/include/llvm/Support/CommandLine.h
The file was modifiedllvm/lib/Support/Windows/Process.inc
Commit 1fc208d40012103f81279ab85949a91f8188e7a1 by aaron
Fix Clang sphinx build

It seems we don't have this option exposed via RST, so switching to use
generic backticks instead.
The file was modifiedclang/docs/UsersManual.rst
Commit bd606afe26f258d081fbe025b20a71b277c1edde by john.brawn
[ARM] Only update the successor edges for immediate predecessors of PrologueMBB

When adjusting the function prologue for segmented stacks, only update
the successor edges of the immediate predecessors of the original
prologue.

Differential Revision: https://reviews.llvm.org/D122959
The file was modifiedllvm/test/CodeGen/Thumb2/segmented-stacks.ll
The file was modifiedllvm/test/CodeGen/Thumb/segmented-stacks.ll
The file was modifiedllvm/test/CodeGen/ARM/segmented-stacks.ll
The file was modifiedllvm/lib/Target/ARM/ARMFrameLowering.cpp
Commit 903b8845fb5a0a366266d6f28231f994a5721178 by mliska
sanitizer: Fix fallthrough detection.

First check for clang::fallthrough attribute that resolves:

sanitizer_stack_store.cpp:258:7: error: use of the 'fallthrough'
attribute is a C++17 extension [-Werror,-Wc++17-attribute-extensions]
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
Commit cf7cd664f3fd212c0f1e4a83fd2fe96902569d20 by balazs.benics
[analyzer] Check for std::__addressof for inner pointer checker

This is an extension to diff D99260. This adds an additional exception
for `std::__addressof` in `InnerPointerChecker`.

Patch By alishuja (Ali Shuja Siddiqui)!

Reviewed By: martong, alishuja

Differential Revision: https://reviews.llvm.org/D109467
The file was modifiedclang/lib/StaticAnalyzer/Checkers/InnerPointerChecker.cpp
The file was modifiedclang/test/Analysis/inner-pointer.cpp
Commit cdc5b64ed6dbdc5b5b97e85df3878654e2b0244e by nicolai.haehnle
AMDGPU/GISel: Update some MIR tests to reduce future churn

The default output format of the update_mir_test_checks.py script has
changed since some of these tests were generated.

Also, an upcoming commit will introduce differences between GFX9 and
GFX10 in the legalization of G_MUL.
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-udiv.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-srem.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-mul.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-sdiv.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-umulo.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/legalize-urem.mir
Commit 919e459f1ba3bd3f93b50cac1077d685547250e5 by hanchung
[Linalg] Remove Optional from getStaticLoopRanges interface method.

It is very wrong if the ranges can't be infered. It's also checked in
verifyStructuredOpInterface, so we don't need the Optional return type.

Reviewed By: springerm

Differential Revision: https://reviews.llvm.org/D124596
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ElementwiseOpFusion.cpp
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgInterfaces.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/SplitReduction.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgInterfaces.td
Commit b18abde8ada122408724d2a1722aa2f75e9a87ce by hokein.wu
[pseudo] Simplify the forest dump, NFC.

The code was written to handle nullable grammar, and we disallow
nullable grammar, so it is not necessary to keep it around.

Differential Revision: https://reviews.llvm.org/D124827
The file was modifiedclang-tools-extra/pseudo/lib/Forest.cpp
Commit d9b5544e0f99656ac18e39daf31fa8231ea0d9ef by sepavloff
[Doc] Refine description of llvm.is_fpclass
The file was modifiedllvm/docs/LangRef.rst
Commit 8b42e6d057edd3b0cecb47161d10ceea4c49616a by nicolai.haehnle
AMDGPU: Remove redundant call to MachineInstrBuilder::setMBB

setInstrAndDebugLoc also sets the basic block automatically.

Differential Revision: https://reviews.llvm.org/D124809
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
Commit 8bc29d14273b05b05d5a56e34c07948dc2c770d3 by david.truby
[clang][AArch64][SVE] Implement conditional operator for SVE vectors

This patch adds support for the conditional (ternary) operator on SVE
scalable vector types in C++, matching the behaviour for NEON vector
types. Like the conditional operator for NEON types, this is disabled in
C mode.

Differential Revision: https://reviews.llvm.org/D124091
The file was addedclang/test/CodeGenCXX/aarch64-sve-vector-conditional-op.cpp
The file was modifiedclang/lib/Sema/SemaExprCXX.cpp
The file was modifiedclang/include/clang/Sema/Sema.h
The file was addedclang/test/SemaCXX/aarch64-sve-vector-conditional-op.cpp
The file was modifiedclang/lib/CodeGen/CGExprScalar.cpp
Commit 7667d805948e8049420b01c92f84c56528b42567 by david.spickett
Revert "[lldb] Fix ppc64 detection in lldb"

This reverts commit f114f009486816ed4b3bf984f0fbbb8fc80914f6.

Due to hitting an assert on our lldb bots:
https://lab.llvm.org/buildbot/#/builders/96/builds/22715

../llvm-project/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp:170:
virtual lldb::RegisterContextSP ThreadElfCore::CreateRegisterContextForFrame(
lldb_private::StackFrame *): Assertion `false && "Architecture or OS not supported"' failed.
The file was removedlldb/test/API/functionalities/postmortem/elf-core/linux-ppc64.out
The file was modifiedlldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
The file was removedlldb/test/API/functionalities/postmortem/elf-core/linux-ppc64.core
The file was modifiedlldb/source/Utility/ArchSpec.cpp
The file was modifiedlldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
Commit ca0b41665978d5efd8482188a0541342cb298031 by david.spickett
[lldb][NFC] Add more tests for GenerateOptionsUsage

This adds a few targeted tests to make sure that when refactoring
this function later I don't break these properties.

Some are tested in passing elsewhere but this makes it more
obvious what went wrong when it fails.

This doesn't cover everything the function does, I couldn't
find any examples that would exercise some of the code.

Reviewed By: jingham

Differential Revision: https://reviews.llvm.org/D123500
The file was modifiedlldb/test/API/commands/help/TestHelp.py
Commit eac22d0754f70df10ea0eb6f59cbd1ef012ab5a4 by hokein.wu
[pseudo] Implement the GLR parsing algorithm.

This patch implements a standard GLR parsing algorithm, the
core piece of the pseudoparser.

- it parses preprocessed C++ code, currently it supports correct code
  only and parse them as a translation-unit;
- it produces a forest which stores all possible trees in an efficient
  manner (only a single node being build for per (SymbolID, Token Range));
  no disambiguation yet;

Differential Revision: https://reviews.llvm.org/D121150
The file was modifiedclang-tools-extra/pseudo/tool/ClangPseudo.cpp
The file was addedclang-tools-extra/pseudo/include/clang-pseudo/GLR.h
The file was addedclang-tools-extra/pseudo/test/glr.cpp
The file was modifiedclang-tools-extra/pseudo/unittests/CMakeLists.txt
The file was modifiedclang-tools-extra/pseudo/lib/CMakeLists.txt
The file was modifiedclang-tools-extra/pseudo/include/clang-pseudo/Forest.h
The file was addedclang-tools-extra/pseudo/lib/GLR.cpp
The file was addedclang-tools-extra/pseudo/unittests/GLRTest.cpp
Commit ed2d4da732006d76e2f7b4315a2056b2d7b2f15c by nathan
[demangler] Fold expressions of .* and ->*

(Exitingly) a fold expression's operators include .* and ->*, but we
failed to demangle them as we categorize those as MemberExprs, not
BinaryExprs.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D123305
The file was modifiedlibcxxabi/src/demangle/ItaniumDemangle.h
The file was modifiedllvm/include/llvm/Demangle/ItaniumDemangle.h
The file was modifiedlibcxxabi/test/test_demangle.pass.cpp
Commit 2171a896ed0059e3576fd9c36d0021a3de11d31a by npopov
[SDAG] Handle A and B&~A in haveNoCommonBitsSet()

This is the DAG variant of D124763. The code already handles the
general pattern, but not this degenerate case.

This allows folding A + (B&~A) to A | (B&~A) which further holds
to A | B.

Handling on the SDAG level is needed because in the motivating
case the add is actually a getelementptr, which only gets converted
into an add on the SDAG level. However, this patch is not quite
sufficient to handle the getelementptr case yet, because of an
interfering demanded bits simplification.

Differential Revision: https://reviews.llvm.org/D124772
The file was modifiedllvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
The file was modifiedllvm/test/CodeGen/X86/add-and-not.ll
Commit 5a64bc4d3e1f746d148411e4db3067587046c4c1 by llvmgnsyncbot
[gn build] Port eac22d0754f7
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/pseudo/unittests/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/pseudo/lib/BUILD.gn
Commit 860eabb3953a104b2b85398c705cd32e33d86689 by hokein.wu
Revert "[pseudo] Implement the GLR parsing algorithm."

This breaks some buildbots (on the declaration GSS& GSS), will fix it
later.

This reverts commit eac22d0754f70df10ea0eb6f59cbd1ef012ab5a4.
The file was removedclang-tools-extra/pseudo/include/clang-pseudo/GLR.h
The file was removedclang-tools-extra/pseudo/lib/GLR.cpp
The file was removedclang-tools-extra/pseudo/unittests/GLRTest.cpp
The file was modifiedclang-tools-extra/pseudo/include/clang-pseudo/Forest.h
The file was modifiedclang-tools-extra/pseudo/lib/CMakeLists.txt
The file was modifiedclang-tools-extra/pseudo/tool/ClangPseudo.cpp
The file was removedclang-tools-extra/pseudo/test/glr.cpp
The file was modifiedclang-tools-extra/pseudo/unittests/CMakeLists.txt
Commit 3e8aca5324e7b7d5a8ceefea1a1e27531fad871b by llvmgnsyncbot
[gn build] Port 860eabb3953a
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/pseudo/lib/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/pseudo/unittests/BUILD.gn
Commit 50b51b1860acbfb775d5e2eee3310e25c635d667 by aaron
Fix a typo in an OpenMP test

This fixes the typo and corrects the default OpenMP version being
tested.
The file was modifiedclang/test/OpenMP/predefined_macro.c
Commit 50c959b4fa4288127026a6a908c9a6d74b6f5d11 by aaron
Add explicit OpenMP 5.0 case for version macros; NFC

This adds an explicit case for OpenMP 5.0 as a reminder to still define
the correct macro value when the default OpenMP version changes in the
future.
The file was modifiedclang/lib/Frontend/InitPreprocessor.cpp
Commit aaddfbf9d6a9a98c83968acd740c0695743ad00c by li.zhe.hua
[bazel] Add test targets for dataflow framework

Differential Revision: https://reviews.llvm.org/D124819
The file was modifiedutils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel
The file was modifiedutils/bazel/llvm-project-overlay/clang/BUILD.bazel
Commit dc1abb777a806488ed78dabdae10cf9534701c4f by llvm-dev
[X86] const-shift-of-constmasked.ll - replace X32 check prefix with X86

We try to only use X32 for gnux32 triple tests
The file was modifiedllvm/test/CodeGen/X86/const-shift-of-constmasked.ll
Commit 4779d6cca20c59089615ac98620e85f1288c16f9 by llvm-dev
[X86] load-local-v3i129.ll - add checks for targets with fast/slow shld funnel shift ops
The file was modifiedllvm/test/CodeGen/X86/load-local-v3i129.ll
Commit 61f2d307469981d5563187d646c44f8731ecf367 by david.spickett
[lldb][NFC] Simplify part of Options::GenerateOptionUsage

Use llvm::enumerate, remove an unused arg name stream and
replace repeated uses of indexing to get the option def.

We could use map instead of multimap but I'm not 100% that
would be NFC. All short options should be unique in theory.

Depends on D123500

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D123501
The file was modifiedlldb/source/Interpreter/Options.cpp
Commit 64816e68f4419a9e14c23be8aa96fa412bed7e12 by david.green
[AArch64] Support for Ampere1 core

Add support for the Ampere Computing Ampere1 core.
Ampere1 implements the AArch64 state and is compatible with ARMv8.6-A.

Differential Revision: https://reviews.llvm.org/D117112
The file was modifiedllvm/lib/Target/AArch64/AArch64Subtarget.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64.td
The file was addedllvm/lib/Target/AArch64/AArch64SchedAmpere1.td
The file was addedllvm/lib/Target/AArch64/AArch64SchedPredAmpere.td
The file was modifiedllvm/test/MC/AArch64/armv8.2a-dotprod.s
The file was modifiedllvm/test/CodeGen/AArch64/cpus.ll
The file was modifiedllvm/unittests/Support/TargetParserTest.cpp
The file was modifiedllvm/test/MC/AArch64/armv8.3a-rcpc.s
The file was modifiedllvm/test/CodeGen/AArch64/neon-dot-product.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64SchedPredicates.td
The file was modifiedllvm/test/MC/Disassembler/AArch64/armv8.3a-rcpc.txt
The file was modifiedllvm/test/CodeGen/AArch64/remat.ll
The file was modifiedllvm/include/llvm/Support/AArch64TargetParser.def
The file was modifiedclang/test/Misc/target-invalid-cpu-note.c
The file was modifiedllvm/lib/Target/AArch64/AArch64Subtarget.h
Commit 731f0e27ec110443aa5faaceda4b20adafbddcc7 by llvm-dev
[PowerPC] Regenerate urem-seteq-illegal-types.ll

Remove superfluous whitespace
The file was modifiedllvm/test/CodeGen/PowerPC/urem-seteq-illegal-types.ll
Commit e6cb64ae9e8d5dc6e793f2a51b6ab55c278cb8a2 by npopov
[X86] Add additional add of and not tests (NFC)

Add tests for cases involving a truncated not.
The file was modifiedllvm/test/CodeGen/X86/add-and-not.ll
Commit 7e02bc5237751118efe36c41b0caf004aeed022f by david.green
[AArch64] Add native CPU detection for Ampere1

Map the IMPLEMENTOR ID 0xc0 (Ampere Computing) and CPU ID 0xac3
(Ampere1) to ampere1.

Differential Revision: https://reviews.llvm.org/D117111
The file was modifiedllvm/unittests/Support/Host.cpp
The file was modifiedllvm/lib/Support/Host.cpp
Commit 625e0e611b405b9c45b6d8a692d7ef17ef04e54f by paulkirth
[BOLT] [NFC] Remove unused variable

This patch fixes a warning from -Wunused-but-set-variable
MismatchedBranches are counted, but are never reported.
Since evaluateProfileData() should already identify and report
these cases, we can safely remove the unused variable.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D124588
The file was modifiedbolt/lib/Profile/DataReader.cpp
Commit cf05de7168b0ae2eaffdd6ab5a7c982bfa6da5c6 by david.spickett
[lldb][NFC] Refactor printing of short options in help

Instead of building a set twice for optional and required,
build a set for each while walking the options once.

Then take advantage of set being sorted meaning we don't
have to enforce the upper/lower order ourselves.

Just cleaned up the formatting on the later loops.
Combined the if conditions and used a single line if.

Depends on D123501

Reviewed By: jingham

Differential Revision: https://reviews.llvm.org/D123502
The file was modifiedlldb/source/Interpreter/Options.cpp
Commit 9c46a9cf611f107c34a8616bef7476842e7e5d71 by dawid_jurek
[NFC][GVNSink] Don't pretend that iteration is over instructions when it's actually over blocks

Differential Revision: https://reviews.llvm.org/D124764
The file was modifiedllvm/lib/Transforms/Scalar/GVNSink.cpp
Commit e9d4a9dd8bc461e44d2e081df1f94e03ff08b3bd by preames
[X86] Autogen a few tests for ease of update [nfc]
The file was modifiedllvm/test/CodeGen/X86/sink-out-of-loop.ll
The file was modifiedllvm/test/CodeGen/X86/lsr-interesting-step.ll
The file was modifiedllvm/test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll
Commit 9c1085c7e20bdd7c4a487f50313ebeeb2b6683b8 by i
[Clang][OpenMP] Add the support for floating-point variables for specific atomic clauses

Currently when using `atomic update` with floating-point variables, if
the operation is add or sub, `cmpxchg`, instead of `atomicrmw` is emitted, as
shown in [1].  In fact, about three years ago, llvm-svn: 351850 added the
support for FP operations. This patch adds the support in OpenMP as well.

[1] https://godbolt.org/z/M7b4ba9na

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D124724
The file was modifiedclang/test/OpenMP/atomic_capture_codegen.cpp
The file was modifiedclang/lib/CodeGen/CGStmtOpenMP.cpp
The file was modifiedclang/test/OpenMP/sections_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/atomic_update_codegen.cpp
The file was modifiedclang/test/OpenMP/reduction_implicit_map.cpp
The file was modifiedclang/test/OpenMP/for_reduction_codegen.cpp
The file was modifiedclang/test/OpenMP/parallel_reduction_codegen.cpp
Commit 2929c34da665fa83246f68d07bbefe0653e7d225 by npopov
[SCEV] Regenerate test checks (NFC)
The file was modifiedllvm/test/Analysis/ScalarEvolution/trip-count14.ll
Commit 3bc79808d06343f712728e1491f31a45383d9803 by i
[ELF] Fix branch range computation when picking ThunkSection

Similar to D117734. Take AArch64 as an example when the branch range is +-0x8000000.

getISDThunkSec returns `ts` when `src-0x8000000-r_addend <= tsBase < src-0x8000000`
and the new thunk will be placed in `ts` (`ts->addThunk(t)`). However, the new
thunk (at the end of ts) may be unreachable from src. In the next pass,
`normalizeExistingThunk` reverts the relocation back to the original target.
Then a new thunk is created and the same `ts` is picked as before. The `ts` is
still unreachable.

I have observed it in one test with a sufficiently large r_addend (47664): there
are initially 245 Thunk's, then in each pass 14 new Thunk's are created and get
appended to the unreachable ThunkSection. After 15 passes lld fails with
`thunk creation not converged`.

The new test aarch64-thunk-reuse2.s checks the case.

Without `- pcBias`, arm-thumb-thunk-empty-pass.s and arm-thunk-multipass-plt.s
will fail.

Reviewed By: peter.smith

Differential Revision: https://reviews.llvm.org/D124653
The file was addedlld/test/ELF/aarch64-thunk-reuse2.s
The file was modifiedlld/ELF/Relocations.cpp
Commit bc3056b382ac3dc4ee1e80583ff8b0526e10f2ff by llvm-dev
[X86] Add test showing failure to modulo the rotation amounts before merging an inner rotation

Thanks to @spatel for the test case
The file was modifiedllvm/test/CodeGen/X86/combine-rotates.ll
Commit 2deebc0048f92811dc92c7e41d357683b84febf7 by ivan.murashko
[RFC] Add and sort decl to maintain order instead of inserting in order

ASTWriter::associateDeclWithFile shows a lot in clangd perf profile due to O(n^2) behaviour in insertion of DeclIDs in SortedFileDeclIDs. Instead of doing that, this patch just appends it to the DeclIDs vector and sorts them at the end.

Reviewed By: akyrtzi

Differential Revision: https://reviews.llvm.org/D124840
The file was modifiedclang/lib/Serialization/ASTWriter.cpp
Commit faa35fc873700b6d3e61e652c887b82d1cea7c0c by llvm-dev
[DAG] Fix issue with rot(rot(x,c1),c2) -> rot(x,c1+c2) fold with unnormalized rotation amounts

Don't assume the rotation amounts have been correctly normalized - do it as part of the constant folding.

Also, the normalization should be performed with UREM not SREM.
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
The file was modifiedllvm/test/CodeGen/X86/combine-rotates.ll
Commit 857eb4a152cf3386db5f2070751586829a9d67ff by minyihh
[mlir][LLVMIR] Add support for translating Switch instruction

Add support for translating llvm::SwitchInst.

Differential Revision: https://reviews.llvm.org/D124628
The file was modifiedmlir/test/Target/LLVMIR/Import/basic.ll
The file was modifiedmlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
Commit 0c8c05064d57fe3bbbb1edd4c6e67f909c720578 by chrisj
[llvm-ar] Modify usage printouts to use the correct toolname

Modify llvm-ar and llvm-ranlib to use the actual name of the executable
when printing the usage text via the '--help' flag.

Reviewers: Maskray, jhenderson, gbreynoo

Differential Revision: https://reviews.llvm.org/D124445
The file was modifiedllvm/tools/llvm-ar/llvm-ar.cpp
The file was modifiedllvm/test/tools/llvm-ranlib/tool-name.test
The file was modifiedllvm/test/tools/llvm-ar/tool-name.test
Commit 5d1dbe11194466151aafc139663d49ded00c92a7 by michaelrj
[libc] fix strtold tests on 32 bit systems

This patch fixes the string to long double tests for systems that use
long double is double, and don't support uint128.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D124803
The file was modifiedlibc/test/src/stdlib/strtold_test.cpp
Commit e072a123d3b24995b0921802d69c93c08e3667bf by michaelrj
[libc] add printf writer

The printf implmentation is made up of three main pieces, the parser,
the converter, and the writer. This patch adds the implementation for
the writer, as well as the function for writing to a string, along with
tests.

Reviewed By: sivachandra, lntue

Differential Revision: https://reviews.llvm.org/D124421
The file was addedlibc/src/stdio/printf_core/string_writer.h
The file was addedlibc/test/src/stdio/printf_core/string_writer_test.cpp
The file was modifiedlibc/src/stdio/printf_core/writer.h
The file was modifiedlibc/src/stdio/printf_core/CMakeLists.txt
The file was addedlibc/src/stdio/printf_core/writer.cpp
The file was modifiedlibc/test/src/stdio/printf_core/CMakeLists.txt
Commit 1deea714b3b4023b2d50f73503ee2782c3b59fe7 by augie
BuildLibCalls: simplify switch statement slightly

Per feedback on D123086 after submit.

Also added a test for vec_malloc et al attribute inference to show it's
doing the right thing.

The new tests exposed a defect, corrected by adding vec_free to the list of
free functions in MemoryBuiltins.cpp, which had been overlooked all the
way back in D94710, over a year ago.

Differential Revision: https://reviews.llvm.org/D124859
The file was modifiedllvm/test/Transforms/InferFunctionAttrs/annotate.ll
The file was modifiedllvm/lib/Analysis/MemoryBuiltins.cpp
The file was modifiedllvm/lib/Transforms/Utils/BuildLibCalls.cpp
Commit a61c8e1ebdff2111a394feac168426e0d962a134 by Yuanfang Chen
tsan: for unittests, change to use test fixtures to clear racy stacks

After cd0a5889d71, unittest would run in shard mode where many tests
share a single process. Need to clear some global state to make the test
results stable.

Reviewed By: thetruestblue, rsundahl

Differential Revision: https://reviews.llvm.org/D124591
The file was modifiedcompiler-rt/lib/tsan/tests/rtl/tsan_string.cpp
The file was modifiedcompiler-rt/lib/tsan/tests/rtl/tsan_test_util_posix.cpp
The file was modifiedcompiler-rt/lib/tsan/tests/rtl/tsan_mutex.cpp
The file was modifiedcompiler-rt/lib/tsan/tests/rtl/tsan_test.cpp
The file was modifiedcompiler-rt/lib/tsan/tests/rtl/tsan_test_util.h
The file was modifiedcompiler-rt/lib/tsan/tests/rtl/tsan_mop.cpp
The file was modifiedcompiler-rt/lib/tsan/tests/rtl/tsan_thread.cpp
Commit 672b908bca672ad5b0ecffce653242f26a87cd20 by gflegar
[mlir] Add sin & cos ops to complex dialect

Also adds conversions for those ops to math + arith.

Differential Revision: https://reviews.llvm.org/D124773
The file was modifiedmlir/test/Conversion/ComplexToStandard/convert-to-standard.mlir
The file was modifiedmlir/lib/Conversion/ComplexToStandard/ComplexToStandard.cpp
The file was modifiedmlir/include/mlir/Dialect/Complex/IR/ComplexOps.td
The file was modifiedmlir/test/Dialect/Complex/ops.mlir
Commit 2f9fc576be206bd5c4fddfec5f89fceb3554a8d6 by davelee.com
[lldb] Add setting for max depth of value object printing (NFC)

This adds a setting (`target.max-children-depth`) that will provide a default value for the `--depth` flag used by `expression` and `frame variable`.

The new setting uses the same default that's currently fixed in source: `UINT32_MAX`.

This provides two purposes:

1. Allowing downstream forks to provide a customized default.
2. Allowing users to set their own default.

Following `target.max-children-count`, a warning is emitted when the max depth is reached. The warning lets users know which flags or settings they can customize. This warning is shown only when the limit is the default value.

rdar://87466495

Differential Revision: https://reviews.llvm.org/D123954
The file was modifiedlldb/include/lldb/DataFormatters/DumpValueObjectOptions.h
The file was modifiedlldb/include/lldb/Target/Target.h
The file was modifiedlldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h
The file was modifiedlldb/include/lldb/Interpreter/OptionValueProperties.h
The file was modifiedlldb/source/Commands/CommandObjectTarget.cpp
The file was modifiedlldb/source/DataFormatters/ValueObjectPrinter.cpp
The file was modifiedlldb/source/Target/Target.cpp
The file was modifiedlldb/source/DataFormatters/DumpValueObjectOptions.cpp
The file was modifiedlldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp
The file was modifiedlldb/source/Target/TargetProperties.td
The file was modifiedlldb/source/Commands/CommandObjectFrame.cpp
The file was modifiedlldb/include/lldb/DataFormatters/ValueObjectPrinter.h
The file was modifiedlldb/source/Interpreter/OptionValueProperties.cpp
The file was modifiedlldb/include/lldb/Interpreter/CommandInterpreter.h
The file was modifiedlldb/source/Interpreter/CommandInterpreter.cpp
Commit f2639cf3fe46c30ad450cc2533c81eacd4788c33 by isanbard
[randstruct] Move initializer check to be more effective

If a randomized structure has an initializer with a dedicated
initializer in it, the field initialzed by that dedicated initializer
may end up at the end of the RecordDecl. This however may skip the
random layout initization check.

  struct t {
     int a, b, c, d, e;
  } x = { .a = 2, 4, 5, 6 };

Let's say that "a" is lands as the last field after randomization. The
call to CheckDesignatedInitializer sets the iterator to the end of the
initializer list. During the next iteration of the initializer list
check, it detects that and fails to issue the error about initializing
a randomized struct with non-designated initializer. Instead, it issues
an error about "excess elements in struct initializer", which is
confusing under these circumstances.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D124694
The file was modifiedclang/lib/Sema/SemaInit.cpp
The file was modifiedclang/test/Sema/init-randomized-struct.c
Commit 9f38da258ea75874808e6da756bac831cada180f by hokein.wu
[pseudo] Implement the GLR parsing algorithm.

This patch implements a standard GLR parsing algorithm, the
core piece of the pseudoparser.

- it parses preprocessed C++ code, currently it supports correct code
  only and parse them as a translation-unit;
- it produces a forest which stores all possible trees in an efficient
  manner (only a single node being build for per (SymbolID, Token Range));
  no disambiguation yet;

Reland with a fix for g++'s -fpermissive error on previous declaration `GSS& GSS;`.

Differential Revision: https://reviews.llvm.org/D121150
The file was modifiedclang-tools-extra/pseudo/include/clang-pseudo/Forest.h
The file was modifiedclang-tools-extra/pseudo/tool/ClangPseudo.cpp
The file was modifiedclang-tools-extra/pseudo/lib/CMakeLists.txt
The file was addedclang-tools-extra/pseudo/lib/GLR.cpp
The file was addedclang-tools-extra/pseudo/test/glr.cpp
The file was modifiedclang-tools-extra/pseudo/unittests/CMakeLists.txt
The file was addedclang-tools-extra/pseudo/include/clang-pseudo/GLR.h
The file was addedclang-tools-extra/pseudo/unittests/GLRTest.cpp
Commit 88962f536f588c59dd2678dbd5445bd5f1da8e88 by llvmgnsyncbot
[gn build] Port 9f38da258ea7
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/pseudo/unittests/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang-tools-extra/pseudo/lib/BUILD.gn
Commit 397188036d4cdec7c3bc9236b4a5197232283413 by owenca
[clang-format][NFC] Clean up tryToParseLambdaIntroducer()

Differential Revision: https://reviews.llvm.org/D124818
The file was modifiedclang/lib/Format/UnwrappedLineParser.cpp
Commit 29f70e3e7da8257feae0010db7200318c529683d by dkreitzer
Minor correction in bitreverse intrinsic semantics

Differential Revision: https://reviews.llvm.org/D124861
The file was modifiedllvm/docs/LangRef.rst
Commit c7ecfadf9beb936e5101db4362dd2935d415b04d by richard
Fix some places where PseudoObjectExpr handling assumed that a
PseudoObjectExpr is only used for ObjC properties and subscripts.

For now, these assumptions are generally correct, but that's not part of
the design of PseudoObjectExpr. No functionality change intended.
The file was modifiedclang/lib/Sema/SemaStmt.cpp
The file was modifiedclang/lib/AST/Expr.cpp
Commit c1e17c7dfedd27b95c8c2fba2b6473c7348f0e77 by Duncan P. N. Exon Smith
ExtractAPI: Use %clang_cc1 and -verify in enum.c

Fix one test (enum.c) in ExtractAPI to use %clang_cc1 and -verify
instead of calling the full driver and FileCheck. This is an example for
my comment from https://reviews.llvm.org/D121873.

Differential Revision: https://reviews.llvm.org/D124634
The file was modifiedclang/test/ExtractAPI/enum.c
Commit 88b6d3211c836021a9b570ac6090dd1bf42da449 by amir.aupov
[BOLT][TEST] Fix test failures on AArch64 builder

Address X86 tests failures on AArch64 builder:
https://lab.llvm.org/staging/#/builders/211/builds/82

Inputs fail to cross-compile due to a missing header:
```
/usr/include/stdio.h:27:10: fatal error: 'bits/libc-header-start.h' file not found
#include <bits/libc-header-start.h>
```

As inputs are linked with `-nostdlib` anyway, don't include stdio.h.

Reviewed By: yota9

Differential Revision: https://reviews.llvm.org/D124863
The file was modifiedbolt/test/X86/Inputs/avx512.c
The file was modifiedbolt/test/X86/Inputs/inline-foo.c
The file was modifiedbolt/test/Inputs/icf-jump-tables.c
Commit 39492ba5d69ebaba9d1e65ad57cdda0f60796cf8 by amir.aupov
Revert "[BOLT][TEST] Fix test failures on AArch64 builder"

This reverts commit 88b6d3211c836021a9b570ac6090dd1bf42da449.
The file was modifiedbolt/test/X86/Inputs/inline-foo.c
The file was modifiedbolt/test/X86/Inputs/avx512.c
The file was modifiedbolt/test/Inputs/icf-jump-tables.c
Commit 7e23b46ab8da7ccd038a0987e947e4bec5ce2d4b by hansang.bae
[OpenMP] Possible fix for sporadic test failure from loop_dispatch.c

This patch tries to fix sporadic test failure after the change
https://reviews.llvm.org/D122107.
Made the test wait until every thread has at least one loop iteration.

Differential Revision: https://reviews.llvm.org/D124812
The file was modifiedopenmp/runtime/test/ompt/worksharing/for/loop_dispatch.c
Commit ed1b32791dbb4c02cd761742a63cdf1e9d644ae6 by hokein.wu
[pseudo] Print the GSS::Node details when the unittest fails, NFC.
The file was modifiedclang-tools-extra/pseudo/unittests/GLRTest.cpp
The file was modifiedclang-tools-extra/pseudo/include/clang-pseudo/GLR.h
The file was modifiedclang-tools-extra/pseudo/lib/GLR.cpp
Commit 37471cf2c3fd02fac0b0dc6e513cfe6098f37764 by michael.p.rice
[clang][OpenMP] Local variable alignment incorrect with align clause

If alignment specified with align clause is less than natural alignment for
list item type, the alignment should be set to the natural alignment.

See OMP5.1 specification, page 185, lines 7-10

Differential Revision: https://reviews.llvm.org/D124676
The file was modifiedclang/lib/CodeGen/CGOpenMPRuntime.cpp
The file was modifiedclang/test/OpenMP/align_clause_codegen.cpp
Commit a47e03685bf3984ae3d9965a7cf9d6bb25f20928 by spatel
[InstCombine] add tests for min/max with shuffled operands; NFC

Issue #46238
The file was modifiedllvm/test/Transforms/InstCombine/minmax-intrinsics.ll
Commit 432c199e84730e4bb0aec964aa1d13f0226455ac by spatel
[InstCombine] move shuffle after min/max with same-shuffled operands

This is an intrinsic version of the existing fold for binops.
As a first step, I only allowed min/max, but the code is set
up to make adding more intrinsics easy (with more or less than
2 arguments).

This (and possible follow-ups) are discussed in issue #46238.
The file was modifiedllvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
The file was modifiedllvm/test/Transforms/InstCombine/minmax-intrinsics.ll
Commit c4546091ed29763df3e4649327679fec5dcb5ff6 by hokein.wu
[pseudo] Use a real language option in the parser.

Differential Revision: https://reviews.llvm.org/D124831
The file was modifiedclang-tools-extra/pseudo/lib/Token.cpp
The file was modifiedclang-tools-extra/pseudo/include/clang-pseudo/Token.h
The file was modifiedclang-tools-extra/pseudo/test/glr.cpp
The file was modifiedclang-tools-extra/pseudo/tool/ClangPseudo.cpp
Commit 2c33266084602a046736bfa0caf441de313a6682 by jim22k
[mlir][sparse] Add lowering for unary and binary ops

Adding lowering for Unary and Binary required several changes due to
their unique nature of containing custom code for different "regions"
of the sparse structure being operated on. Along with a Kind, a pointer
to the Operation is passed along to be merged once the lattice
structure is figured out.

The original operation is maintained, as it is required for subsequent
lattice decisions. However, sparse_tensor.binary has some branches
are considered as fully handled and therefore are marked with as
kBinaryBranch to distinguish them.

A unique aspect of the custom code is that sometimes the desired result
is no result at all -- i.e. a user wants overlapping sparse entries to
become empty in the output. The solution to this is to return an
uninitialized Value(), which is checked and handled elsewhere in the
code and results in nothing being written to the output tensor for that
case.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D123057
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/Utils/Merger.h
The file was modifiedmlir/lib/Dialect/SparseTensor/Utils/Merger.cpp
The file was addedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_binary.mlir
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
The file was modifiedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matrix_ops.mlir
The file was addedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_unary.mlir
The file was modifiedmlir/test/Integration/Dialect/SparseTensor/CPU/sparse_vector_ops.mlir
Commit be50b8c185c69f1e7e534cc67b590196a381b8a9 by preames
[riscv] Add debug printing support for VSETVLIInfo class [nfc]
The file was modifiedllvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
Commit 9eccc7357e6d67d97018d13327d6f3078eac45a7 by benny.kra
[bazel] Fix the build after 2c3326608460
The file was modifiedutils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Commit 5f14aee3bb53de238db8de0e7f82da49baf75dc0 by stilis
[mlir] Fix Visual Studio warnings

There are only a couple of warnings when compiling with VS on Windows. This fixes the last remaining warnings so that we can enable LLVM_ENABLE_WERROR on the mlir windows bot.

Reviewed By: rriddle

Differential Revision: https://reviews.llvm.org/D124862
The file was modifiedmlir/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
The file was modifiedmlir/include/mlir/Support/InterfaceSupport.h
Commit 3a8266902b58978a6fd52b779e8ad94fbf368182 by congzhecao
[SCEV] Removed an unnecessary assertion

The assertion is to check we always get backedge taken count
(`BECount`) of zero when the exit condition is in select form
(`isa<BinaryOperation>(ExitCond)`) and the exit limit for the
first operand is zero `EL0.ExactNotTaken->isZero()`). However
the assertion is checking that the exit condition is NOT in
select form. Removing the the whole assertion since we now handle
select form in ScalarEvolution::getSequentialMinMaxExpr.

Reviewed By: reames, nikic

Differential Revision: https://reviews.llvm.org/D122835
The file was modifiedllvm/lib/Analysis/ScalarEvolution.cpp
Commit 1abcdc677cfd4f14af0a80d86841344c2af5bdb9 by ajcbik
[mlir][sparse] add missing types to from/to-MLIR conversion routines

This will enable our usual set of element types in external
environments, such as PyTACO support.

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D124875
The file was modifiedmlir/lib/ExecutionEngine/SparseTensorUtils.cpp
Commit 2982d0032b332b060b95f9e25fb1558f41d9a128 by preames
Fix a buildbot warning [nfc]
The file was modifiedllvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
Commit 15d20b97645784008ec43865ed84bcf665fc2a50 by chris.bieneman
Fix DXBC magic parsing

This gets identify_magic working correctly for DXContainer files
The file was modifiedllvm/lib/BinaryFormat/Magic.cpp
The file was modifiedllvm/unittests/Object/DXContainerTest.cpp
Commit e1c808b36e2ec7050016c2eaafab3e17696583a0 by Jon Roelofs
Fix zero-width bitfield extracts to emit 0

Fixes #55129
The file was modifiedllvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/form-bitfield-extract-from-shr-and.mir
Commit 2617f2f7082603e740ee5774e1718ecc820f845f by ajcbik
[mlir][sparse] fix build issue with unused local under opt builds

Reviewed By: rdzhabarov

Differential Revision: https://reviews.llvm.org/D124883
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
Commit 3d08c778c01e1577752762da8c980db32b4e6d55 by Jonas Devlieghere
[lldb] Session transcript should use the async debugger streams

When writing out the session transcript, print output to the
asynchronous debugger stream to prevent it from potentially interleaving
with other output.

Differential revision: https://reviews.llvm.org/D124873
The file was modifiedlldb/source/Core/Debugger.cpp
Commit b945b62cf35e1b45ffb9233958756743b2b5fd46 by Jonas Devlieghere
[lldb] Add a function to check if lldb is running in an interactive session

This patch adds a function to check if lldb is running in an interactive
debug session. Currently this API only works on macOS. It's expected to
be used in combination with Host::OpenFileInExternalEditor.

Differential revision: https://reviews.llvm.org/D124872
The file was modifiedlldb/include/lldb/Host/Host.h
The file was modifiedlldb/source/Host/macosx/objcxx/Host.mm
The file was modifiedlldb/source/Host/common/Host.cpp
Commit afaa56df7a93f21cd1e49f7daa6a8970335744da by jezng
Implement support for __llvm_addrsig for MachO in llvm-mc

The __llvm_addrsig section is a section that the linker needs for safe icf.
This was not yet implemented for MachO - this is the implementation.
It has been tested with a safe deduplication implementation inside lld.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D123751
The file was addedllvm/test/CodeGen/AArch64/addrsig-macho.ll
The file was modifiedllvm/lib/MC/MCMachOStreamer.cpp
The file was modifiedllvm/include/llvm/MC/MCMachObjectWriter.h
The file was modifiedllvm/include/llvm/MC/MCObjectFileInfo.h
The file was modifiedllvm/lib/MC/WinCOFFObjectWriter.cpp
The file was modifiedllvm/include/llvm/MC/MCObjectWriter.h
The file was modifiedllvm/lib/MC/MCObjectFileInfo.cpp
The file was modifiedllvm/lib/MC/MachObjectWriter.cpp
The file was modifiedllvm/lib/MC/ELFObjectWriter.cpp
Commit 1d5263c554cbc39694e038f95c5a130171e3e224 by aaupov
[BOLT][TEST] Fix test failures on AArch64 builder

Address X86 tests failures on AArch64 builder:
https://lab.llvm.org/staging/#/builders/211/builds/82

Inputs fail to cross-compile due to a missing header:
```
/usr/include/stdio.h:27:10: fatal error: 'bits/libc-header-start.h' file not found
#include <bits/libc-header-start.h>
```

As inputs are linked with `-nostdlib` anyway, don't include stdio.h.

Reviewed By: yota9

Differential Revision: https://reviews.llvm.org/D124863
The file was modifiedbolt/test/Inputs/stub.c
The file was modifiedbolt/test/X86/Inputs/inline-foo.c
The file was modifiedbolt/test/Inputs/icf-jump-tables.c
The file was modifiedbolt/test/Inputs/stub.h
The file was modifiedbolt/test/X86/Inputs/avx512.c
The file was modifiedbolt/test/X86/inline-debug-info.test
Commit 241ca47db5c9920f1db7be2aee8045972cc0ce37 by arsenm2
llvm-reduce: Reduce includes
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.h
The file was modifiedllvm/tools/llvm-reduce/deltas/ReduceInstructionsMIR.cpp
Commit 5dfe4b7cf2775ccfc1623f6531783612075f5df0 by arsenm2
AMDGPU: Regenerate test checks
The file was modifiedllvm/test/CodeGen/AMDGPU/optimize-compare.mir
Commit 574ca03ef31fa364d98996406ef8f0ee1deb8dcd by arsenm2
AMDGPU: Remove some invalid kill flags in tests

These killed registers need to be live out of the block but the
verifier wasn't catching it.
The file was modifiedllvm/test/CodeGen/AMDGPU/optimize-negated-cond-exec-masking.mir
The file was modifiedllvm/test/CodeGen/AMDGPU/optimize-compare.mir
Commit 994c96aef6398d2e3b0c7a6bef8c84d1e2d6e477 by arsenm2
ARM: Cleanup MIR test

Drop IR section, renumber registers, regenerate to use -NEXT
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vpt-optimisations.mir
Commit c4e5a24dd67b70b05050afbfa83c0a809953d008 by arsenm2
ARM: Fix using undefined virtual registers in test

The verifier apparently doesn't work correctly and should have
caught this.
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vpt-optimisations.mir
Commit 3dd00461f9cb91a6582653500603882ed1475e51 by rtrieu
[trace][intelpt] Fix out-of-bounds access.

The StringRef single argument constructor expects a null-terminated
string.  Explicitly pass the size to prevent reading pass the end
of the array.
The file was modifiedlldb/source/Plugins/Process/Linux/Procfs.cpp
Commit 0e86cddf9880810444418200bcdce22a96d9e91a by rtrieu
[psuedo] Fix for unused warning by moving code into debug macro.
The file was modifiedclang-tools-extra/pseudo/lib/GLR.cpp
Commit dbbbc9e2ca4bf0839cef49505a798d7404809e7c by preames
[riscv] Add a couple more vsetvli tests
The file was modifiedllvm/test/CodeGen/RISCV/rvv/vsetvli-insert.ll