[NFC][SPIR-V] Fuse redundant full-traversal loops in SPIRVStructurizer (#215491)
Split out of #211299 per review. getHeaderBlocks, getMergeBlocks and
getContinueBlocks each did their own full scan of F even though they
classify the same instructions; merge them into a single
getHeaderMergeContinueBlocks scan.
[AArch64] Fix cost of vector shifts with non-uniform constant amounts (#214206)
Non-uniform constants use variable shifts and require materializing the
shift vector. Account for a shift and materialization per legalized vector.
[lldb][Windows] Dump thread stacks before lit's timeout kills a test (#213239)
On Windows, when a test hits a timeout, we currently don't get a
stacktrace. dotest solves this on POSIX: it registers a SIGTERM handler,
so a killed test prints its stack. The handler does not run on Windows
however because `faulthandler.register` doesn't exist there, and lit
terminates the process instead of signalling it (no signals on Windows).
This patch adds `faulthandler.dump_traceback_later()` with a default
timeout value of 300s. That's longer than the longest test in CI (~150s)
and does not kill the test. It simply dumps the stacktrace at a point
where the test is very likely stuck.
# Before
```
TIMEOUT: lldb-api :: types/TestFloatTypesExpr.py (2698 of 2698)
******************** TEST 'lldb-api :: types/TestFloatTypesExpr.py' FAILED ********************
Exit Code: 15
[15 lines not shown]
[IVDescriptors] Implement MonotonicDescriptor
RFC link: https://discourse.llvm.org/t/rfc-loop-vectorization-of-compress-store-expand-load-patterns/86442
"Monotonic" variable is similar to induction variable, but its value is updated under some condition, e.g.:
```
int idx = 0;
for(int i = 0; i < n; ++i) {
// some uses of idx
if (cond)
++idx;
}
```
In this example, `i` is induction variable and `idx` is monotonic variable: it's updated only when cond == true. In LLVM IR, this looks like:
```
loop_header:
%monotonic_phi = [%start, %prehader], [ %chain_phi0, %latch]
step_bb:
[26 lines not shown]
[clang][KCFI] Skip the KCFIPass on Hexagon (#211716)
Hexagon implements KCFI operand-bundle lowering in the back end
HexagonTargetLowering::EmitKCFICheck emits a KCFI_CHECK pseudo, which
HexagonAsmPrinter::LowerKCFI_CHECK expands into a type-hash check and a
trap - like PS_crash.
Hexagon was never added to the list in addKCFIPass() of targets whose
back end lowers the bundles, so Clang kept running the middle-end
KCFIPass for it.
Add Hexagon to the addKCFIPass() early-return so the "kcfi" bundles
reach the back end, which then emits the trapping load that actually
blocks the call.
[clang][bytecode] Fix initializing bases via DefaultInitExpr (#215499)
We can't just ignore the base initializer here, we need to get the base
pointer and everything else should work just fine.
[MLIR] Remove redundant dialect dependencies (#213022)
Conservatively remove redundant self-dependencies from transform passes
in Affine, ArmSME, Async, Bufferization, EmitC, GPU, Linalg, Math,
OpenACC, OpenMP, Shard, SparseTensor, Tensor, TOSA, Quant, and XeGPU.
Each affected pass either matches existing entities from its own dialect
or requires values, types, attributes, interfaces, or enclosing
operations that already ensure the dialect is loaded.
For `FormExpressionsPass`, the TableGen dependency is kept and the
duplicate C++ registration is removed. `Partition` no longer redundantly
inserts `ShardDialect` neither from TableGen or its C++
`getDependentDialects()` override.
## Motivation
A dialect is already loaded when the input IR contains registered
operations, types, or attributes from that dialect. Therefore, passes
that match such existing IR do not need to list their own dialect in
`dependentDialects`.
[12 lines not shown]
[Flang] Move integration Lit tests to the right directory, NFC
Flang unit tests that involve multiple stages of the compiler are
intended to be placed in flang/test/Integration. However, many existing
unit tests meeting this condition are currently located in the Lower
subdirectory.
This patch moves all tests in Lower that emit LLVM IR from Fortran or
run the FIR MLIR lowering pipeline via `tco` to Integration, and adds the
corresponding notice at the top of each file.
Assisted-by: Claude Opus 4.8.
[ORC] Split RTBridge Proxy headers by operation family (NFC) (#215467)
Break the monolithic RTBridge/Proxy.h and RTBridge/SPS/ProxySpecs.h into
a core header plus per-family sibling headers, so a client pays only for
the proxy families it uses. In particular Proxy.h no longer pulls in
TargetProcessControlTypes.h -- that was needed only by the memory-access
alias set -- so consumers of the core Proxy class (e.g. clients that
define their own proxies) no longer depend on it transitively.
Layout:
* RTBridge/Proxy.h -- core only: ProxyBase, Proxy, proxyInit,
buildProxies.
* RTBridge/CallProxies.h, RTBridge/MemoryAccessProxies.h -- the named
proxy alias sets.
* RTBridge/SPS/ProxySpec.h -- the SPS ProxySpec template.
* RTBridge/SPS/CallProxySpecs.h, RTBridge/SPS/MemoryAccessProxySpecs.h
-- the SPS signatures, controller-interface names, and specs.
[MISched] Dump region header under -misched-print-dags (#215090)
To simplify testing and do not require a secondary output flag like
`-debug` or `-print-before=machine-scheduler` just to FileCheck against
function name boundaries. Motivating example:
https://github.com/llvm/llvm-project/pull/213950