LLVM: A compilation framework for lifelong program analysis & transformation
Top Cited Papers
- 10 June 2004
- conference paper
- conference paper
- Published by Institute of Electrical and Electronics Engineers (IEEE)
Abstract
We describe LLVM (low level virtual machine), a compiler framework designed to support transparent, lifelong program analysis and transformation for arbitrary programs, by providing high-level information to compiler transformations at compile-time, link-time, run-time, and in idle time between runs. LLVM defines a common, low-level code representation in static single assignment (SSA) form, with several novel features: a simple, language-independent type-system that exposes the primitives commonly used to implement high-level language features; an instruction for typed address arithmetic; and a simple mechanism that can be used to implement the exception handling features of high-level languages (and setjmp/longjmp in C) uniformly and efficiently. The LLVM compiler framework and code representation together provide a combination of key capabilities that are important for practical, lifelong analysis and transformation of programs. To our knowledge, no existing compilation approach provides all these capabilities. We describe the design of the LLVM representation and compiler framework, and evaluate the design in three ways: (a) the size and effectiveness of the representation, including the type information it provides; (b) compiler performance for several interprocedural problems; and (c) illustrative examples of the benefits LLVM provides for several challenging compiler problems.Keywords
This publication has 28 references indexed in Scilit:
- Continuous program optimizationACM Transactions on Programming Languages and Systems, 2003
- Which pointer analysis should I use?Published by Association for Computing Machinery (ACM) ,2000
- From system F to typed assembly languageACM Transactions on Programming Languages and Systems, 1999
- Scalable cross-module optimizationACM SIGPLAN Notices, 1998
- FX!32 a profile-directed binary translatorIEEE Micro, 1998
- Slim binariesCommunications of the ACM, 1997
- Simple and effective link-time optimization of Modula-3 programsACM SIGPLAN Notices, 1995
- Interprocedural optimizationACM Transactions on Programming Languages and Systems, 1993
- Efficiently computing static single assignment form and the control dependence graphACM Transactions on Programming Languages and Systems, 1991
- UNCOL: The myth and the factAnnual Review in Automatic Programming, 1961