ICD-C Compiler Framework Dr. Heiko Falk. - 2 -  H. Falk, ICD/ES, 2008 ICD-C Compiler Framework 1.Highlights and Features 2.Basic Concepts 3.Extensions.

Slides:



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

Synopsys University Courseware Copyright © 2012 Synopsys, Inc. All rights reserved. Compiler Optimization and Code Generation Lecture - 3 Developed By:
7. Optimization Prof. O. Nierstrasz Lecture notes by Marcus Denker.
The University of Adelaide, School of Computer Science
Chapter 9 Code optimization Section 0 overview 1.Position of code optimizer 2.Purpose of code optimizer to get better efficiency –Run faster –Take less.
ECE 454 Computer Systems Programming Compiler and Optimization (I) Ding Yuan ECE Dept., University of Toronto
Computer Architecture Lecture 7 Compiler Considerations and Optimizations.
Adapted from Scott, Chapter 6:: Control Flow Programming Language Pragmatics Michael L. Scott.
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 Code Optimization Code produced by compilation algorithms can often be improved (ideally optimized) in terms of run-time speed and the amount of memory.
Software & Services Group, Developer Products Division Copyright© 2010, Intel Corporation. All rights reserved. *Other brands and names are the property.
1 Compiler Construction Intermediate Code Generation.
Intermediate Representation I High-Level to Low-Level IR Translation EECS 483 – Lecture 17 University of Michigan Monday, November 6, 2006.
Chapter 14: Building a Runnable Program Chapter 14: Building a runnable program 14.1 Back-End Compiler Structure 14.2 Intermediate Forms 14.3 Code.
Engineering Problem Solving With C++ An Object Based Approach Fundamental Concepts Chapter 1 Engineering Problem Solving.
Code Generation Mooly Sagiv html:// Chapter 4.
TM Pro64™: Performance Compilers For IA-64™ Jim Dehnert Principal Engineer 5 June 2000.
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.
Recap from last time Saw several examples of optimizations –Constant folding –Constant Prop –Copy Prop –Common Sub-expression Elim –Partial Redundancy.
Cpeg421-08S/final-review1 Course Review Tom St. John.
1 Intermediate representation Goals: –encode knowledge about the program –facilitate analysis –facilitate retargeting –facilitate optimization scanning.
CStar Optimizing a C Compiler
Previous finals up on the web page use them as practice problems look at them early.
Loop invariant detection using SSA An expression is invariant in a loop L iff: (base cases) –it’s a constant –it’s a variable use, all of whose single.
Hardware-Software Interface Machine Program Performance = t cyc x CPI x code size X Available resources statically fixed Designed to support wide variety.
1 Lecture 7: Computer Arithmetic Today’s topics:  Chapter 2 wrap-up  Numerical representations  Addition and subtraction Reminder: Assignment 3 will.
Partial Automation of an Integration Reverse Engineering Environment of Binary Code Author : Cristina Cifuentes Reverse Engineering, 1996., Proceedings.
Improving Code Generation Honors Compilers April 16 th 2002.
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:
1 Lecture 6: Compilers, the SPIM Simulator Today’s topics:  SPIM simulator  The compilation process Additional TA hours: Liqun Cheng, legion at.
Schedule Midterm out tomorrow, due by next Monday Final during finals week Project updates next week.
Center for Embedded Computer Systems University of California, Irvine and San Diego SPARK: A Parallelizing High-Level Synthesis.
LLVM Developed by University of Illinois at Urbana-Champaign CIS dept Cisc 471 Matthew Warner.
Optimizing Compilers Nai-Wei Lin Department of Computer Science and Information Engineering National Chung Cheng University.
Course Outline DayContents Day 1 Introduction Motivation, definitions, properties of embedded systems, outline of the current course How to specify embedded.
Topic #10: Optimization EE 456 – Compiling Techniques Prof. Carl Sable Fall 2003.
SPL: A Language and Compiler for DSP Algorithms Jianxin Xiong 1, Jeremy Johnson 2 Robert Johnson 3, David Padua 1 1 Computer Science, University of Illinois.
Optimization software for apeNEXT Max Lukyanov,  apeNEXT : a VLIW architecture  Optimization basics  Software optimizer for apeNEXT  Current.
1 C Programming Language Review and Dissection I: Overview, Static and Automatic Variables, and Program Control Flow These lecture notes created by Dr.
(Ncc is not a C Compiler) 4 조 ( 말년병장 ) 심민조 김호철.
Functionality of LANCE Software structure C frontend
Computer Architecture Instruction Set Architecture Lynn Choi Korea University.
Fakultät für informatik informatik 12 technische universität dortmund Worst-Case Execution Time Analysis - Session 19 - Heiko Falk TU Dortmund Informatik.
C# EMILEE KING. HISTORY OF C# In the late 1990’s Microsoft recognized the need to be able to develop applications that can run on multiple operating system.
1 Optimizing compiler tools and building blocks project Alexander Drozdov, PhD Sergey Novikov, PhD.
1 Code optimization “Code optimization refers to the techniques used by the compiler to improve the execution efficiency of the generated object code”
CS 376b Introduction to Computer Vision 01 / 23 / 2008 Instructor: Michael Eckmann.
Evaluating and Improving an OpenMP-based Circuit Design Tool Tim Beatty, Dr. Ken Kent, Dr. Eric Aubanel Faculty of Computer Science University of New Brunswick.
Compiler Optimizations ECE 454 Computer Systems Programming Topics: The Role of the Compiler Common Compiler (Automatic) Code Optimizations Cristiana Amza.
Program Representations. Representing programs Goals.
LLVM IR, File - Praakrit Pradhan. Overview The LLVM bitcode has essentially two things A bitstream container format Encoding of LLVM IR.
7-Nov Fall 2001: copyright ©T. Pearce, D. Hutchinson, L. Marshall Oct lecture23-24-hll-interrupts 1 High Level Language vs. Assembly.
Fakultät für informatik informatik 12 technische universität dortmund HIR Optimizations and Transformations - Session 12 - Heiko Falk TU Dortmund Informatik.
Code Optimization More Optimization Techniques. More Optimization Techniques  Loop optimization  Code motion  Strength reduction for induction variables.
Code Optimization Code produced by compilation algorithms can often be improved (ideally optimized) in terms of run-time speed and the amount of memory.
Week 3-4 Control flow (review) Function definition Program Structures
Code Optimization Overview and Examples
The Machine Model Memory
Introduction to GSL CS 3414 From GNU Scientific Library Reference Manual at
Instructions - Type and Format
Optimizing Transformations Hal Perkins Winter 2008
Code Optimization Overview and Examples Control Flow Graph
8 Code Generation Topics A simple code generator algorithm
Optimization 薛智文 (textbook ch# 9) 薛智文 96 Spring.
Fundamental Programming
CSE 206 Course Review.
Review: What is an activation record?
Intermediate Code Generating machine-independent intermediate form.
Presentation transcript:

ICD-C Compiler Framework Dr. Heiko Falk

- 2 -  H. Falk, ICD/ES, 2008 ICD-C Compiler Framework 1.Highlights and Features 2.Basic Concepts 3.Extensions 4.Use Cases 5.Availability

- 3 -  H. Falk, ICD/ES, 2008 Highlights and Features of ICD-C ANSI-C Compiler Frontend  C89 + C99 Standards  GNU Inline Assembler Intuitive Internal Structures and Concepts  C++ Class Design & Linkable Libraries Powerful Analyses & Optimizations  Control Flow, Data Flow & Loop Analyses  21 Built-In Standard Optimizations Flexible Usage  Pre-Pass Source-Level Optimizer  High-Level IR (*) in stand-alone Compiler (*) IR = Intermediate Representation

- 4 -  H. Falk, ICD/ES, 2008 ICD-C Compiler Framework 1.Highlights and Features 2.Basic Concepts –Class Hierarchy –Documentation and Testing 3.Extensions 4.Use Cases 5.Availability

- 5 -  H. Falk, ICD/ES, 2008 ICD-C Class Hierarchy Compilation Unit IR Function Statement Expression  Loop Statements (for, do-while, while-do)  Selection Statements (if, if-else, switch)  Jump Statements (return, break, continue, …)  …  Binary & Unary Expressions (+, -, *, /, …)  Assignment Expressions (=, +=, -=, …)  Index & Component Accesses (a[x], a.x, …)  … Global ST File ST Funct. ST Local ST Basic Block

- 6 -  H. Falk, ICD/ES, 2008 Documentation & Testing Documentation  User’s and Developer Manual  Browsable HTML Reference Manual Testing  Built-In & External Testbenches > 3,100 ANSI-C Test Files > 700,000 Lines of ANSI-C Test Code  Fully Automated Test Procedures Various Test Environments (Sun Sparc Solaris, SuSE Linux, TriCore 1.3, …)

- 7 -  H. Falk, ICD/ES, 2008 ICD-C Compiler Framework 1.Highlights and Features 2.Basic Concepts 3.Extensions –Analyses & Optimizations –Backend-Interface –Retargetability 4.Use Cases 5.Availability

- 8 -  H. Falk, ICD/ES, 2008 Built-In Analyses  Control Flow Analyses Basic Block & Statement Level Domination / Post-Domination Reachability Analysis Function Call Graph Analysis  Data Flow Analyses DEF / USE Analysis Def & Use Chains Address Taken Analysis  Loop Analyses Induction Variable Analysis Number of Loop Iterations

- 9 -  H. Falk, ICD/ES, 2008 ICD-C Optimizations Local CSE Value Propagation Dead Code Elimination Unused Symbols Simplify Code Constant Folding Function Arguments Unused Symbols Function Exit Points Value Propagation Dead Code Elimination Simplify Code Constant Folding Loop Unswitch. Head-Ctrl. Loops Struct Scalarizat. Life Range Splitting Redundant Load El. Return Val. Elimination String Constants Loop Collapsing Loop Deindexing Tail Recursion Function Inlining Function Specializat. Loop Unrolling -O1 -O2 -O3

 H. Falk, ICD/ES, 2008 ICD-C Compiler Backend Interface reg: tpm_BinaryExpPLUS(reg, reg) { $cost[0] = $cost[2] + $cost[3] + COST_ADD; } = { cout << “add “ << target << “,” << $action[2]() << “,” << $action[3]() << endl; }; ICD-CG Technology Code Selector ICD-C Core Library ICD-C TPM Library C++ Compiler int sumdiff( int a, int b ) { return a + b; }; sumdiff: add R1, R2, R3 ret

 H. Falk, ICD/ES, 2008 Retargetability of ICD-C Configurable Target Architecture Parameters  Bit Widths & Memory Alignments  Configuration of ANSI-C Fuzzyness Arithmetic vs. Logic Right Shifts Signedness of Type char  Transformation for Auto-Increment Addressing  Optimization: Speed vs. Code Size Supported Target Architectures  ARM7  TriCore 1.3  PP32 V2  Sun Sparc, x86

 H. Falk, ICD/ES, 2008 ICD-C Compiler Framework 1.Highlights and Features 2.Basic Concepts 3.Extensions 4.Use Cases –Source-Level Multi-Process Scratchpad Allocation –Real-Time Compiler WCC 5.Availability

 H. Falk, ICD/ES, 2008 Use Case 1: Source-Level Memory Optimizer Profit values / Allocation hints App. 2 App. 1 App. n Allocation Manager Allocation Manager Standard Compiler (GCC) Standard Compiler (GCC) Operating System Operating System Compile-time Transformations Compile-time Transformations © R. Pyka [Operating system integrated energy aware scratchpad allocation, SCOPES ‘07] C Code C Code Prepared C LockGen / etc. LockGen / etc. Adapted C Profit Annotator Profit Annotator Opt Sys. Image RTEMS.o SPMM.o GCC ICD-C Technology

 H. Falk, ICD/ES, 2008 Use Case 2: Real-Time Compiler WCC © H. Falk, P. Lokuciejewski [Design of a WCET-Aware C Compiler, ESTIMedia ‘06] ICD-C Technology ICD-LLIR Technology

 H. Falk, ICD/ES, 2008 ICD-C Compiler Framework 1.Highlights and Features 2.Basic Concepts 3.Extensions 4.Use Cases 5.Availability –Supported Host Platforms –Licensing Schemes

 H. Falk, ICD/ES, 2008 Technical Availability of ICD-C Supported Host Platforms  Sparc Sun Solaris 5.8 – 5.10  x86 SuSE Linux 9.x – 10.x  x86 Debian Linux  x86 Microsoft Windows 2000, XP  x86 Microsoft 2003 Server

 H. Falk, ICD/ES, 2008 ICD-C Software Licenses Supported Licensing Schemes  Restricted Evaluation License  Academic Research License  Commercial License Binary License w/o Optimizations Binary License with Optimizations Full Source Code License