[flang][OpenMP] Inline CheckNestedBlock, NFC
CheckNestedBlock no longer calls itself, which was the primary reason
for the code to be in a separate function.
[clang-format] Add AfterComma option for BreakConstructorInitializers (#180541)
This patch introduces a new `AfterComma` value for the
`BreakConstructorInitializers` style option. This style keeps the
constructor initializer colon on the same line as the constructor
declaration and breaks after each comma in the initializer list.
Example formatting:
```cpp
Constructor() : initializer1(),
initializer2()
```
This style provides an alternative to the existing BeforeColon,
BeforeComma, and AfterColon options, allowing developers to maintain the
colon on the constructor line while placing each initializer on its own
line after commas.
---------
Co-authored-by: Perceval <perceval at trilogic.fr>
[mlir][spirv][nfc] Refactor deserialization of decorations (#181700)
Move all single integer literal decorations into a common case in spirv
deserializer. There was an unnnecessary duplication of switch cases that
served the same purpose.
Change OpDecoration -> OpDecorate as that is the correct name of the op
[flang][OpenMP] Include check for fully unrolled loops into nest check, NFC
It's naturally a part of the verification of constructs nested in loop
constructs, so perform that check there instead of having it in a separate
function.
Fix type mismatch in ARM calling convention ternary (#180872)
GCC's -Wextra flags the ternary in the ARM half-precision calling
convention setup because the branches have different types. Use
static_cast to make both sides consistent.
Built with ToT clang and GCC 13.3.0 on Linux x86_64. All existing tests
pass.
[lldb/docs] Update Scripted Symbol Locator tutorial title (NFC) (#181717)
This patch addresses some post-merge comments from llvm-project#181594,
where the tutorial name for Scripted Symbol Locator was missing a word
and wasn't capitalized properly.
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
[libc++] Fix FreeBSD atomic timed wait system call (#180400)
This PR fixes atomic timed wait on FreeBSD platforms.
When we added timed wait support, on FreeBSD platform, we were looking
only the `UMTX_OP_WAIT` section of the FreeBSD doc
https://man.freebsd.org/cgi/man.cgi?query=_umtx_op&apropos=0&sektion=2&manpath=FreeBSD+16.0-CURRENT&format=html
. Somehow we missed the generic section that describes the timeout
parameter that applies to all operations. As a consequence, we missed
the part that the FreeBSD is expecting the `size` to be casted to
`uintptr_t`, then passed in to the `void*` parameter.
This PR fixes the issue by casting the type to what the system requires.
As drive by, this PR also
- uses simple `timespec` instead of the extended one
- as documentation suggests, "Interval counting is always performed by
the monotonic wall clock", and "If the flag is absent, the timeout value
is relative", which means that using the simple version is enough and
[6 lines not shown]
[ELF,test] eh-frame-hdr-sdata8.s: use AT() to avoid huge PT_LOAD segments
Use AT() to ensure output sections with huge addresses are placed in separate
PT_LOAD segments. Without this, 2.lds and 3.lds created a huge PT_LOAD
segment, making the sparse file size larger than 4GiB, unsupported by
some 32-bit systems.
https://github.com/llvm/llvm-project/pull/179089#issuecomment-3908549089
Add DW_LNAME_HIP (#180999)
In PR #89980, DW_LNAME_HIP was not added because of a value conflict
with DW_LNAME_Assembly. The value of DW_LNAME_HIP has been updated (see
https://dwarfstd.org/languages-v6.html). This commit adds DW_LNAME_HIP.
Tests added by that PR accommodates the new SourceLanguageName.
[analyzer][Z3][NFCI] Simplify getExpr* functions by taking a RetTy reference (#180801)
Let me start by: This is some ancient code and was never really uphold
to the greatest quality standards.
It turns out the `RetTy` was almost always provided, and in the cases
when it wasn't, we could just pass a dummy and discard the result.
Probably the APIs could be refactored, but I decided not to. The code
mostly works, let's not stir up the mud.
Addresses
https://github.com/llvm/llvm-project/pull/168034#discussion_r2785236941
[NFC][ELF] Remove unused Config::hasTlsIe (#181680)
This was obsoleted by Ctx::hasTlsIe when the latter was introduced, but
the old Config::hasTlsIe was not removed at the same time.
Fixes: 2b153088be4a ("[ELF] Set DF_STATIC_TLS for AArch64/PPC32/PPC64")
[MLIR] Convert DialectReductionPatternInterface using ODS (#180640)
This PR converts `DialectReductionPatternInterface` using ODS.
It also introduces a new Interface Method class:
`PureVirtualInterfaceMethod` which creates the method as pure virtual.
[NFC][AMDGPU] Use `zeroinitializer` instead of `null` for `ptr addrspace(2/3/5)` in AMDGPU tests
A future change will update `ConstantPointerNull` semantics so that `null`
represents the actual null pointer for a given address space, which may be
non-zero. For AMDGPU, address spaces 2, 3, and 5 will have non-zero null
pointers. These tests use `null` to mean "address zero", not "semantic null", so
replace them with `zeroinitializer` which unambiguously represents the start of
the corresponding address space. This is NFC because `null` and
`zeroinitializer` are currently equivalent for all address spaces today.
Unify expandPow2Division/expandPow2Remainder into expandPow2DivRem.
Merge the two functions into one to share the common signed-path logic (freeze, bias, ashr) and reduce code duplication, as suggested.
[OpenMP] Make isPrivatizingClause version-sensitive (#181691)
Some pre-existing clauses (e.g. use_device_ptr) are privatizing in
OpenMP 6.0, but not in 5.2. Make the check more accurate by considering
the effective spec version.
[clang-tidy] Refactor `modernize-redundant-void-arg` (#173340)
Essentially, instead of having individual matchers for functions, and
for pointers to functions, and for casts to functions, and for typedefs
of functions, and (you get the point), this PR unifies them into one
`FunctionTypeLoc`-based matcher.
This refactor is not entirely NFC:
- First, it changes the diagnostic message. What used to be `redundant
void argument list in {function definition, lambda expression, etc.}` is
now just `redundant void argument list`. I don't think we're losing any
important information though.
- Second, it causes the check to fire in more places than it did before.
Specifically, it now removes the 2 `void`s in this test case:
https://github.com/llvm/llvm-project/blob/01effcd82dfbd3ce880a20c335334045191f217b/clang-tools-extra/test/clang-tidy/checkers/modernize/redundant-void-arg.cpp#L434-L442
Seeing as this check does want to remove `void` in macros, I believe
this is fixing an FN. And I don't believe I'm violating the intent of
the test case, because [the intent was just to ensure the check doesn't
crash when encountering it](https://reviews.llvm.org/D14204).
[lldb] Add tree-sitter based syntax highlighting (#181279)
This adds the necessary infrastructure to use tree-sitter for syntax
highlighting in LLDB. It provides the base class for a tree-sitter
highlighter plugin. Its primary function is interfacing with the
tree-sitter library, and converting captures to highlighting styles.
Adding a new tree-sitter highlighter consists of creating an LLDB plugin
that inherits from this class. The plugin has two core responsibilities:
1. Loading the tree-sitter grammar.
2. Specifying the tree-sitter syntax highlighting query.
Everything else is handled by the base class, making it extremely easy
to add a new language.
For more context and the motivation behind using tree-sitter for syntax
highlighting, see #170250.
Tweak cost of sub-reductions
This patch tweaks the cost of sub-reductions such that add-with-sub
reductions are not always discarded by the cost-model, because at the
moment we rely on the LV to generate partial reductions for reduction
chains that have both adds and subs for generating complex dot-product
instructions.
We should really be modeling this in the LV directly though,
but at least this mitigates the regressions caused when using the
cost-model to determine whether partial reductions are profitable
before transforming the VPlan to use them.