Docsity

EECS 583 - Advanced Compilers, Slides of Compiler Design

Partial preview of the text

Download EECS 583 - Advanced Compilers and more Slides Compiler Design in PDF only on Docsity!

EECS 583 – Advanced Compilers

Course Overview,

Introduction to Control Flow

Analysis

Fall 2016, University of Michigan

September 12, 2016

About Me

v Lingjia Tang

v Research area: compiler/system/architecture

» Dynamic compiler » Datacenter » Clarity-lab: http://clarity-lab.org/

v Joined Michigan in 2013

v Before: UCSD, UVa

v Industry: Google

Class Overview

 This class is NOT about: » Programming languages » Compiler Frontend: Parsing, syntax checking, semantic analysis » Debugging » Simulation » Handling advanced language features – virtual functions, …  Compiler backend » Mapping applications to processor hardware » Analysis, optimizations, code generation » Retargetability – work for multiple platforms (not hard coded) » Work at the assembly-code level (but processor independent) » Speed/Efficiency  How to make the application run fast  Use less memory, efficiently execute  Parallelize, prefetch, optimize using profile information

Compilation Phases

Textbook

 No required text – Lecture notes, papers

 2 reference books: the Dragon book and

Muchnick

Other Material

 Course webpage + piazza

» http://www.eecs.umich.edu/courses/eecs » Lecture notes – available the night before class » Piazza – ask/answer questions, GSI and I will try to check regularly but may not be able to do so always  http://www.piazza.com

 LLVM compiler system

» LLVM webpage: http://www.llvm.org » Read the documentation! » LLVM users group

What the Class Will be Like (2)

 Learning compilers

» No memorizing definitions, terms, formulas, algorithms, etc » Learn by doing – Writing code » Substantial amount of programming  Fair learning curve for LLVM compiler » Reasonable amount of reading

 Classroom

» Attendance – You should be here » Discussion important  Work out examples, discuss papers, etc » Essential to stay caught up » Extra meetings outside of class to discuss projects

Course Grading

 Yes, everyone will get a grade

» Most (hopefully all) will get A’s and B’s » Slackers will be obvious

 Components

» Midterm exam – 25% » Project – 45% » Homeworks – 15% » Paper presentation – 10% » Class participation – 5%

Projects – Most Important Part of the Class

 Design and implement an “interesting” compiler technique and demonstrate its usefulness using LLVM  Topic/scope/work » 2 - 4 people per project (1 person , 5 persons allowed in some cases) » You will pick the topics (I have to agree) » You will have to  Read background material  Plan and design  Implement and debug  Deliverables » Working implementation » Project report: ~5 page paper describing what you did/results » 15 - 20 min presentation at end (demo if you want) » Project proposal (late Oct) and status report (late Nov) scheduled with each group during semester

Types of Projects

v New idea

» Small research idea » Design and implement it, see how it works

v Extend existing idea (most popular)

» Take an existing paper, implement their technique » Then, extend it to do something interesting  Generalize strategy, make more efficient/effective

v Implementation

» Take existing idea, create quality implementation in LLVM » Try to get your code released into main LLVM system

v Using other compilers/systems (GPUs, mobile phone,

etc.) is possible but need a good reason

Class Participation

 Interaction and discussion is essential in a

graduate class

» Be here » Don’t just stare at the wall » Be prepared to discuss the material » Have something useful to contribute

 Opportunities for participation

» Research paper discussions – thoughts, comments, etc » Saying what you think in project discussions outside of class » Solving class problems » Asking intelligent questions

Paper Reading

 How to read a research paper?

» What problem does the paper solve?  Is it an important problem? » Context of the paper? » What new insights does the paper provide?  Here’s some data that shows something that we didn’t know before about programs/architecture/compiler » What is the mechanism proposed in the paper? » What is the conclusion? » Are you convinced that the paper presents a good idea? » Does the paper raise any questions? » How to improve the paper?

GSI

 Animesh Jain([email protected])

 Office hours

» Location: ??

 LLVM help/questions

 But, you will have to be independent in this class

» Read the documentation and look at the code » Come to him when you are really stuck or confused » He cannot and will not debug everyone’s code » Helping each other is encouraged » Use the piazza group (Animesh and I will monitor this)

Contact Information

 Office: 4609 CSE

 Email: [email protected]

 Office hours

» Mon/Wed, 12-12:30 (right after class) » Or send me an email for an appointment

 Visiting office hrs

» Mainly help on classroom material, concepts, etc. » I am an LLVM novice, so likely I cannot answer any non-trivial question » See Animesh for LLVM details