DOC PREVIEW
Columbia COMS W4115 - Where’s My Compiler

This preview shows page 1-2-3-22-23-24-44-45-46 out of 46 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 46 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Where’s My Compiler?OutlineWhat Is A Compiler?A CompilerFigures of MeritSlide 61950s: Just a Compiler, PleaseInside the Compiler (in concept)Slide 9Slide 101960s: LinkersTools: Compiler + Linker1970s: Symbolic DebuggerCompiler, Linker, Debugger1980s: Dynamic Loading, ThreadingOS Dynamic Loader1990s: JITs and Managed RuntimesOS Dynamic Loader (repeat)Slide 19Managed RuntimeSlide 212000s: Reflection-based ComputationRuntime ReflectionSlide 241970: NumblesSlide 26Special-Purpose CompilersMark-up CompilersSlide 29Modern Hardware: CPUModern Hardware: GraphicsSlide 32DatabasesHardware EmulatorsCode Analysis Tools“Tree Shakers”Slide 37A Modern Interactive Development Environment (IDE)Compilers in the IDE (I)Compilers In the IDE (II)Compilers in the LinkerProfile-Guided OptimizationSlide 43For the DeveloperFor the Compiler WriterQuestions?Where’s My Compiler?Developer tools: past, present, and futureJim MillerSoftware Architect, Developer FrameworksMicrosoft Corporation(with help from Carol Eidt, Phoenix Project, Microsoft Corporation)Jan 14, 2019 Where's My Compiler? 2OutlineWhat Is A Compiler?What Is A Compiler?A Brief History of Developer ToolsMy First CompilerCompilers, compilers, everywhereJan 14, 2019 Where's My Compiler? 3What Is A Compiler?A converter from one representation (source code) to another (executable code)Preserves (most of) the meaning of the sourceOne part of a modern “tool chain” used to produce executable artifacts (applications)Jan 14, 2019 Where's My Compiler? 4A CompilerCompilerSource CodeDescribes desired behaviorExecutableCodeHas desired behavior, but• May have different internal structure• May execute in different (unobservable) orderJan 14, 2019 Where's My Compiler? 5Figures of MeritCode Quality: how efficient is the generated code?Speed and Space: these aren’t independent, but they aren’t the same eitherThroughput: how fast is the code generated?Footprint: how large is the compiler?Jan 14, 2019 Where's My Compiler? 6OutlineWhat Is A Compiler?A Brief History of Developer A Brief History of Developer ToolsToolsMy First CompilerCompilers, compilers, everywhereJan 14, 2019 Where's My Compiler? 71950s: Just a Compiler, PleaseThe compiler references a runtime, but the runtime is supplied by the OS at a fixed location in memoryFORTRAN runtime: input/output formattingCOBOL runtime: also search and sortOS loader loads the compiler output into memory, transfers controlAddress space is small (< 8K word), CPU is slow (< 1,000 instructions/sec.)Figure of merit: Code QualityCompiler must optimize code for spaceCompiler must optimize code for speedJan 14, 2019 Where's My Compiler? 8Inside the Compiler (in concept)Source CodeFront EndBack EndExecutableCodeCompilerJan 14, 2019 Where's My Compiler? 9Inside the Compiler (in concept)Source CodeBack EndExecutableCodeCompilerFront End• Parse source code• Produce abstract syntax tree (AST)• Produce symbol table• Generate errors• Syntax errors• Type errors• Unbound referencesJan 14, 2019 Where's My Compiler? 10Inside the Compiler (in concept)Source CodeExecutableCodeCompiler• Linearize parse tree• Code Analysis• Basic block analysis• Control- and data-flow graph analysis• Optimize (machine-independent)• Redundant and dead code elimination• Code restructuring• Convert to executable code• Register allocation• Peephole optimization• Branch prediction and tensioningBack EndFront EndJan 14, 2019 Where's My Compiler? 111960s: LinkersPrograms are growing in sizePrograms are built with librariesLibraries provide reusable code fragmentsVirtual memory systems are inventedTool chain is in two stagesCompile independent modulesCombine the modules using a linkerFigure of merit: Code quality (speed)Jan 14, 2019 Where's My Compiler? 12Includes external referencesTools: Compiler + LinkerSource CodeFront EndBack EndObject CodeCompilerSource CodeFront EndBack EndObject CodeSource CodeFront EndBack EndObject CodeLinkerExecutable CodeJan 14, 2019 Where's My Compiler? 131970s: Symbolic DebuggerOS written in high-level languageCompilers provide sufficient code performance and low-level accessHigh-level languages provide large runtime libraries in multiple unitsStatic linker pulls only required units into a given program imageCompiler exports symbol table for use by debugger, not just internal to front-/back-endFigure of merit: Code quality (speed)Jan 14, 2019 Where's My Compiler? 14Compiler, Linker, DebuggerSource CodeFront EndBack EndObject CodeCompilerSource CodeFront EndBack EndObject CodeSource CodeFront EndBack EndObject CodeLinkerRunning ProgramSymbol table(s)DebuggerJan 14, 2019 Where's My Compiler? 151980s: Dynamic Loading, ThreadingTo improve OS performance, by reducing physical memory pressure, read/only parts of libraries are shared between applicationsLoaded on first referenceOS loader fixes up references to shared libraries – just like the static linkersNot all libraries are loaded into the same virtual addressConcurrency issues addressed in programming languagesLocks, monitors, events, pollingOrder of operations visible across thread boundariesMemory model semantics become an issueAda™ introduces rendez-vous, other languages have other constructsTool chainCompiler(s)LinkerLoaderSymbolic debuggerFigure of merit: Code quality (speed, but this is related to space)Jan 14, 2019 Where's My Compiler? 16OS Dynamic LoaderSource CodeFront EndBack EndObject CodeCompilerSource CodeFront EndBack EndObject CodeSource CodeFront EndBack EndObject CodeStatic LinkerOS LoaderRunning ProgramSymbol table(s)DebuggerIncludes fixups for shared codeImage FileImage File Image FileJan 14, 2019 Where's My Compiler? 171990s: JITs and Managed RuntimesGarbage Collection goes mainstreamPreviously: LISP, APL, SmallTalk1990s: Java, Jscript, C#, VBVerification requires runtime to analyze codeVerification is similar to front-end compiler workCan be done to native code, but much simpler with an intermediate languageJust-in-time (JIT) compilation increases performance over pure interpretationTypically by a factor of 5 to 15Tool chain: split the compiler in two!Linearize the AST to create Intermediate Language (IL)Save symbol table as “metadata”Reorder the chainFigures of merit: Throughput first, code quality secondJan


View Full Document

Columbia COMS W4115 - Where’s My Compiler

Documents in this Course
YOLT

YOLT

13 pages

Lattakia

Lattakia

15 pages

EasyQL

EasyQL

14 pages

Photogram

Photogram

163 pages

Espresso

Espresso

27 pages

NumLang

NumLang

6 pages

EMPATH

EMPATH

14 pages

La Mesa

La Mesa

9 pages

JTemplate

JTemplate

238 pages

MATVEC

MATVEC

4 pages

TONEDEF

TONEDEF

14 pages

SASSi

SASSi

16 pages

JTemplate

JTemplate

39 pages

BATS

BATS

10 pages

Synapse

Synapse

11 pages

c.def

c.def

116 pages

TweaXML

TweaXML

108 pages

Load more
Download Where’s My Compiler
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Where’s My Compiler and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Where’s My Compiler 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?