[lldb][test] Fix thread safety analysis warning in LockedTest
Guard `mutex.unlock()` with `if (mutex.try_lock())` to satisfy thread safety analysis.
Statically, the compiler cannot verify that `mutex.try_lock()` succeeded when it is only asserted by `EXPECT_TRUE`, leading to a "releasing mutex 'mutex' that was not held" compilation error.
This fixes a regression introduced in #198941.
[lldb][NativePDB] Use CV qualifiers from `this` type for methods (#199214)
When we create the Clang types for methods, we ignored the qualifiers.
So `const` methods would become non-const.
With this PR, we use the qualifiers from `*this` for the function type.
[clang] ast-text-dump: fix printing of declref to decomposition with no bindings.
Clang supports empty structured binding groups as an extension,
and the text node dumper has some special handling for giving a name
to anonymous declarations, which assumed a decomposition would have at
least one binding.
Fixes #198842
[SLP] Retry vectorization of FMA candidates after block processing
fadd/fsub instructions that canConvertToFMA returns valid for were
unconditionally skipped in tryToVectorize, causing regressions
where SLP failed to vectorize loops containing such patterns even when
FMA formation never fires.
Collect skipped FMA candidates during vectorizeChainsInBlock and retry
them with AllowFMACandidates=true after all other instructions in the
block have been processed. The cost model still rejects the retry when
actual FMA formation is more profitable (e.g. FMA4 on bdver2), so
existing FMA-profitable cases are unaffected.
Fixes #198040
Reviewers: davemgreen, bababuck, RKSimon, hiraditya
Pull Request: https://github.com/llvm/llvm-project/pull/198174
[flang-rt] Remove library dependency from flang-rt to offload (#198793)
Summary:
We need the offload project's RPC thread to handle the IO requests
originating from the GPU. Previously we did the 'easy' solution and just
linked this handler directly into the offload proejct. This is not ideal
because it prevents people's ability to build and configure libraries
separately.
This PR inverts the dependency, flang-rt now conditionally enables
support using the existing RPC callback mechanism. The cost is that
every flang-rt program now pays the cost of a boolean compare, the
benefit is the libraries are now independent of each-other.
[OpenMP] Prevent parser infinite loop on unimplemented clauses (#198796)
This is to fix an infinite loop in the parser when using un-implemented
clauses. See https://godbolt.org/z/f775asrea .
This patch also fixes this crash: https://godbolt.org/z/WKrsbTGGe .
[VPlan] Assert that replacement types match in VPUser::setOperand (NFC). (#195891)
Add assertion to VPValue::setOperand to check if types of the new
operand matches the old operand.
This makes it easier to catch replacements with incorrect types at the
source, instead only later during verification.
A few places currently preform replacements with mis-matching types,
which only get fixed up later. Update those to avoid type-violation.
Depends on https://github.com/llvm/llvm-project/pull/195485
PR: https://github.com/llvm/llvm-project/pull/195891
[mlir][IR] Require token producer and consumer traits
Add marker traits for operations that intentionally produce or consume the
builtin token type. The verifier now rejects token results without
TokenProducerTrait, token operands without TokenConsumerTrait, token entry
block arguments whose parent op does not produce tokens, and token block
arguments outside entry blocks.
Extend the Test dialect token ops to cover valid opt-in cases and each
verifier rejection path.
Assisted-by: Codex
[RISCV][TTI] Model broadcast loads as zero-stride loads (#198446)
We have done this optimization in ISel and this PR just models it
in TTI.
---------
Co-authored-by: Luke Lau <luke_lau at icloud.com>
[AIX] Remove unsupported AIX native echo option -n (#199079)
AIX native echo doesn't support the `-n` flag.
Use the POSIX-standard `\c` escape sequence instead to suppress the
trailing newline, ensuring the test works across all systems and make it
portable.
The current test fails as follows:
```
FAIL: lit :: unit/Util.py (1 of 1)
******************** TEST 'lit :: unit/Util.py' FAILED ********************
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
"/opt/freeware/bin/python3.12" /home/himadhit/llvm/community/build/utils/lit/tests/unit/Util.py
# executed command: /opt/freeware/bin/python3.12 /home/himadhit/llvm/community/build/utils/lit/tests/unit/Util.py
[20 lines not shown]
[SPIRV][NFC] Pass function-pointer operand explicitly to visitFunPtrUse (#197667)
Take the function-pointer placeholder operand as a parameter rather
than reading MI.getOperand(2) directly, so visitFunPtrUse can be
reused from instructions with a different operand layout. Pure
refactor.
---------
Co-authored-by: Marcos Maronas <mmaronas at amd.com>