[libc] Enable UNIT_TEST_ONLY tests in hermetic mode (#213860)
This mainly consists of removing the UNIT_TEST_ONLY lines as previous
patches made sure the tests work. The only slightly nontrivial part is
adding support for C_TEST to the hermetic test macro.
After this, the only UNIT_TEST_ONLY tests are those that require the
MPFR library.
[TailRecElim] Introduce support for shift accumulator optimization (#181331)
This PR enables Tail Recursion Elimination (TRE) for functions where the
accumulator operation is a shift (`shl`, `lshr`, `ashr`) by a constant
amount -- i.e., pseudo-associative relation.
As pointed out in #178805, `InstCombine` often strength-reduces
multiplications (or `f(x-1) + f(x-1)`) into `shl`.
Currently, TRE strictly requires operations to be associative and
commutative:
https://github.com/llvm/llvm-project/blob/05e908609227e1e8d993659e604a63668dfd2825/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp#L377-L379
This prevents TRE from transforming recursive shifts into loops,
creating a phase-ordering problem where canonicalization blocks a
structural optimization.
This PR does **not** perform shift accumulator optimization when there
are multiple base cases: it is reserved for future work.
Fixes #178805.
[AMDGPU] Insert exec-forced V_NOP after V_PERM_PK16 (gfx1250 hazard)
On gfx1250 the V_PERM_PK16 family (V_PERM_PK16_B4/B6/B8_U4) has a hazard:
the instruction must be immediately followed by a "safe" instruction that
issues on the pipe which clears the hazard. Insert V_NOP with forced
non-zero EXEC as needed.
Assisted-by: Opus 4.8 Medium
gpio: add Intel Tiger Lake-H GPIO driver
Add a GPIO driver for the Intel Tiger Lake-H platform based on the generic
intelgpio framework. The driver defines five GPIO communities with pad groups
GPP_A through GPP_K, vGPIO and JTAG, and matches ACPI hardware ID INT34C6.
The kernel module build infrastructure and the wiring into files.x86 are
included.
Reviewed by: vexeduxr
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Pull Request: https://github.com/freebsd/freebsd-src/pull/2205
gpio: add Intel Alder Lake-N GPIO driver
Add a GPIO driver for the Intel Alder Lake-N platform based on the generic
intelgpio framework. The driver provides pad group definitions for four GPIO
communities covering groups GPP_A through GPP_T, vGPIO and HVCMOS, and matches
ACPI hardware IDs INTC1056, INTC1057 and INTC1085. The kernel module build
infrastructure and the wiring into files.x86 are included.
Reviewed by: vexeduxr
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Pull Request: https://github.com/freebsd/freebsd-src/pull/2205
gpio: add generic Intel GPIO pin controller framework
Add a platform-independent driver framework for Intel GPIO pin controllers
found on modern Intel SoCs. The driver accesses GPIO pad registers through
ACPI-provided memory-mapped resources and implements the gpio interface [1]
including pin enumeration, capability reporting, configuration, and
read/write/toggle operations. A common data model of communities and pad groups
allows individual SoC-specific drivers to supply their own pad tables and ACPI
hardware IDs while sharing all register-level logic.
[1] https://wiki.freebsd.org/GPIO
Reviewed by: vexeduxr
MFC after: 1 week
Sponsored by: Beckhoff Automation GmbH & Co. KG
Pull Request: https://github.com/freebsd/freebsd-src/pull/2205
[AMDGPU] Insert exec-forced V_NOP after V_PERM_PK16 (gfx1250 hazard)
On gfx1250 the V_PERM_PK16 family (V_PERM_PK16_B4/B6/B8_U4) has a hazard:
the instruction must be immediately followed by a "safe" instruction that
issues on the pipe which clears the hazard. Insert V_NOP with forced
non-zero EXEC as needed.
Assisted-by: Opus 4.8 Medium
[flang][MIF] Fix team_type usage in all MIF operations #205953 (#214207)
This PR resolves the issue #205953. Its purpose is to correct the use of
`team_type` by lowering it to Addr rather than to Box.
[ORC] Start decoupling MangleAndInterner from DataLayout. (#214398)
Previously MangleAndInterner held a DataLayout reference and mangled
names via Mangler::getNameWithPrefix. Replace the stored DataLayout with
an internal ManglingMode enum and mangle from that directly, so the
class no longer needs to hold a DataLayout.
Add two DataLayout-free constructors: one taking an ExecutionSession and
an optional ABI name (deriving the mode from the session's target
triple), and one taking an explicit ManglingMode. The existing
DataLayout constructor is retained, now deriving the mode from the
DataLayout.
This lets MangleAndInterner be used where no DataLayout is available
(e.g. from a bare ExecutionSession).
Adds MangleAndInternerTest covering the triple- and mode-based
construction paths.