An instruction for direct interpretation of LZ77‐compressed programs

A new instruction adapts LZ77 compression for use inside running programs. The instruction economically references and reuses code fragments that are too small to package as conventional subroutines. The compressed code is interpreted directly, with neither prior nor on‐the‐fly decompression. Hardware implementations seem plausible and could benefit both memory‐constrained and more conventional systems. The method is extremely simple. It has been added to a pre‐existing, bytecoded instruction set, and it added only 10 lines of C to the bytecode interpreter. It typically cuts code size by a third; that is, typical compression ratios are roughly 0.67×. More ambitious compressors are available, but they are more complex, which retards adoption. The current method offers a useful trade‐off to these more complex systems. Copyright © 2005 John Wiley & Sons, Ltd.

[1]  Amir Roth,et al.  A DISE implementation of dynamic code decompression , 2003, LCTES.

[2]  Todd M. Austin,et al.  The SimpleScalar tool set, version 2.0 , 1997, CARN.

[3]  Christopher W. Fraser An instruction for direct interpretation of LZ77-compressed programs , 2006 .

[4]  John T. Robinson,et al.  Cache-Memory Interfaces in Compressed Memory Systems , 2001, IEEE Trans. Computers.

[5]  Michael Franz,et al.  Slim binaries , 1997, CACM.

[6]  Majid Sarrafzadeh,et al.  Instruction Selection for Compilers that Target Architectures with Echo Instructions , 2004, SCOPES.

[7]  Steven Lucco,et al.  Split-stream dictionary program compression , 2000, PLDI '00.

[8]  David A. Huffman,et al.  A method for the construction of minimum-redundancy codes , 1952, Proceedings of the IRE.

[9]  Xiaowei Shen,et al.  Performance of hardware compressed main memory , 2001, Proceedings HPCA Seventh International Symposium on High-Performance Computer Architecture.

[10]  David R. Ditzel,et al.  The hardware architecture of the CRISP microprocessor , 1987, ISCA '87.

[11]  Mario Latendresse Automatic Generation of Compact Programs and Virtual Machines for Scheme , 2000 .

[12]  Marc Feeley,et al.  Generation of fast interpreters for Huffman compressed bytecode , 2003, IVME '03.

[13]  Youfeng Wu,et al.  Echo Technology ( ET ) for Memory Constrained CISC Processors , 2004 .

[14]  Peter M. Fenwick,et al.  Ziv-Lempel encoding with multi-bit flags , 1993, [Proceedings] DCC `93: Data Compression Conference.

[15]  Keith D. Cooper,et al.  Enhanced code compression for embedded RISC processors , 1999, PLDI '99.

[16]  Thomas M. Conte,et al.  Compiler-driven cached code compression schemes for embedded ILP processors , 1999, MICRO-32. Proceedings of the 32nd Annual ACM/IEEE International Symposium on Microarchitecture.

[17]  Bjorn De Sutter,et al.  Compiler techniques for code compaction , 2000, TOPL.

[18]  Stan Y. Liao,et al.  Code generation and optimization for embedded digital signal processors , 1996 .

[19]  James R. Larus,et al.  Using Lightweight Procedures to Improve Instruction Cache Performance , 1999 .

[20]  Christopher W. Fraser,et al.  A Retargetable C Compiler: Design and Implementation , 1995 .

[21]  Brad Calder,et al.  Reducing code size with echo instructions , 2003, CASES '03.

[22]  Todd A. Proebsting Optimizing an ANSI C interpreter with superoperators , 1995, POPL '95.

[23]  Lex Augusteijn,et al.  A code compression system based on pipelined interpreters , 1999, Softw. Pract. Exp..

[24]  Abraham Lempel,et al.  A universal algorithm for sequential data compression , 1977, IEEE Trans. Inf. Theory.

[25]  Kurt Keutzer,et al.  A text-compression-based method for code size minimization in embedded systems , 1999, TODE.

[26]  Trevor N. Mudge,et al.  Improving code density using compression techniques , 1997, Proceedings of 30th Annual International Symposium on Microarchitecture.

[27]  Trevor N. Mudge,et al.  Reducing code size with run-time decompression , 2000, Proceedings Sixth International Symposium on High-Performance Computer Architecture. HPCA-6 (Cat. No.PR00550).

[28]  Christopher W. Fraser,et al.  Analyzing and compressing assembly code , 1984, SIGPLAN '84.

[29]  Christopher W. Fraser,et al.  Bytecode compression via profiled grammar rewriting , 2001, PLDI '01.

[30]  Brian Parker Tunstall,et al.  Synthesis of noiseless compression codes , 1967 .