A code-generator generator for Multi-Output Instructions

We address the problem of instruction selection for Multi-Output Instructions (MOIs), producing more than one result. Such inherently parallel hardware instructions are very common in the area of Application Specific Instruction Set Processors (ASIPs) and Digital Signal Processors (DSPs) which are frequently used in System-on-Chips as programmable cores. In order to provide high-level programmability, and consequently guarantee widespread acceptance, sophisticated compiler support for these programmable cores is of high importance. Since it is not possible to model MultiOutput Instructions as trees in the compiler's Intermediate Representation (IR), traditional approaches for code selection are not sufficient. Extending traditional code-generation approaches for MOI-selection is essentially a graph covering problem, which is known to be NP-complete. We present a new heuristic algorithm incorporated in a retargetable code-generator generator capable of exploiting arbitrary inherently parallel MOIs. We prove the concept by integrating the tool into the LCC compiler which has been targeted towards different Instruction Set Architectures based on the MIPS architecture. Several network applications as well as some DSP benchmarks were compiled and evaluated to obtain results.

[1]  Kurt Keutzer,et al.  Instruction selection using binate covering for code size optimization , 1995, Proceedings of IEEE International Conference on Computer Aided Design (ICCAD).

[2]  M. Anton Ertl Optimal code selection in DAGs , 1999, POPL '99.

[3]  Rainer Leupers,et al.  Architecture exploration for embedded processors with LISA , 2002 .

[4]  Christopher W. Fraser,et al.  BURG: fast optimal instruction selection and tree parsing , 1992, SIGP.

[5]  David S. Johnson,et al.  Computers and Intractability: A Guide to the Theory of NP-Completeness , 1978 .

[6]  Kurt Keutzer,et al.  Building ASIPs: The Mescal Methodology , 2006 .

[7]  T. C. May,et al.  Instruction-set matching and selection for DSP and ASIP code generation , 1994, Proceedings of European Design and Test Conference EDAC-ETC-EUROASIC.

[8]  Koichi Yamazaki,et al.  A note on greedy algorithms for the maximum weighted independent set problem , 2003, Discret. Appl. Math..

[9]  Scott A. Mahlke,et al.  Scalable subgraph mapping for acyclic computation accelerators , 2006, CASES '06.

[10]  Rainer Leupers,et al.  Instruction selection for embedded DSPs with complex instructions , 1996, Proceedings EURO-DAC '96. European Design Automation Conference with EURO-VHDL '96 and Exhibition.

[11]  Bernhard Scholz,et al.  Code Instruction Selection Based on SSA-Graphs , 2003, SCOPES.

[12]  Nikil D. Dutt,et al.  EXPRESSION: a language for architecture exploration through compiler/simulator retargetability , 1999, Design, Automation and Test in Europe Conference and Exhibition, 1999. Proceedings (Cat. No. PR00078).

[13]  Christopher W. Fraser,et al.  Engineering E cient Code Generators using Tree Matching and Dynamic Programming , 2007 .

[14]  Alfred V. Aho,et al.  Code generation using tree matching and dynamic programming , 1989, ACM Trans. Program. Lang. Syst..

[15]  Mike Tien-Chien Lee,et al.  Using register-transfer paths in code generation for heterogeneous memory-register architectures , 1996, 33rd Design Automation Conference Proceedings, 1996.

[16]  Kingshuk Karuri,et al.  ASIP Architecture Exploration for Efficient Ipsec Encryption: A Case Study , 2004, SCOPES.

[17]  Kingshuk Karuri,et al.  Fine-grained application source code profiling for ASIP design , 2005, Proceedings. 42nd Design Automation Conference, 2005..

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

[19]  Steven S. Muchnick,et al.  Advanced Compiler Design and Implementation , 1997 .