CSRD, University of Illinois at Urbana-Champaign 1 A Complete Compilation System.

Slides:



Advertisements
Similar presentations
CSC 4181 Compiler Construction Code Generation & Optimization.
Advertisements

Code Optimization and Performance Chapter 5 CS 105 Tour of the Black Holes of Computing.
Optimizing Compilers for Modern Architectures Syllabus Allen and Kennedy, Preface Optimizing Compilers for Modern Architectures.
Compiler Support for Superscalar Processors. Loop Unrolling Assumption: Standard five stage pipeline Empty cycles between instructions before the result.
1 Optimization Optimization = transformation that improves the performance of the target code Optimization must not change the output must not cause errors.
Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
ECE 454 Computer Systems Programming Compiler and Optimization (I) Ding Yuan ECE Dept., University of Toronto
Compiler techniques for exposing ILP
1 CS 201 Compiler Construction Machine Code Generation.
Computer Architecture Lecture 7 Compiler Considerations and Optimizations.
Chapter 10 Code Optimization. A main goal is to achieve a better performance Front End Code Gen Intermediate Code source Code target Code user Machine-
1 Starting a Program The 4 stages that take a C++ program (or any high-level programming language) and execute it in internal memory are: Compiler - C++
زبانهای برنامه سازی برنامه سازی پیشرفته ارائه دهنده دکتر سيد امين حسيني E.mail: Home page:
Compiler Challenges for High Performance Architectures
The Last Lecture Copyright 2011, Keith D. Cooper & Linda Torczon, all rights reserved. Students enrolled in Comp 512 at Rice University have explicit permission.
Modern Compiler Internal Representations Silvius Rus 1/23/2002.
TM Pro64™: Performance Compilers For IA-64™ Jim Dehnert Principal Engineer 5 June 2000.
Instruction Level Parallelism (ILP) Colin Stevens.
CS 536 Spring Intermediate Code. Local Optimizations. Lecture 22.
1 COMP 144 Programming Language Concepts Felix Hernandez-Campos Lecture 31: Building a Runnable Program COMP 144 Programming Language Concepts Spring 2002.
Code Generation for Basic Blocks Introduction Mooly Sagiv html:// Chapter
Hardware-Software Interface Machine Program Performance = t cyc x CPI x code size X Available resources statically fixed Designed to support wide variety.
Intermediate Code. Local Optimizations
Topic 6 -Code Generation Dr. William A. Maniatty Assistant Prof. Dept. of Computer Science University At Albany CSI 511 Programming Languages and Systems.
Compiler Optimization Overview
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:
Building An Interpreter After having done all of the analysis, it’s possible to run the program directly rather than compile it … and it may be worth it.
Center for Embedded Computer Systems University of California, Irvine and San Diego SPARK: A Parallelizing High-Level Synthesis.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
1 Presenter: Ming-Shiun Yang Sah, A., Balakrishnan, M., Panda, P.R. Design, Automation & Test in Europe Conference & Exhibition, DATE ‘09. A Generic.
1 Advanced Computer Programming Concurrency Multithreaded Programs Copyright © Texas Education Agency, 2013.
Topic #10: Optimization EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
Optimization software for apeNEXT Max Lukyanov,  apeNEXT : a VLIW architecture  Optimization basics  Software optimizer for apeNEXT  Current.
Introduction For some compiler, the intermediate code is a pseudo code of a virtual machine. Interpreter of the virtual machine is invoked to execute the.
ICD-C Compiler Framework Dr. Heiko Falk  H. Falk, ICD/ES, 2008 ICD-C Compiler Framework 1.Highlights and Features 2.Basic Concepts 3.Extensions.
Master Program (Laurea Magistrale) in Computer Science and Networking High Performance Computing Systems and Enabling Platforms Marco Vanneschi 1. Prerequisites.
Spring 2003CSE P5481 VLIW Processors VLIW (“very long instruction word”) processors instructions are scheduled by the compiler a fixed number of operations.
1.  10% Assignments/ class participation  10% Pop Quizzes  05% Attendance  25% Mid Term  50% Final Term 2.
1 Optimizing compiler tools and building blocks project Alexander Drozdov, PhD Sergey Novikov, PhD.
Debugging parallel programs. Breakpoint debugging Probably the most widely familiar method of debugging programs is breakpoint debugging. In this method,
CS 460/660 Compiler Construction. Class 01 2 Why Study Compilers? Compilers are important – –Responsible for many aspects of system performance Compilers.
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Overview of Compilers and JikesRVM John.
1 Compiler Design (40-414)  Main Text Book: Compilers: Principles, Techniques & Tools, 2 nd ed., Aho, Lam, Sethi, and Ullman, 2007  Evaluation:  Midterm.
Compiler Optimizations ECE 454 Computer Systems Programming Topics: The Role of the Compiler Common Compiler (Automatic) Code Optimizations Cristiana Amza.
Retargetting of VPO to the tms320c54x - a status report Presented by Joshua George Advisor: Dr. Jack Davidson.
Hy-C A Compiler Retargetable for Single-Chip Heterogeneous Multiprocessors Philip Sweany 8/27/2010.
Memory-Aware Compilation Philip Sweany 10/20/2011.
©SoftMoore ConsultingSlide 1 Code Optimization. ©SoftMoore ConsultingSlide 2 Code Optimization Code generation techniques and transformations that result.
CS 404 Introduction to Compiler Design
Advanced Computer Systems
Code Optimization Overview and Examples
Code Optimization.
Chapter 1 Introduction.
Introduction to Compiler Construction
Introduction to Advanced Topics Chapter 1 Text Book: Advanced compiler Design implementation By Steven S Muchnick (Elsevier)
Optimizing Compilers Background
Chapter 1 Introduction.
课程名 编译原理 Compiling Techniques
Optimization Code Optimization ©SoftMoore Consulting.
CGRA Express: Accelerating Execution using Dynamic Operation Fusion
Henk Corporaal TUEindhoven 2009
Eugene Gavrin – MSc student
Henk Corporaal TUEindhoven 2011
Code Optimization Overview and Examples Control Flow Graph
Optimization 薛智文 (textbook ch# 9) 薛智文 96 Spring.
Intermediate Code Generation
Compiler Construction
How to improve (decrease) CPI
Review: What is an activation record?
Intermediate Code Generating machine-independent intermediate form.
Presentation transcript:

CSRD, University of Illinois at Urbana-Champaign 1 A Complete Compilation System

CSRD, University of Illinois at Urbana-Champaign 2 Conventional Approach Frontends –Parafrase-2 –Polaris –PFA –… Backends –MIPSPro FORTRAN –Visual C++ –GCC –... Compiler Frontend analysis & optimization Compiler Backend analysis & optimization Input Source Output Assembly Intermediate Code Lose Analysis Information!

CSRD, University of Illinois at Urbana-Champaign 3 NOW HUIRLUIRIUIR UMD F77 NUMA SMT EPIC SS C C++ Java Analysis Data, Control, Cost Symbolic, etc. Parallelization Loop and Functional Transformations Distribution, Fusion, Interchange, Unroll, etc. Standard Opt. Strength Reduct., CSE, CP, etc. Resource Allocation Machine Specific Optimizations Instruction Scheduling/ Packing ILP Opt. … Machine Indep. Peephole Opt. LUIR lowering Simplify to 3-addr code In-place to maintain analysis Opcode tagging Tag stmts w/ possible opcodes In place to maintain analysis The PROMIS ApproachPROMIS

CSRD, University of Illinois at Urbana-Champaign 4 The PROMIS HTG Acyclic Task Graph (at its core) –Single statement nodes –CFE, DDE, CDE Hierarchical Blocks –Loops become SESE compound nodes –HtgBBlock - may contain compound nodes Hierarchical Edges –Don’t cross levels of hierarchy Edges with higher levels source/sink into fake start/stop nodes Edges with lower levels source/sink into compound nodes

CSRD, University of Illinois at Urbana-Champaign 5 Block Start Stop HtgBBlock Start Stop Branch HtgBBlock Stop Start  HtgBBlock Loop CDE DDE CFE

CSRD, University of Illinois at Urbana-Champaign 6 Loop Start Stop HtgBBlock  Start Branch Stop i-assign p-add v-addri-var ia i-mult i-var cb a[i] = b + c

CSRD, University of Illinois at Urbana-Champaign 7 Retargeting PROMIS -- UMD All high and many low level optimizations and analyses operate on machine independent internal representation All machine specific information contained within the UMD description Code Generator and optimization parameters are retargeted simply by changing the UMD description

CSRD, University of Illinois at Urbana-Champaign 8 ??? NOW Multi- threaded Multi- proc Retargetable & Reconfigurable.c.cpp VLIW MD Vector Unit Instruction Scheduler Thread Unit Register Allocator Source files MD files PE MM MM M M Target

CSRD, University of Illinois at Urbana-Champaign 9 Information Provided by the UMD High Level –Types of parallelism available: multiprocessor, multithreading, vector units, etc. –Intrinsic function mappings Intermediate Level –Intrinsic function lowering Low Level –Opcode mapping, Instruction Formats, etc. –Resource usage, pipelines, latencies, etc.

CSRD, University of Illinois at Urbana-Champaign 10 Saving the PROMIS Internal Representation Can easily save and restore a program’s Internal Representation to a file Avoid re-executing the same passes on the same programs by saving intermediate results at the desired location More Comprehensive, less Destructive, and much Faster than generating C code NO analysis information is recomputed!

CSRD, University of Illinois at Urbana-Champaign 11 Common Uses: Repeated Experiments, Debugging Setup: Run initial passes and dump to file Use: Load from file and run experiment Run first N-1 Passes.PIR File Unload.PIR File Run experiment on (or debug) Pass N Load No need to repeat First N-1passes

CSRD, University of Illinois at Urbana-Champaign 12 Potential Uses Interface to connect PROMIS to other compilers, such as a back-end optimizer This interface is more expressive than dumping source code (e.g. can represent Data Dependence Analysis)

CSRD, University of Illinois at Urbana-Champaign 13 Main Issues Each class in the Internal Representation must implement Unload and Load functions Basic data types are written by value Objects are serialized and tokenized before being written to file