circt icon indicating copy to clipboard operation
circt copied to clipboard

[Arc] Split large LLVM functions

Open fabianschuiki opened this issue 2 years ago • 0 comments
trafficstars

Arcilator has a tendency to produce very large LLVM functions in its output. For example, pretty much an entire clock domain will be grouped into a single function, which for large designs can be millions of LLVM IR ops in size. These cause massive compilation slowdowns (some parts of LLVM scale fairly poorly for excessively large functions -- e.g. O(n³) in regalloc, IIRC).

To fix this, add a pass that splits large functions up into smaller ones. This could be as simple as putting the ops in large functions into groups, and then outlining these groups into separate functions.

fabianschuiki avatar Oct 17 '23 16:10 fabianschuiki