GaloisInc / dismantle

A library of assemblers and disassemblers derived from LLVM TableGen data
24 stars 5 forks source link

Improve compilation times of disassemblers #33

Closed travitch closed 3 years ago

travitch commented 3 years ago

This uses an ostensibly more efficient literal format in newer versions of GHC (see the Template Haskell changes). The bigger factor, however, was forcing the binary blob threshold lower (and possibly removing the -O0, which may have been inhibiting that binary blob optimization).

The binary blob optimization[1] avoids putting large data literals into generated assembly files and instead just puts them in external files that are included via directive. This saves a huge amount of parsing time in the assembler (shaving about 5 minutes off of the compilation time of dismantle-arm-xml).

[1] https://gitlab.haskell.org/ghc/ghc/-/merge_requests/143/diffs