NCG: fast compilation of very large strings (#16190)
This patch adds an optimization into the NCG: for large strings (threshold configurable via -fbinary-blob-threshold=NNN flag), instead of printing `.asciz "..."` in the generated ASM source, we print `.incbin "tmpXXX.dat"` and we dump the contents of the string into a temporary "tmpXXX.dat" file. See the note for more details.
Showing
- compiler/main/DynFlags.hs 6 additions, 0 deletionscompiler/main/DynFlags.hs
- compiler/nativeGen/PPC/Ppr.hs 1 addition, 2 deletionscompiler/nativeGen/PPC/Ppr.hs
- compiler/nativeGen/PprBase.hs 48 additions, 0 deletionscompiler/nativeGen/PprBase.hs
- compiler/nativeGen/SPARC/Ppr.hs 1 addition, 7 deletionscompiler/nativeGen/SPARC/Ppr.hs
- compiler/nativeGen/X86/Ppr.hs 1 addition, 3 deletionscompiler/nativeGen/X86/Ppr.hs
- docs/users_guide/using-optimisation.rst 16 additions, 0 deletionsdocs/users_guide/using-optimisation.rst
Loading
Please register or sign in to comment