LLVM Primer Rupesh Nasre Jan 12 2011 Slides
- Slides: 12
LLVM Primer Rupesh Nasre. Jan 12, 2011 Slides and examples available at http: //clweb. csa. iisc. ernet. in/nasre/tech/research/
Outline Introduction Writing a pass Writing an analysis
Introduction What is LLVM? More information: llvm. org
Is LLVM active? Year 2003 2004 2005 2006 2007 2008 2009 2010 2011 Number of releases 2 3 2 3 2 2 Not yet Current version: 2. 8
LLVM reach Year 2003 2004 2005 2006 2007 2008 2009 2010 2011 Number of user publications 2 5 14 13 16 30 50 29 Not yet Used by Adobe, Apple, Cray, NIC, Siemens, Sun, etc. Used in CMU, Ghent, NTU, Rice, Stanford, UC, UIUC, Upenn, Utexas, etc.
Compilation Phases Frontend: Source -> IR Optimizations: IR -> IR Code generation: IR -> x 86 In this course
Compilation Phases Frontend: Source -> IR Optimizations: IR -> IR Code generation: IR -> x 86 In this talk
Outline Introduction Writing a pass Writing an analysis
Writing a pass Install: doesn't require root privileges. LLVM-GCC Compile example to bytecode. Create the pass compile to. so load using opt run on the example bytecode
Outline Introduction Writing a pass Writing an analysis
Summary LLVM is a thick forest, you can easily get lost. After initial warm-up, it is better to look at the documentation on demand-basis. Use LLVM mailing lists; first search for your question. It is C++, compilation errors are non-decipherable. LLVM type system is strong. Avoid a quick type-cast now and you will save 2 hours of debugging tomorrow. Your assignments would take time: start early.
LLVM Primer Rupesh Nasre. nasre@csa. iisc. ernet. in Jan 12, 2011