[LV] Add range of tests accessing pointers with bounded IVs (NFC). (#205912)
Add a range of tests covering loads/stores with pointers with
bounded/clamped IV accesses, like A[i%2].
[RISCV] Support floating point registers with -fzero-call-used-regs (#204929)
This patch adds support for clearing floating-point registers with the
`zero-call-used-regs` attribute. It supports all combinations of
floating-point sizes (fp16, fp32, fp64, fp128) and extensions (F, D, Q).
Like #194883, this uses pseudo-instructions to clear the registers. Note
that `PseudoClearFPR64` is manually expanded in `riscv-expand-pseudo`.
For RV32, we expand it to `fcvt.d.w reg, x0, rtz`, but for RV64 we use
the more efficient `fmv.d.x reg, x0`. This also matches GCC behavior.
Finally, using non-GPR values for `zero-call-used-regs` in the Clang
driver is still rejected as the backend doesn't support clearing vector
registers.
[libc++] Specify `encoding='utf-8'` in `conformance` script (#189534)
In some environments, especially Windows with active code page other
than 65001, some characters in the CSV files cause parse errors without
explicitly specifying the UTF-8 encoding.
Explicitly using `encoding='utf-8'` in `click.File` fixes such errors.
[bolt] Prevent using inplace to add compatibility
BSD sed doesn't implement -i as inplaced modify file. We use copy and
replace as a workaround to avoid this.
[clang] use typo-corrected name qualifier for template names
This also prevents error-recovery from forming a member specialization which is
not a class member, which leads to crashes-on-invalid.
Fixes #204561
[lldb][Windows] use Unicode path limit (#206060)
`MAX_PATH` is defined as `260`. `PosixApi.h` already defines `PATH_MAX`
as `32,768` characters which is the max path limit for Unicode paths on
Windows.
Use this in lldb on Windows to avoid path truncation.
[X86] Mark AsmPrinter Module Passes as Required (#206164)
This won't impact them working on optnone functions, but could impact
whether or not they get called in opt-bisect, which would be wrong.
[flang][OpenMP] Support lowering of metadirective (part 3)
Enable metadirective lowering for loop-associated variants such as
`do`, `simd`, `parallel do`, and `do simd`.
When a metadirective resolves to a loop-associated directive, the
associated DO construct is made available to the selected variant so
existing OpenMP loop lowering can process it. Standalone metadirectives
use the following sibling DO evaluation, while begin/end metadirectives
use the first substantive nested evaluation from the metadirective block.
For example, when the `vendor(llvm)` selector matches:
!$omp metadirective when(implementation={vendor(llvm)}: parallel do)
do i = 1, n
y(i) = a*x(i) + y(i)
end do
the selected `parallel do` variant is lowered with the DO loop that
[66 lines not shown]
[libc++] Fix instantiation of incomplete type when evaluating tuple comparisons (#204679)
Instantiating std::tuple<T...> in C++23 and later would require
computing tuple_size_v of the tuple type itself, because the
hidden-friend operator<=> and analogous comparison operators query it
for its return type. That can lead to a hard error if instantiating
tuple_size requires the type to be complete.
This patch resolves that problem by refactoring the metaprogramming
around these comparison operators. As a side effect, this should also be
slightly more efficient at compile-time because we don't cause the
instantiation of tuple_element for the current tuple.
rdar://179086119
[RISCV] Ignore Tune Features for Inlining (#205940)
Using the new InlineBehavior field of SubtargetFeature, ensure that
RISC-V's tuning related features do not prevent inlining.
Architecture features still prevent inlining.
[Hexagon] Add XQFloat code generation and post-RA QFP handling (#198902)
Introduce two new passes for the Hexagon HVX floating-point pipeline,
targeting v79+ where QFloat (qf16/qf32) is the native HVX FP format.
HexagonXQFloatGenerator lowers IEEE-754 HVX floating-point sequences
(sf/hf) to native QFloat (qf16/qf32) operations. QFloat instructions are
faster and more power-efficient than their IEEE counterparts, with
optional accuracy trade-offs. The pass exposes four modes:
* Strict IEEE-754 compliant
* IEEE-754 compliant (extended dynamic range and subnormal precision, no
IEEE-754 overflow handling)
* Lossy subnormals
* Legacy
HexagonPostRAHandleQFP runs after register allocation and corrects the
spill/refill paths. QFloat operands carry four extra precision bits that
are silently dropped if the value passes through a spill slot or a
[6 lines not shown]
[lldb] Move Diagnostics from Utility to Core (NFC) (#206152)
Nothing in the Utility or Host layers uses Diagnostics. Its only callers
are Debugger (the always-on log feeder), SBDebugger, and the
SystemInitializerCommon lifecycle. Those all live in Core or above. The
header depends only on Utility primitives (FileSpec, Log, Error), and
lldbInitialization already links lldbCore, so the move adds no new link
dependency anywhere.
Relocating it to Core lets Diagnostics reach Debugger, Target,
CommandInterpreter, and Host, which simplifies an upcoming change that
collect a richer diagnostics bundle (statistics, command snapshots,
invocation, etc) and allows us to implement that directly in the
Diagnostics class.
[libc] add shared multf3 builtin (#205670)
Re-exposes LLVM-libc's `__multf3` as `shared::multf3` for reuse by
compiler-rt's builtins.
Stacked change - merge these first:
- #200094
- #205669
Part of #197824
---------
Co-authored-by: Muhammad Bassiouni <60100307+bassiounix at users.noreply.github.com>
[Flang][OpenMP] readd enable-delayed-privatization-staging for implic… (#204466)
…t firstprivate
In e57ebfdaefa7c2ea660878984cfe5c739f626d6b the flag
enableDelayedPrivatizationStaging was removed, enabling
Delayed Privatization for firstprivate on OpenMP target regions,
this resulted in regressions for implicit firstprivate tests:
This commit readds enableDelayedPrivatizationStaging flag for the implicit
case and also guards the explicit change via
`enableDelayedPrivatization` instead of enableDelayedPrivatizationStaging.
[X86] Add target verifier
Add an X86 TargetVerify and register it by triple so the
TargetVerifierPass dispatches to it for X86 modules. It performs no
checks yet; the subtarget-dependent checks are added in a follow-up.
[mlir-c] Add IRMapping C API bindings
Expose IRMapping through the MLIR C API with full create/destroy/map,
lookup, contains/erase, and clone-with-mapping functionality.