androm3da · GitHub

@androm3da

Closed

HexagonOptAddrMode and HexagonRDFOpt use the RDF dataflow graph whose
getAllRealUses traversal is quadratic in the number of instructions
when a single physical register has many uses.  The existing guard
only checks the number of basic blocks (RDFFuncBlockLimit = 1000),
which is insufficient for functions with few blocks but thousands of
instructions (e.g. rkvdec_h264_run from the Linux kernel has 21
blocks but 8000+ instructions after register allocation).
Add an instruction count limit (rdf-instr-limit, default 6000) that
complements the basic block limit, applied to both HexagonOptAddrMode
and HexagonRDFOpt.  This prevents the compile-time hang reported in
issue llvm#178535 where amode-opt would run for minutes on a single large
function.

@androm3da

@androm3da androm3da changed the title [RegisterCoalescer] Fix compile-time blowup with partially-reserved physregs draft: [RegisterCoalescer] Fix compile-time blowup with partially-reserved physregs

Feb 17, 2026

@androm3da androm3da changed the title draft: [RegisterCoalescer] Fix compile-time blowup with partially-reserved physregs draft: [Hexagon] Fix compile-time blowup with partially-reserved physregs

Feb 17, 2026

arsenm

Read the original on github.com ↗