Concept-based optimization

Production compilers' optimizers typically operate at low abstraction levels, transformation rules enacting on operations on built-in types only. Transformations at higher levels of abstraction, on operations of types defined in libraries or by the user, are typically not supported. Such high-level optimizations could, however, yield greater benefits than first lowering the abstractions and subjecting the result to low-level transformations. Built-in compiler optimizations can in principle apply to user-defined types, if those types possess properties that guarantee that the optimizing transformations preserve the meaning of the program. The problem is conveying this information to the compiler in a non-disruptive manner. This article describes a framework for specifying and implementing generic "concept-based optimizations." The framework is based on careful categorization, applying the generic programming paradigm, of the algebraic properties that justify particular optimizing transformations. Our framework is built on top of ConceptGCC, a compiler implementing the new language features concept and concept map of the forthcoming standard C++. Concepts describe the syntactic and semantic properties of classes of types, for which generic semantics-preserving transformations can be defined. Concept maps establish memberships to these classes, enabling the generic optimizations for specific user-defined types.

[1]  Sorin Lerner,et al.  Automatically proving the correctness of compiler optimizations , 2003, PLDI '03.

[2]  Gabriel Valiente,et al.  Algorithms on Trees and Graphs , 2002, Springer Berlin Heidelberg.

[3]  Douglas Gregor,et al.  Proposed Wording for Concepts , 2007 .

[4]  Dennis Gannon,et al.  Active Libraries: Rethinking the roles of compilers and libraries , 1998, ArXiv.

[5]  Todd L. Veldhuizen,et al.  Active libraries and universal languages , 2004 .

[6]  Steven W. K. Tjiang,et al.  SUIF: an infrastructure for research on parallelizing and optimizing compilers , 1994, SIGP.

[7]  Clifford Stein,et al.  Introduction to Algorithms, 2nd edition. , 2001 .

[8]  R. K. Shyamasundar,et al.  Introduction to algorithms , 1996 .

[9]  Todd L. Veldhuizen,et al.  Arrays in Blitz++ , 1998, ISCOPE.

[10]  Ken Kennedy,et al.  Telescoping Languages: A System for Automatic Generation of Domain Languages , 2005, Proceedings of the IEEE.

[11]  Steve Karmesin,et al.  Array Design and Expression Evaluation in POOMA II , 1998, ISCOPE.

[12]  Alexander A. Stepanov,et al.  C++ Standard Template Library , 2000 .

[13]  C. Robert Morgan,et al.  Building an Optimizing Compiler , 1998 .

[14]  Geert-Jan Giezeman,et al.  On the design of CGAL a computational geometry algorithms library , 2000 .

[15]  Calvin Lin,et al.  Broadway: A Compiler for Exploiting the Domain-Specific Semantics of Software Libraries , 2005, Proceedings of the IEEE.

[16]  T. S. Blyth Set theory and abstract algebra , 1975 .

[17]  Jason Merrill Generic and gimple: A new tree represen-tation for entire functions , 2003 .

[18]  Jeremy G. Siek,et al.  The Matrix Template Library: generic components for high-performance scientific computing , 1999, Comput. Sci. Eng..

[19]  Ken Kennedy,et al.  Telescoping Languages: A Strategy for Automatic Generation of Scientific Problem-Solving Systems from Annotated Libraries , 2001, J. Parallel Distributed Comput..

[20]  Magne Haveraaen,et al.  Design of the CodeBoost transformation system for domain-specific optimisation of C++ programs , 2003, Proceedings Third IEEE International Workshop on Source Code Analysis and Manipulation.

[21]  Michael J. Vilot,et al.  Standard template library , 1996 .

[22]  Mark A. Williams,et al.  The Bioinformatics Template Library—generic Components for Biocomputing , 2001 .

[23]  Bjarne Stroustrup,et al.  Concepts: linguistic support for generic programming in C++ , 2006, OOPSLA '06.

[24]  Bronis R. de Supinski,et al.  Semantic-Driven Parallelization of Loops Operating on User-Defined Containers , 2003, LCPC.

[25]  Sibylle Schupp,et al.  Semantic and behavioral library transformations , 2002, Inf. Softw. Technol..

[26]  Nancy M. Amato,et al.  STAPL: An Adaptive, Generic Parallel C++ Library , 2001, LCPC.

[27]  Magne Haveraaen,et al.  An algebraic programming style for numerical software and its optimization , 2000, Sci. Program..

[28]  Andrew Lumsdaine,et al.  Effecting parallel graph eigensolvers through library composition , 2006, Proceedings 20th IEEE International Parallel & Distributed Processing Symposium.

[29]  John M. Mellor-Crummey,et al.  FIAT: A Framework for Interprocedural Analysis and Transfomation , 1993, LCPC.

[30]  Todd L. Veldhuizen,et al.  Expression templates , 1996 .

[31]  Jaakko Järvi,et al.  Library composition and adaptation using c++ concepts , 2007, GPCE '07.

[32]  Eelco Visser,et al.  Stratego: A Language for Program Transformation Based on Rewriting Strategies , 2001, RTA.

[33]  John C. Mitchell,et al.  Foundations for programming languages , 1996, Foundation of computing series.

[34]  Jeremy G. Siek,et al.  The Boost Graph Library - User Guide and Reference Manual , 2001, C++ in-depth series.