Docsity

EECS 583 – Advanced Compilers, Lecture notes of Compiler Design

Partial preview of the text

Download EECS 583 – Advanced Compilers and more Lecture notes Compiler Design in PDF only on Docsity!

EECS 583 – Advanced Compilers

Course Overview,

Introduction to Control Flow

Analysis

Fall 2017, University of Michigan

September 6, 2017

About Me

❖ Lingjia Tang

❖ Research area: compiler/system/architecture

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

❖ Joined Michigan in 2013

❖ Before: UCSD, UVa

❖ Industry: Google

Compilation Phases

Background You Should Have

❖ 1. Programming » Good C++ programmer (essential) » Linux, gcc, emacs » Debugging experience – hard to debug with printf’s alone – gdb! ❖ 2. Computer architecture » EECS 370 is good, 470 is better but not essential » Basics – caches, pipelining, function units, registers, virtual memory, branches, multiple cores, assembly code ❖ 3. Compilers » Frontend stuff is not very relevant for this class » Basic backend stuff we will go over fast Ÿ Non-EECS 483 people will have to do some supplemental reading

Other Material

❖ Course piazza

» 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 » piazza.com/umich/fall2017/eecs583/home

❖ LLVM compiler system

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

What the Class Will be Like

❖ Class meeting time – 10:30 – 12:30, MW

» 2 hrs is hard to handle » We’ll stop at 12:00, most of the time

❖ Core backend stuff

» Text book material – some overlap with 483 » 2 homeworks to apply classroom material

❖ Research papers

» Last 1/ rd of the semester, students take over » I will recommend papers of several topics » Select paper related to your project – entire class is expected to read the paper » Each project team - presents 1 paper. 20 min presentation + 5 min Q&A.

Course Grading

❖ Yes, everyone will get a grade

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

❖ Components

» Project – 45% » Homeworks – 30% » Paper presentation – 20% » Class participation – 5%

Homeworks

❖ 2 of these » 1 small &1 hard programming assignment » Design and implement something we discussed in class ❖ Goals » Learn the important concepts » Learn the compiler infrastructure so you can do the project ❖ Grading » Working testcases?, Does anything work? Level of effort? ❖ Working together on the concepts is fine » Make sure you understand things or it will come back to bite you » Everyone must do and turn in their own assignment

Types of Projects

❖ New idea

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

❖ 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

❖ Implementation

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

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

etc.) is possible but need a good reason

Topic Areas (You are Welcome to Propose Others)

❖ Memory system performance » Instruction/data prefetching » Use of scratchpad memories ❖ Automatic parallelization » Loop parallelization » Vectorization/SIMDization ❖ Reliability » Reducing AVF » Application-specific techniques ❖ Power » Identification of power- intensive computation » Instruction scheduling techniques to reduce power ❖ Multicore/manycore/GPU » Cache contention ❖ For the adventurous - Dynamic optimization » DynamoRIO » Protean Code » Run-time parallelization or other optimizations are interesting » Hybrid processors: Transmeta style processor (Nvidia’s Denver) ❖ Approximate computing ❖ Machine learning

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?

Compiler conferences

❖ CGO: Code Generation and Optimization

❖ PLDI: Programming Language Design and

Implementation

❖ MICRO: International Symposium on

Microarchitecture

❖ ASPLOS:

❖ PACT:

❖ PPoPP