Abstract
The Coconut code generator produces highly efficient assembly code, targeting signal processing applications such as Magnetic Resonance Imaging. It takes advantage of SIMD-parallelism, and captures as patterns assembly language “tricks” that produce very efficient, but highly convoluted code — the motivation is to beat the expert assembly tuner, while producing reliable output and maintainable input. On a growing set of benchmarks, it produces code with peak or near-peak efficiency.
To facilitate formal verification of the resulting code, the intermediate languages used in compilation are all variations on term hypergraphs (jungles) that we call “code graphs”. To verify the results of compilation, schedulable code graphs containing hyperedges labelled by instructions operating on vectors of components are transformed by replacing SIMD instructions with non-vector instructions, applying simplification rules, and comparing the result to specifications.
The authors thank CFI, OIT, NSERC and IBM Canada for financial support.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Anand, C.K., Kahl, W.: A Domain-Specific Language for the Generation of Optimized SIMD-Parallel Assembly Code. SQRL Report 43, McMaster University (2007), http://sqrl.mcmaster.ca/sqrl_reports.html
Anand, C.K., Kahl, W.: MultiLoop: Efficient Software Pipelining for Modern Hardware. In: CASCON 2007: Proc. 2007 Conference of the Center for Advanced Studies on Collaborative Research, pp. 260–263. ACM, New York (2007)
Corradini, A., Gadducci, F.: An Algebraic Presentation of Term Graphs, via GS-Monoidal Categories. Applied Categorical Structures 7(4), 299–331 (1999)
Enenkel, R.: A Comprehensive Test Environment for Mathematical Functions. IBM Technical Report TR-74.200, IBM Corp. (2004)
Hoffmann, B., Plump, D.: Jungle Evaluation for Efficient Term Rewriting. In: Gabrowski, J., Lescanne, P., Wechler, W. (eds.) ALP 1988. Mathematical Research, vol. 49, pp. 191–203. Akademie-Verlag (1988)
Kahl, W.: A Relation-Algebraic Approach to Graph Structure Transformation. Habil. Thesis, Informatik, UniBw München, Techn. Ber. 2002-03 (2001)
Kahl, W., Anand, C.K., Carette, J.: Control-Flow Semantics for Assembly-Level Data-Flow Graphs. In: MacCaull, W., Winter, M., Düntsch, I. (eds.) RelMiCS 2005. LNCS, vol. 3929, pp. 147–160. Springer, Heidelberg (2006)
Leviathan, R., Pnueli, A.: Validating Software Pipelining Optimizations. In: Compilers, Architecture, and Synthesis for Embedded Systems, CASES 2002, pp. 280–287. ACM, New York (2002)
IBM Corp. Synergistic Processor Unit Instruction Set Architecture. IBM Systems and Technology Group, Hopewell Junction, NY (2006)
Necula, G.C.: Translation validation for an optimizing compiler. In: Programming Language Design and Implementation (PLDI 2000), pp. 83–95. ACM, New York (2000)
Plump, D.: Term Graph Rewriting. In: Ehrig, H., Engels, G., Kreowski, H.J., Rozenberg, G. (eds.) Handbook of Graph Grammars and Computing by Graph Transformation. Applications, Languages and Tools, ch. 1, vol. 2, pp. 3–61. World Scientific, Singapore (1999)
Pnueli, A., Siegel, M., Singerman, E.: Translation Validation. In: Steffen, B. (ed.) TACAS 1998. LNCS, vol. 1384, pp. 151–166. Springer, Heidelberg (1998)
Püschel, M., Moura, J.M.F., et al.: SPIRAL: Code Generation for DSP Transforms. Proc. IEEE, Program Generation, Optimization, and Adaptation 93(2), 232–275 (2005) (special issue)
Schösser, A., Geiss, R.: Graph Rewriting for Hardware Dependent Program Optimisations. In: Schürr, A., Nagl, M., Zündorf, A. (eds.) AGTIVE 2007. LNCS, vol. 5088. Springer, Heidelberg (2007)
Sleep, M., Plasmeijer, M., van Eekelen, M. (eds.): Term Graph Rewriting: Theory and Practice. Wiley, Chichester (1993)
Ştefănescu, G.: Network Algebra. Springer, London (2000)
Thaller, W.: Explicitly Staged Software Pipelining. Master’s thesis, McMaster University, Department of Computing and Software (2006), http://sqrl.mcmaster.ca/~anand/papers/ThallerMScExSSP.pdf
The GAP Group. GAP – Groups, Algorithms, and Programming, Version 4.4.10 (2007), http://www.gap-system.org/
Tristan, J.B., Leroy, X.: Formal Verification of Translation Validators, A Case Study on Instruction Scheduling Optimizations. In: Principles of Programming Languages, POPL 2008, pp. 17–27. ACM, New York (2008)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Kumar Anand, C., Kahl, W. (2008). Code Graph Transformations for Verifiable Generation of SIMD-Parallel Assembly Code. In: Schürr, A., Nagl, M., Zündorf, A. (eds) Applications of Graph Transformations with Industrial Relevance. AGTIVE 2007. Lecture Notes in Computer Science, vol 5088. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-89020-1_16
Download citation
DOI: https://doi.org/10.1007/978-3-540-89020-1_16
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-89019-5
Online ISBN: 978-3-540-89020-1
eBook Packages: Computer ScienceComputer Science (R0)