Files
yosys/backends
Luke Wren 2b96cc5d38 CXXRTL: workaround LLVM regression in LoopRotatePass (fixes #4419)
Problem: LoopRotatePass applies a transformation to each loop which
has O(function size) cost due to invalidating some bookkeeping. CXXRTL
output is one huge function with thousands of loops. Most of these loops
are 1-trip but that doesn't help because loop elimination is after loop
rotation.

Fix is to add an `if` (with constexpr condition) for the common 1-word
case, to cause the loop to be DCE'd long before LoopRotatePass. This
does not seem to affect performance (at -O2) but reduces compile time
for Hazard by around 7.5x. Do this for the worst offenders: trunc, zext,
sext, rtrunc, rzext, which are used everywhere in slice and concat.

Arguably an upstream LLVM bug but it has been present since v18 at
least, so affects a lot of users.
2026-08-14 14:25:30 +01:00
..
2026-02-18 09:24:41 +01:00
2026-03-04 12:39:45 +01:00
2026-03-04 12:22:14 +01:00
2026-03-04 12:22:14 +01:00
2025-12-02 11:17:21 -08:00
2026-03-04 12:22:14 +01:00
2025-09-16 03:17:23 +00:00
2026-03-04 12:22:14 +01:00
2026-03-04 12:22:14 +01:00
2026-02-11 08:33:39 -08:00