Advanced Compilers CMPSCI 710 Spring 2003 Lecture 1

Slides:



Advertisements
Similar presentations
Code Optimization and Performance Chapter 5 CS 105 Tour of the Black Holes of Computing.
Advertisements

School of EECS, Peking University “Advanced Compiler Techniques” (Fall 2011) SSA Guo, Yao.
Compilation 2011 Static Analysis Johnni Winther Michael I. Schwartzbach Aarhus University.
ECE 454 Computer Systems Programming Compiler and Optimization (I) Ding Yuan ECE Dept., University of Toronto
Advanced Compiler Design CSE 231 Instructor: Sorin Lerner.
Dynamic Typing COS 441 Princeton University Fall 2004.
Program Representations. Representing programs Goals.
CS 330 Programming Languages 10 / 16 / 2008 Instructor: Michael Eckmann.
Recap from last time We were trying to do Common Subexpression Elimination Compute expressions that are available at each program point.
Representing programs Goals. Representing programs Primary goals –analysis is easy and effective just a few cases to handle directly link related things.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
CS 536 Spring Intermediate Code. Local Optimizations. Lecture 22.
Administrative info Subscribe to the class mailing list –instructions are on the class web page, click on “Course Syllabus” –if you don’t subscribe by.
Advanced Compilers CSE 231 Instructor: Sorin Lerner.
Advanced Compilers CSE 231 Instructor: Sorin Lerner.
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Advanced Compilers CSE 231 Instructor: Sorin Lerner.
Data Flow Analysis Compiler Design October 5, 2004 These slides live on the Web. I obtained them from Jeff Foster and he said that he obtained.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
U NIVERSITY OF M ASSACHUSETTS, A MHERST D EPARTMENT OF C OMPUTER S CIENCE Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
Intermediate Code. Local Optimizations
Prof. Fateman CS164 Lecture 211 Local Optimizations Lecture 21.
Lecture 1CS 380C 1 380C Last Time –Course organization –Read Backus et al. Announcements –Hadi lab Q&A Wed 1-2 in Painter 5.38N –UT Texas Learning Center:
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
Recap from last time We saw various different issues related to program analysis and program transformations You were not expected to know all of these.
Language Issues Misunderstimated? Sublimable? Hopefuller? "I know how hard it is for you to put food on your family.” "I know the human being and fish.
CS102 Introduction to Computer Programming
High level & Low level language High level programming languages are more structured, are closer to spoken language and are more intuitive than low level.
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2011 Course Overview John Cavazos University.
U NIVERSITY OF M ASSACHUSETTS, A MHERST D EPARTMENT OF C OMPUTER S CIENCE Emery Berger University of Massachusetts, Amherst Advanced Compilers CMPSCI 710.
CS 330 Programming Languages 09 / 04 / 2008 Instructor: Michael Eckmann.
1 ENERGY 211 / CME 211 Lecture 26 November 19, 2008.
CSCI 51 Introduction to Computer Science Dr. Joshua Stough January 20, 2009.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Advanced Compilers CMPSCI 710 Spring 2004 Lecture 1 Emery Berger University of Massachusetts,
IXA 1234 : C++ PROGRAMMING CHAPTER 1. PROGRAMMING LANGUAGE Programming language is a computer program that can solve certain problem / task Keyword: Computer.
CS 671 Compilers Prof. Kim Hazelwood Spring 2008.
C o n f i d e n t i a l 1 Course: BCA Semester: III Subject Code : BC 0042 Subject Name: Operating Systems Unit number : 1 Unit Title: Overview of Operating.
Compiler Optimizations ECE 454 Computer Systems Programming Topics: The Role of the Compiler Common Compiler (Automatic) Code Optimizations Cristiana Amza.
Performance Tuning John Black CS 425 UNR, Fall 2000.
CS412/413 Introduction to Compilers Radu Rugina Lecture 18: Control Flow Graphs 29 Feb 02.
CS412/413 Introduction to Compilers and Translators April 2, 1999 Lecture 24: Introduction to Optimization.
Course topics Representing programs Analyzing and transforming programs Applications of these techniques.
Lecture 1b- Introduction
Component 1.6.
Code Optimization.
Advanced Compiler Design
CSc 1302 Principles of Computer Science II
Component 1.6.
Types for Programs and Proofs
Lecture 1: Course Introduction
Optimization Code Optimization ©SoftMoore Consulting.
Course Description Algorithms are: Recipes for solving problems.
© 2015 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
Programming COMP104: Fundamentals and Methodology Introduction.
CS190/295 Programming in Python for Life Sciences: Lecture 1
CSCI1600: Embedded and Real Time Software
Introduction to Computer Systems
CSE401 Introduction to Compiler Construction
Prof. Jason Eisner MWF 3-4pm (sometimes 3-4:15)
Searching, Sorting, and Asymptotic Complexity
Introduction to Computer Systems
Tonga Institute of Higher Education IT 141: Information Systems
Advanced Compiler Design
Tonga Institute of Higher Education IT 141: Information Systems
CSE 153 Design of Operating Systems Winter 2019
point when a program element is bound to a characteristic or property
Course Description Algorithms are: Recipes for solving problems.
CSE P 501 – Compilers SSA Hal Perkins Autumn /31/2019
Optimizing Compilers CISC 673 Spring 2009 Course Overview
CSCI1600: Embedded and Real Time Software
Presentation transcript:

Advanced Compilers CMPSCI 710 Spring 2003 Lecture 1 Emery Berger University of Massachusetts, Amherst

Administrivia Class format: Course website: Grades: Materials: I present material & work examples You take notes, read book & papers Course website: www.cs.umass.edu/~emery/cmpsci710/ Grades: 40% - 4 homework assignments (due dates to be announced) 60% - project Materials: Required text: Muchnick, Advanced Compiler Design Implementation (ACDI) Supplementary material: selected papers

Project Stuff 1 to 2 person teams Implement optimization/analysis in: Jikes RVM (IBM’s research Java compiler) Broadway (UTexas “metacompiler”) other (subject to approval) Due dates: 02/11/03: One-page project description. 02/25/03: 2-4 page project design. 03/25/03: Project implementation review. 04/29/03: Implementation due. 05/06-13/03: In-class presentations. 05/13/03: Project report.

Why Compilers Matter

What are Compilers, Anyway? Compiler: translates program in one language to executable program in other language Typically lowers abstraction level E.g., Java/C++ to assembler Optimizing compiler: Misnomer! Optimal compilation intractable Improves program performance

Performance Anxiety But does performance really matter? Computers are really fast Moore’s law (roughly): hardware performance doubles every 18 months Real bottlenecks lie elsewhere: Disk Network Human! (think interactive apps) At most 120 cps typing Waste time “thinking”

Compilers Don’t Help Much Do compilers improve performance anyway? Proebsting’s law (Todd Proebsting, Microsoft Research): Difference between optimizing and non-optimizing compiler ~ 4x Assume compiler technology represents 36 years of progress (actually more) Compilers double program performance every 18 years! Not quite Moore’s Law…

Argumentum Ad Absurdum Compilers don’t help much (Proebsting’s Law) Don’t use optimizer Computers are getting faster (Moore’s Law) Buy a new one – helps the economy too! Or: wait until one’s fast enough, then run program Hmmm…

A Big BUT Why use high-level languages anyway? Easier to write & maintain Safer (think Java) More convenient (think libraries, GC…) But: people will not accept massive performance hit for these gains Compile with optimization! Still use C and C++!! Hand-optimize their code!!! Even write assembler code (gasp)!!!! Apparently performance does matter…

Why Compilers Matter Key part of compiler’s job: make the costs of abstraction reasonable Remove performance penalty for: Using objects Safety checks (e.g., array-bounds) Writing clean code (e.g., recursion) Use program analysis to transform code: primary topic of this course

Analysis & The Holy Grail Other great uses for program analysis: Static error-checking Detect information leaks Avoid security holes Informing runtime system (e.g., GC) Even better optimizations! E.g., locality-improving transformations (“memory wall”) Holy Grail for compiler research: Programmer: writes simple but O(2^n) algorithm Compiler: changes it to O(n log n) (or O(1)!)

Levels of Analysis (in order of increasing detail & complexity) Local (single-block) [1960’s] Straight-line code Simple to analyze; limited impact Intraprocedural [1970’s – today] Whole procedure Dataflow & dependence analysis Interprocedural [late 1970’s – today] Whole-program analysis Tricky: Very time and space intensive Hard for some PL’s (e.g., Java)

Optimization = Analysis + Transformation Key analyses: Control-flow if-statements, branches, loops, procedure calls Data-flow definitions and uses of variables Representations: Control-flow graph Control-dependence graph Def/use, use/def chains SSA (Static Single Assignment)

Next Time Read ACDI Chapters 1, 2, 7 Next meeting might be in CS building