[clangd] Use unique_function for config handlers (#203008)
`ConfigYAML.cpp`'s `DictParser` owns its callbacks for one parse and
never copies them, so this replaces `std::function` with move-only
`llvm::unique_function` and removes the unused copy machinery for each
lambda.
In a matched Release AArch64 build, `ConfigYAML.cpp.o` shrank by 94,560
bytes, stripped clangd shrank by 16,848 bytes, unstripped clangd shrank
by 82,512 bytes, and dyld fixups fell by 336.
Validated with the 16 `ParseYAML` unit tests and `clangd --check`; 12
paired runs of 100,000 parses improved mean user CPU time by 3.46% (95%
CI: 1.31% to 5.61%).
Work towards #202616
AI tool disclosure: Co-authored with OpenAI Codex.
[clang][Sema] Fix rejected-valid for explicit object parameters in dependent nested classes context (#209107)
In #89078, we banned explicit object parameters from several invalid
contexts. This patch proposes we relax the restriction and allow
entering contexts so that nested classes can be visited correctly.
Close #136472
[CodeGen][NPM] Disable Machine verifier at the end of default pipelines (#208357)
keeping discussions in https://github.com/llvm/llvm-project/pull/176693.
Adds target option to disable machine verifier at the end of default
pilelines (O0,O1..). Also ref.
https://github.com/llvm/llvm-project/pull/201004 for discussions
regarding why this is required (temporarily atleast) so that NPM
migration is unblocked. should be removed once we have fixed all the
latent verifier issues.
[AMDGPU][GlobalISel] Select s16 G_MERGE_VALUES into wider scalars (#207999)
With real-true16 (default on `gfx11`/`gfx12`), a scalar `s16` is a
register type, so the `G_MERGE_VALUES` legality rule started accepting
scalar merges built from `s16` pieces, e.g. `s64 = G_MERGE_VALUES(4 x
s16)`. The instruction selector has no pattern for that shape. So this
aborts with `cannot select` on something like:
```mlir
define amdgpu_kernel void @k(ptr %p) {
store i136 0, ptr %p, align 8
ret void
}
```
Make it selectable rather than restricting legalization: Pack pairs of
`s16` with `S_PACK_LL_B32_B16` then `REG_SEQUENCE`.
Assisted-by: Claude
Signed-off-by: Keshav Vinayak Jha <keshavvinayakjha at gmail.com>
[Support] Treat Windows "NUL" as the null device in writeToOutput (#208179)
llvm-objcopy (via writeToOutput) only special-cased "/dev/null", so on
Windows an output path of "NUL" fell through to TempFile::create() +
rename. Windows reserves "NUL" as a device name, so the rename fails
with "permission denied". This broke clang-offload-bundler's SYCL fat
object step when the driver is invoked with `-o nul` in downstream test
https://github.com/intel/llvm/blob/sycl/sycl/test/include_deps/header_reach.cpp
Assisted by: Claude
[flang][OpenMP] Lower target in_reduction (#199967)
This patch carries `in_reduction` through `omp.target` for host
execution.
The lowering looks up the task-reduction private storage with
`__kmpc_task_reduction_get_th_data` and binds the target region argument
to that private pointer. This makes uses inside the target region refer
to the task-private reduction storage instead of continuing to use the
original variable.
This also fixes the `omp::TargetOp::build(TargetOperands)` path so
`in_reduction` operands are preserved instead of being dropped.
On the Flang side, `target in_reduction` list items are added to the
target map entries when needed, giving the translation a matching mapped
value to rewrite.
### Stack / review order
[21 lines not shown]
[TableGen] V is always a TypedInit, so use cast (#209208)
No need to dyn_cast. It is functionally impossible for V to not be a
TypedInit at this point.
[lit] Remove external shell tests for shtest-format
fail.txt was redundant with an internal shell test.
Move the other tests into the internal shell directory as they are not
redundant.
Reviewers: arichardson, jh7370, hnrklssn, ilovepi
Pull Request: https://github.com/llvm/llvm-project/pull/209552
[compiler-rt] Drop support for using the external shell
The lit external shell is going to be removed soon, so drop support for
using it to run the compiler-rt tests.
Reviewers: petrhosek, ilovepi, thurstond
Pull Request: https://github.com/llvm/llvm-project/pull/209626
[clang-tools-extra] Drop option to use external shell
The external shell is going to be removed from lit soon, so drop the
option to enable using it.
Reviewers: petrhosek, compnerd, ilovepi
Pull Request: https://github.com/llvm/llvm-project/pull/209625
[Flang] Drop option to use external shell for testing
The external shell will be deleted soon, so drop the option to enable
the use of it for testing flang/flang-rt.
Reviewers: petrhosek, clementval, ilovepi
Pull Request: https://github.com/llvm/llvm-project/pull/209624