15-‑411/15-‑611 ¡ Compiler ¡Design ¡
Robert ¡Simmons, ¡Instructor ¡Fall ¡2015 ¡ hAps://www.cs.cmu.edu/~rjsimmon/15411-‑f15 ¡
1 ¡
15-411/15-611 Compiler Design Robert Simmons, Instructor - - PowerPoint PPT Presentation
15-411/15-611 Compiler Design Robert Simmons, Instructor Fall 2015 hAps://www.cs.cmu.edu/~rjsimmon/15411-f15 1 Whos here? Me: Rob Simmons, GHC 9101
1 ¡
2 ¡
3 ¡
4 ¡
5 ¡
6 ¡
7 ¡
8 ¡
9 ¡
10 ¡
11 ¡
– How ¡are ¡your ¡high-‑level ¡programs ¡translated ¡to ¡low-‑level ¡hardware ¡ instrucaons? ¡ – How ¡do ¡you ¡cope ¡with ¡decisions ¡made ¡for ¡version ¡1 ¡of ¡the ¡so5ware ¡ when ¡you’re ¡working ¡on ¡version ¡3? ¡ – Approach: ¡many ¡versions ¡of ¡the ¡SAME ¡kind ¡of ¡project. ¡
– How ¡is ¡the ¡execuaon ¡of ¡your ¡programs ¡managed? ¡ – How ¡do ¡you ¡maintain ¡abstracHon ¡and ¡interfaces ¡when ¡the ¡ environment ¡is ¡set ¡against ¡you ¡at ¡every ¡turn? ¡ – Approach: ¡small ¡number ¡of ¡LARGE, ¡RELATED ¡projects, ¡ ¡ along ¡with ¡in-‑depth ¡code ¡review. ¡
– How ¡do ¡programs ¡communicate? ¡ – How ¡do ¡humans ¡cope ¡with ¡the ¡bewildering ¡number ¡of ¡approaches ¡to ¡ the ¡fundamental ¡problem ¡that ¡computers ¡aren’t ¡in ¡the ¡same ¡place? ¡ – Approach: ¡small ¡number ¡of ¡UNIQUE, ¡COMPLEX ¡projects. ¡
12 ¡
13 ¡
14 ¡
15 ¡
16 ¡
17 ¡
18 ¡
19 ¡
20 ¡
21 ¡
SOURCE ¡CODE ¡ x86-‑64 ¡ASSEMBLEY ¡
Object ¡code ¡for ¡runame ¡ Object ¡code ¡for ¡libraries ¡ Object ¡Code ¡
Executable ¡file ¡
22 ¡
Front ¡ Back ¡ Middle ¡ SOURCE ¡CODE ¡ TOKEN ¡STREAM ¡ ABSTRACT ¡ SYNTAX ¡TREE ¡ INTERMEDIATE ¡ REPRESENTATION(S) ¡ x86-‑64 ¡ASSEMBLEY ¡
OpHmize! ¡ (Convert ¡between ¡ ¡ representaHons?) ¡ ¡ Lexical ¡Analysis ¡ Parsing ¡ Typecheck, ¡isolate ¡ ¡ effects, ¡generate ¡ intermediate ¡rep. ¡
ABSTRACT ¡ ASSEMBLY ¡ ABSTRACT? ¡ ASSEMBLY ¡
Register ¡ ¡ AllocaHon ¡ InstrucHon ¡ SelecHon ¡
23 ¡
Front ¡ Middle ¡ SOURCE ¡CODE ¡ TOKEN ¡STREAM ¡ ABSTRACT ¡ SYNTAX ¡TREE ¡ INTERMEDIATE ¡ REPRESENTATION ¡
Lexical ¡Analysis ¡ Parsing ¡ Typecheck, ¡ ¡ generate ¡ intermediate ¡rep. ¡
ABSTRACT ¡ ASSEMBLY ¡
InstrucHon ¡ SelecHon ¡
24 ¡
25 ¡