Single-Path Code Generation and Input-Data Dependence Analysis
|
|
- Ruby Golden
- 5 years ago
- Views:
Transcription
1 Single-Path Code Generation and Input-Data Dependence Analysis Daniel Prokesch July 10 th, 2014 Project Workshop Madrid D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
2 Motivation Uncertainty in program execution time D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
3 Motivation Uncertainty in program execution time Hardware Duration of operations dependent on internal state D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
4 Motivation Uncertainty in program execution time Hardware Duration of operations dependent on internal state Software Different inputs lead to paths of varying execution time D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
5 The Single-Path Approach Singleton execution path Reduce complexity of path analysis D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
6 The Single-Path Approach Singleton execution path Reduce complexity of path analysis Execution time stable w.r.t. varying input data Known ET for a particular input Reasonable predictions for any input D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
7 The Single-Path Approach Eliminate input-data dependent control flow. D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
8 The Single-Path Approach Eliminate input-data dependent control flow. Predicated execution (guard) instruction; If-conversion if (cond) { x = a + 1; } else { x = b - 2; } ( cond) x = a + 1; (!cond) x = b - 2; D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
9 Single-Path Transformation Rules Rules to transform from high-level language to single-path sequence of predicated statements [Puschner et al., 2012] D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
10 Single-Path Transformation Rules Rules to transform from high-level language to single-path sequence of predicated statements [Puschner et al., 2012] Example: Treatment of loops while (cond) // max N times { stmts; } finished := false; for i = 1.. N { if (!cond) finished := true; if (!finished) { stmts; } } D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
11 Single-Path Transformation Rules Rules to transform from high-level language to single-path sequence of predicated statements [Puschner et al., 2012] Example: Treatment of loops while (cond) // max N times { stmts; } finished := false; for i = 1.. N { if (!cond) finished := true; if (!finished) { stmts; } } How to implement this in a compiler?? D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
12 Single-Path Code Generation Contributions Formulation of the single-path transformation on the CFG level D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
13 Single-Path Code Generation Contributions Formulation of the single-path transformation on the CFG level Prototype implementation in a code generator (LLVM backend for Patmos) D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
14 Control-flow Graph Nodes with at most two successors Branch condition Reducible control flow graph D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
15 The Single-Path Graph Transformation Admissible paths in CFG: local loop bounds Predicated Nodes Semantic actions on predicates at nodes and edges D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
16 The Single-Path Graph Transformation Admissible paths in CFG: local loop bounds Predicated Nodes Semantic actions on predicates at nodes and edges D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
17 Acyclic regions [Park and Schlansker, 1991] describe transformation in acyclic case s a Partitioning by Control Dependence b c d e t D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
18 Acyclic regions [Park and Schlansker, 1991] describe transformation in acyclic case s a b c Partitioning by Control Dependence Nodes with same set of CD: same predicate d e t D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
19 Acyclic regions [Park and Schlansker, 1991] describe transformation in acyclic case s a b c Partitioning by Control Dependence Nodes with same set of CD: same predicate d e t D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
20 Acyclic regions [Park and Schlansker, 1991] describe transformation in acyclic case s t a b d e c Partitioning by Control Dependence Nodes with same set of CD: same predicate Predicate assignments at source of CD edges Initialization with false Topological sort order D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
21 Loops Forward control flow graph of loop nodes Nested inner loops compacted into single node Proceed as in acyclic case D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
22 Loops Forward control flow graph of loop nodes Nested inner loops compacted into single node Proceed as in acyclic case Input-data independent branch condition Former exit edge causes clearing of header predicate D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
23 Loops Forward control flow graph of loop nodes Nested inner loops compacted into single node Proceed as in acyclic case Input-data independent branch condition Former exit edge causes clearing of header predicate Recursive composition of the SP-Graph starting from outermost (pseudo-) loop D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
24 Input-Data Dependency Analysis 1 Determine input-data dependent branch conditions 1 work mostly by Benedikt Huber D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
25 Input-Data Dependency Analysis 1 Determine input-data dependent branch conditions Input data dependency Definition based on Thinned Gated Static Assignment (TGSA) form 1 work mostly by Benedikt Huber D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
26 Input-Data Dependency Analysis 1 Determine input-data dependent branch conditions Input data dependency Definition based on Thinned Gated Static Assignment (TGSA) form γ-instructions, µ-instructions, η-instructions capture various types of dependencies 1 work mostly by Benedikt Huber D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
27 Input-Data Dependency Analysis 1 Determine input-data dependent branch conditions Input data dependency Definition based on Thinned Gated Static Assignment (TGSA) form γ-instructions, µ-instructions, η-instructions capture various types of dependencies From TGSA, input-data dependency graph is constructed Path from x y: x may depend on y, otherwise x is independent from y 1 work mostly by Benedikt Huber D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
28 Implementation Prototype implementation in Patmos backend (LLVM) D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
29 Implementation Prototype implementation in Patmos backend (LLVM) Patmos features... A fully predicated instruction set 7+1 predicate registers that can be stored/restored at once Explicitly managed local memories D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
30 Example: Insertion Sort Fetch array to SPM, sort, copy back to memory Exhaustive simulation D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
31 Example: Insertion Sort Fetch array to SPM, sort, copy back to memory Exhaustive simulation Results: Static Analysis 771 D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
32 Example: Insertion Sort Fetch array to SPM, sort, copy back to memory Exhaustive simulation Results: Static Analysis 771 Static Analysis w/ LC 546 D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
33 Example: Insertion Sort Fetch array to SPM, sort, copy back to memory Exhaustive simulation Results: Static Analysis 771 Static Analysis w/ LC 546 Measurements [473, 501] D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
34 Example: Insertion Sort Fetch array to SPM, sort, copy back to memory Exhaustive simulation Results: Static Analysis 771 Static Analysis w/ LC 546 Measurements [473, 501] Single-Path (single-issue) 580 D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
35 Example: Insertion Sort Fetch array to SPM, sort, copy back to memory Exhaustive simulation Results: Static Analysis 771 Static Analysis w/ LC 546 Measurements [473, 501] Single-Path (single-issue) 580 Single-Path 485 D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
36 Summary Single-path conversion as transformation on CFGs Prototype implementation in Patmos backend D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
37 References I Park, J. C. and Schlansker, M. (1991). On predicated execution. Technical report, Hewlett Peckard Software and Systems Laboratory. Puschner, P., Kirner, R., Huber, B., and Prokesch, D. (2012). Compiling for time predictability. In Proc. SAFECOMP 2012 Workshops (LNCS 7613), pages Springer. D. Prokesch TUV T-CREST Workshop, Madrid July 10 th,
Best Practice for Caching of Single-Path Code
Best Practice for Caching of Single-Path Code Martin Schoeberl, Bekim Cilku, Daniel Prokesch, and Peter Puschner Technical University of Denmark Vienna University of Technology 1 Context n Real-time systems
More informationTransforming Execution-Time Boundable Code into Temporally Predictable Code
Transforming Execution-Time Boundable Code into Temporally Predictable Code Peter Puschner Institut for Technische Informatik. Technische Universitdt Wien, Austria Abstract: Traditional Worst-Case Execution-Time
More informationWriting Temporally Predictable Code
Writing Temporally Predictable Code Peter Puschner Benedikt Huber slides credits: P. Puschner, R. Kirner, B. Huber VU 2.0 182.101 SS 2015 Task Execution Time a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 9 a 8 1. Sequence
More informationAligning Single Path Loops to Reduce the Number of Capacity Cache Misses
Aligning Single Path Loops to Reduce the Number of Capacity Cache Misses Bekim Cilku Institute of Computer Engineering Vienna University of Technology A40 Wien, Austria bekim@vmars tuwienacat Roland Kammerer
More informationAligning Single Path Loops to Reduce the Number of Capacity Cache Misses
Aligning Single Path Loops to Reduce the Number of Capacity Cache Misses Bekim Cilku, Roland Kammerer, and Peter Puschner Institute of Computer Engineering Vienna University of Technology A0 Wien, Austria
More informationScope-based Method Cache Analysis
Scope-based Method Cache Analysis Benedikt Huber 1, Stefan Hepp 1, Martin Schoeberl 2 1 Vienna University of Technology 2 Technical University of Denmark 14th International Workshop on Worst-Case Execution
More informationModeling Hardware Timing 1 Caches and Pipelines
Modeling Hardware Timing 1 Caches and Pipelines Peter Puschner slides: P. Puschner, R. Kirner, B. Huber VU 2.0 182.101 SS 2016 Generic WCET Analysis Framework source code Extraction of Flow Facts Compilation
More informationA Time-Triggered View. Peter PUSCHNER
Predictable Timing on MPSoC A Time-Triggered View Peter PUSCHNER 1 st Workshop on Mapping Applications to MPSoCs Schloss Rheinfels, Germany June 2008 Focus goal: build safety-critical hard real-time systems
More informationEECS 583 Class 3 Region Formation, Predicated Execution
EECS 583 Class 3 Region Formation, Predicated Execution University of Michigan September 14, 2011 Reading Material Today s class» Trace Selection for Compiling Large C Applications to Microcode, Chang
More informationA Tool for the Computation of Worst Case Task Execution Times
A Tool for the Computation of Worst Case Task Execution Times P. Puschner and A. Schedl Institut fur Technische Informatik Technical University of Vienna Vienna, A-1040 Austria Abstract In modern programming
More informationEECS 583 Class 3 More on loops, Region Formation
EECS 583 Class 3 More on loops, Region Formation University of Michigan September 19, 2016 Announcements & Reading Material HW1 is out Get busy on it!» Course servers are ready to go Today s class» Trace
More informationArchitectural Time-predictability Factor (ATF) to Measure Architectural Time Predictability
Architectural Time-predictability Factor (ATF) to Measure Architectural Time Predictability Yiqiang Ding, Wei Zhang Department of Electrical and Computer Engineering Virginia Commonwealth University Outline
More informationEECS 583 Class 2 Control Flow Analysis LLVM Introduction
EECS 583 Class 2 Control Flow Analysis LLVM Introduction University of Michigan September 8, 2014 - 1 - Announcements & Reading Material HW 1 out today, due Friday, Sept 22 (2 wks)» This homework is not
More informationMetamodeling with Metamodels. Using. UML/MOF including OCL
Metamodeling with Metamodels Using UML/MOF including OCL Introducing Metamodels (Wikipedia) A metamodel is a model of a model An instantiation of metamodel gives a model Metamodeling is the process of
More informationFundamentals of Database Systems
Fundamentals of Database Systems Assignment: 4 September 21, 2015 Instructions 1. This question paper contains 10 questions in 5 pages. Q1: Calculate branching factor in case for B- tree index structure,
More informationHistory-based Schemes and Implicit Path Enumeration
History-based Schemes and Implicit Path Enumeration Claire Burguière and Christine Rochange Institut de Recherche en Informatique de Toulouse Université Paul Sabatier 6 Toulouse cedex 9, France {burguier,rochange}@irit.fr
More informationHardware-Software Codesign. 9. Worst Case Execution Time Analysis
Hardware-Software Codesign 9. Worst Case Execution Time Analysis Lothar Thiele 9-1 System Design Specification System Synthesis Estimation SW-Compilation Intellectual Prop. Code Instruction Set HW-Synthesis
More informationBlock-wise abstract interpretation by combining abstract domains with SMT
Block-wise abstract interpretation by combining abstract domains with SMT Jiahong Jiang, Liqian Chen, Xueguang Wu, Ji Wang National University of Defense Technology, China 01/16/2017 VMCAI 2017 Overview
More informationSingle-Path Programming on a Chip-Multiprocessor System
Single-Path Programming on a Chip-Multiprocessor System Martin Schoeberl, Peter Puschner, and Raimund Kirner Vienna University of Technology, Austria mschoebe@mail.tuwien.ac.at, {peter,raimund}@vmars.tuwien.ac.at
More informationCOS 320. Compiling Techniques
Topic 5: Types COS 320 Compiling Techniques Princeton University Spring 2016 Lennart Beringer 1 Types: potential benefits (I) 2 For programmers: help to eliminate common programming mistakes, particularly
More informationA Single-Path Chip-Multiprocessor System
A Single-Path Chip-Multiprocessor System Martin Schoeberl, Peter Puschner, and Raimund Kirner Institute of Computer Engineering Vienna University of Technology, Austria mschoebe@mail.tuwien.ac.at, {peter,raimund}@vmars.tuwien.ac.at
More informationAlternatives for semantic processing
Semantic Processing Copyright c 2000 by Antony L. Hosking. Permission to make digital or hard copies of part or all of this work for personal or classroom use is granted without fee provided that copies
More informationHW/SW Codesign. WCET Analysis
HW/SW Codesign WCET Analysis 29 November 2017 Andres Gomez gomeza@tik.ee.ethz.ch 1 Outline Today s exercise is one long question with several parts: Basic blocks of a program Static value analysis WCET
More informationLecture 21. Software Pipelining & Prefetching. I. Software Pipelining II. Software Prefetching (of Arrays) III. Prefetching via Software Pipelining
Lecture 21 Software Pipelining & Prefetching I. Software Pipelining II. Software Prefetching (of Arrays) III. Prefetching via Software Pipelining [ALSU 10.5, 11.11.4] Phillip B. Gibbons 15-745: Software
More informationAutomatic flow analysis using symbolic execution and path enumeration
Automatic flow analysis using symbolic execution path enumeration D. Kebbal Institut de Recherche en Informatique de Toulouse 8 route de Narbonne - F-62 Toulouse Cedex 9 France Djemai.Kebbal@iut-tarbes.fr
More informationTRANSLATING BETWEEN PEGS AND CFGS
TRANSLATING BETWEEN PEGS AND CFGS ROSS TATE, MICHAEL STEPP, ZACHARY TATLOCK, AND SORIN LERNER Department of Computer Science and Engineering, University of California, San Diego e-mail address: {rtate,mstepp,ztatlock,lerner}@cs.ucsd.edu
More informationImproving Performance of Single-path Code Through a Time-predictable Memory Hierarchy
Improving Performance of Single-path Code Through a Time-predictable Memory Hierarchy Bekim Cilku, Wolfgang Puffitsch, Daniel Prokesch, Martin Schoeberl and Peter Puschner Vienna University of Technology,
More informationPhi-Predication for Light-Weight If-Conversion
Phi-Predication for Light-Weight If-Conversion Weihaw Chuang Brad Calder Jeanne Ferrante Benefits of If-Conversion Eliminates hard to predict branches Important for deep pipelines How? Executes all paths
More informationLecture 2: Control Flow Analysis
COM S/CPRE 513 x: Foundations and Applications of Program Analysis Spring 2018 Instructor: Wei Le Lecture 2: Control Flow Analysis 2.1 What is Control Flow Analysis Given program source code, control flow
More informationIntermediate representation
Intermediate representation Goals: encode knowledge about the program facilitate analysis facilitate retargeting facilitate optimization scanning parsing HIR semantic analysis HIR intermediate code gen.
More informationHandling Cyclic Execution Paths in Timing Analysis of Component-based Software
Handling Cyclic Execution Paths in Timing Analysis of Component-based Software Luka Lednicki, Jan Carlson Mälardalen Real-time Research Centre Mälardalen University Västerås, Sweden Email: {luka.lednicki,
More informationChapter 7 Control I Expressions and Statements
Chapter 7 Control I Expressions and Statements Expressions Conditional Statements and Guards Loops and Variation on WHILE The GOTO Controversy Exception Handling Values and Effects Important Concepts in
More informationDecision Making in C
Decision Making in C Decision making structures require that the programmer specify one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed
More informationEfficient Path Profiling
Efficient Path Profiling Thomas Ball James R. Larus Bell Laboratories Univ. of Wisconsin (now at Microsoft Research) Presented by Ophelia Chesley Overview Motivation Path Profiling vs. Edge Profiling Path
More informationFunctional Programming. Pure Functional Programming
Functional Programming Pure Functional Programming Computation is largely performed by applying functions to values. The value of an expression depends only on the values of its sub-expressions (if any).
More informationCreating Formally Verified Components for Layered Assurance with an LLVM-to-ACL2 Translator
Creating Formally Verified Components for Layered Assurance with an LLVM-to-ACL2 Translator Jennifer Davis, David Hardin, Jedidiah McClurg December 2013 Introduction Research objectives: Reduce need to
More informationDevelopment of a Translator from LLVM to ACL2
Development of a Translator from LLVM to ACL2 David Hardin, Jennifer Davis, David Greve, and Jedidiah McClurg July 2014 Introduction Research objectives: Reason about machine code generated from high-level
More informationLecture Notes on Loop Optimizations
Lecture Notes on Loop Optimizations 15-411: Compiler Design Frank Pfenning Lecture 17 October 22, 2013 1 Introduction Optimizing loops is particularly important in compilation, since loops (and in particular
More informationDefining syntax using CFGs
Defining syntax using CFGs Roadmap Last time Defined context-free grammar This time CFGs for specifying a language s syntax Language membership List grammars Resolving ambiguity CFG Review G = (N,Σ,P,S)
More informationA Brief Introduction to Scheme (II)
A Brief Introduction to Scheme (II) Philip W. L. Fong pwlfong@cs.uregina.ca Department of Computer Science University of Regina Regina, Saskatchewan, Canada Lists Scheme II p.1/29 Lists Aggregate data
More informationClassification of Code Annotations and Discussion of Compiler-Support for Worst-Case Execution Time Analysis
Proceedings of the 5th Intl Workshop on Worst-Case Execution Time (WCET) Analysis Page 41 of 49 Classification of Code Annotations and Discussion of Compiler-Support for Worst-Case Execution Time Analysis
More informationEfficient JIT to 32-bit Arches
Efficient JIT to 32-bit Arches Jiong Wang Linux Plumbers Conference Vancouver, Nov, 2018 1 Background ISA specification and impact on JIT compiler Default code-gen use 64-bit register, ALU64, JMP64 test_l4lb_noinline.c
More informationLanguage-Based Information- Flow Security
Language-Based Information- Flow Security Andrei Sabelfeld Andrew C. Myers Presented by Shiyi Wei About the paper Literature review Information flow security Static program analysis to enforce information-flow
More informationCS448/648 Database Systems Implementation. Volcano: A top-down optimizer generator
CS448/648 Database Systems Implementation Volcano: A top-down optimizer generator 1 Outline Definitions Physical and Logical expressions Equivalency of expressions Transformation rules Top-down query optimization
More informationData-Flow Based Detection of Loop Bounds
Data-Flow Based Detection of Loop Bounds Christoph Cullmann and Florian Martin AbsInt Angewandte Informatik GmbH Science Park 1, D-66123 Saarbrücken, Germany cullmann,florian@absint.com, http://www.absint.com
More informationProgramming Fundamentals - A Modular Structured Approach using C++ By: Kenneth Leroy Busbee
1 0 1 0 Foundation Topics 1 0 Chapter 1 - Introduction to Programming 1 1 Systems Development Life Cycle N/A N/A N/A N/A N/A N/A 1-8 12-13 1 2 Bloodshed Dev-C++ 5 Compiler/IDE N/A N/A N/A N/A N/A N/A N/A
More informationSoftware Quality Engineering: Testing, Quality Assurance, and Quantifiable Improvement
Software Quality Engineering Slide (Ch.11) 1 Software Quality Engineering: Testing, Quality Assurance, and Quantifiable Improvement Jeff Tian, tian@engr.smu.edu www.engr.smu.edu/ tian/sqebook Chapter 11.
More informationLecture Notes on Liveness Analysis
Lecture Notes on Liveness Analysis 15-411: Compiler Design Frank Pfenning André Platzer Lecture 4 1 Introduction We will see different kinds of program analyses in the course, most of them for the purpose
More informationD 5.3 Report on Compilation for Time-Predictability
Project Number 288008 D 5.3 Report on Compilation for Time-Predictability Version 1.0 Final Public Distribution Vienna University of Technology, Technical University of Denmark, AbsInt Angewandte Informatik,
More informationD 8.4 Workshop Report
Project Number 288008 D 8.4 Workshop Report Version 2.0 30 July 2014 Final Public Distribution Denmark Technical University, Eindhoven University of Technology, Technical University of Vienna, The Open
More informationLLVM and IR Construction
LLVM and IR Construction Fabian Ritter based on slides by Christoph Mallon and Johannes Doerfert http://compilers.cs.uni-saarland.de Compiler Design Lab Saarland University 1 Project Progress source code
More informationLecture_Module3 Prof Saroj Kaushik, IIT Delhi
Lecture_Module3 Problem definition Method (how to solve it) Algorithm Data structure Verification for correctness Analysis for efficiency Coding in given programming language Understanding of computer
More informationCompiler Construction 2010/2011 Loop Optimizations
Compiler Construction 2010/2011 Loop Optimizations Peter Thiemann January 25, 2011 Outline 1 Loop Optimizations 2 Dominators 3 Loop-Invariant Computations 4 Induction Variables 5 Array-Bounds Checks 6
More informationAutomatic Counterflow Pipeline Synthesis
Automatic Counterflow Pipeline Synthesis Bruce R. Childers, Jack W. Davidson Computer Science Department University of Virginia Charlottesville, Virginia 22901 {brc2m, jwd}@cs.virginia.edu Abstract The
More informationSireesha R Basavaraju Embedded Systems Group, Technical University of Kaiserslautern
Sireesha R Basavaraju Embedded Systems Group, Technical University of Kaiserslautern Introduction WCET of program ILP Formulation Requirement SPM allocation for code SPM allocation for data Conclusion
More informationStatic Analysis of Worst-Case Stack Cache Behavior
Static Analysis of Worst-Case Stack Cache Behavior Alexander Jordan 1 Florian Brandner 2 Martin Schoeberl 2 Institute of Computer Languages 1 Embedded Systems Engineering Section 2 Compiler and Languages
More informationControl Flow Analysis
COMP 6 Program Analysis and Transformations These slides have been adapted from http://cs.gmu.edu/~white/cs60/slides/cs60--0.ppt by Professor Liz White. How to represent the structure of the program? Based
More informationA Small Interpreted Language
A Small Interpreted Language What would you need to build a small computing language based on mathematical principles? The language should be simple, Turing equivalent (i.e.: it can compute anything that
More informationSpring Prof. Hyesoon Kim
Spring 2011 Prof. Hyesoon Kim 2 Warp is the basic unit of execution A group of threads (e.g. 32 threads for the Tesla GPU architecture) Warp Execution Inst 1 Inst 2 Inst 3 Sources ready T T T T One warp
More informationData Flow Analysis. Agenda CS738: Advanced Compiler Optimizations. 3-address Code Format. Assumptions
Agenda CS738: Advanced Compiler Optimizations Data Flow Analysis Amey Karkare karkare@cse.iitk.ac.in http://www.cse.iitk.ac.in/~karkare/cs738 Department of CSE, IIT Kanpur Static analysis and compile-time
More informationYunsup Lee UC Berkeley 1
Yunsup Lee UC Berkeley 1 Why is Supporting Control Flow Challenging in Data-Parallel Architectures? for (i=0; i
More informationCompiling Techniques
Lecture 12: Code Shapes (EaC Chapter 7) 17 November 2015 Coursework Demo: Friday 4th of December In order to comply with the school regulations, you will have to give a demonstration of your compiler.
More informationD 5.7 Report on Compiler Evaluation
Project Number 288008 D 5.7 Report on Compiler Evaluation Version 1.0 Final Public Distribution Vienna University of Technology, Technical University of Denmark Project Partners: AbsInt Angewandte Informatik,
More informationDiego Caballero and Vectorizer Team, Intel Corporation. April 16 th, 2018 Euro LLVM Developers Meeting. Bristol, UK.
Diego Caballero and Vectorizer Team, Intel Corporation. April 16 th, 2018 Euro LLVM Developers Meeting. Bristol, UK. Legal Disclaimer & Software and workloads used in performance tests may have been optimized
More informationLecture08: Scope and Lexical Address
Lecture08: Scope and Lexical Address Free and Bound Variables (EOPL 1.3.1) Given an expression E, does a particular variable reference x appear free or bound in that expression? Definition: A variable
More informationResearch Collection. Overapproximating the Cost of Loops. Master Thesis. ETH Library. Author(s): Schweizer, Daniel. Publication Date: 2013
Research Collection Master Thesis Overapproximating the Cost of Loops Author(s): Schweizer, Daniel Publication Date: 2013 Permanent Link: https://doi.org/10.3929/ethz-a-009767769 Rights / License: In Copyright
More informationControl flow graphs and loop optimizations. Thursday, October 24, 13
Control flow graphs and loop optimizations Agenda Building control flow graphs Low level loop optimizations Code motion Strength reduction Unrolling High level loop optimizations Loop fusion Loop interchange
More informationCompiler Construction 2016/2017 Loop Optimizations
Compiler Construction 2016/2017 Loop Optimizations Peter Thiemann January 16, 2017 Outline 1 Loops 2 Dominators 3 Loop-Invariant Computations 4 Induction Variables 5 Array-Bounds Checks 6 Loop Unrolling
More informationCompiler Structure. Data Flow Analysis. Control-Flow Graph. Available Expressions. Data Flow Facts
Compiler Structure Source Code Abstract Syntax Tree Control Flow Graph Object Code CMSC 631 Program Analysis and Understanding Fall 2003 Data Flow Analysis Source code parsed to produce AST AST transformed
More informationCourse Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course:
Course Modules for MCSA: SQL Server 2016 Database Development Training & Certification Course: 20762C Developing SQL 2016 Databases Module 1: An Introduction to Database Development Introduction to the
More informationCSE 401/M501 Compilers
CSE 401/M501 Compilers Intermediate Representations Hal Perkins Autumn 2018 UW CSE 401/M501 Autumn 2018 G-1 Agenda Survey of Intermediate Representations Graphical Concrete/Abstract Syntax Trees (ASTs)
More informationFundamentals of Programming Session 13
Fundamentals of Programming Session 13 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2014 These slides have been created using Deitel s slides Sharif University of Technology Outlines
More informationCS 2210 Sample Midterm. 1. Determine if each of the following claims is true (T) or false (F).
CS 2210 Sample Midterm 1. Determine if each of the following claims is true (T) or false (F). F A language consists of a set of strings, its grammar structure, and a set of operations. (Note: a language
More informationProperties of Criteria. 1. Applicability Property. Criteria
Properties of Criteria Program-based To recognize a good adequacy criteria And to discard poor choices Objective, well-defined properties 1. Applicability Property For every program, there exists an adequate
More informationCS402 - Theory of Automata Glossary By
CS402 - Theory of Automata Glossary By Acyclic Graph : A directed graph is said to be acyclic if it contains no cycles. Algorithm : A detailed and unambiguous sequence of instructions that describes how
More informationOptimizations. Optimization Safety. Optimization Safety CS412/CS413. Introduction to Compilers Tim Teitelbaum
Optimizations CS412/CS413 Introduction to Compilers im eitelbaum Lecture 24: s 24 Mar 08 Code transformations to improve program Mainly: improve execution time Also: reduce program size Can be done at
More informationGoals of Program Optimization (1 of 2)
Goals of Program Optimization (1 of 2) Goal: Improve program performance within some constraints Ask Three Key Questions for Every Optimization 1. Is it legal? 2. Is it profitable? 3. Is it compile-time
More informationShell CSCE 314 TAMU. Haskell Functions
1 CSCE 314: Programming Languages Dr. Dylan Shell Haskell Functions 2 Outline Defining Functions List Comprehensions Recursion 3 Conditional Expressions As in most programming languages, functions can
More informationCS553 Lecture Profile-Guided Optimizations 3
Profile-Guided Optimizations Last time Instruction scheduling Register renaming alanced Load Scheduling Loop unrolling Software pipelining Today More instruction scheduling Profiling Trace scheduling CS553
More informationCSE 307: Principles of Programming Languages
1 / 18 CSE 307: Principles of Programming Languages Statements and Control Flow R. Sekar 2 / 18 Topics If-Then-Else 1. If-Then-Else 3 / 18 Control Statements Structured Control Statements: Case Statements:
More informationIntermediate Representation (IR)
Intermediate Representation (IR) Components and Design Goals for an IR IR encodes all knowledge the compiler has derived about source program. Simple compiler structure source code More typical compiler
More informationSyntax-directed translation. Context-sensitive analysis. What context-sensitive questions might the compiler ask?
Syntax-directed translation Context-sensitive analysis The compilation process is driven by the syntactic structure of the program as discovered by the parser Semantic routines: interpret meaning of the
More informationRecursive Functions. Recursive functions are built up from basic functions by some operations.
Recursive Functions Recursive functions are built up from basic functions by some operations. The Successor Function Let s get very primitive. Suppose we have 0 defined, and want to build the nonnegative
More informationInstruction Scheduling. Software Pipelining - 3
Instruction Scheduling and Software Pipelining - 3 Department of Computer Science and Automation Indian Institute of Science Bangalore 560 012 NPTEL Course on Principles of Compiler Design Instruction
More informationStatement Basics. Assignment Statements
Statement Basics The meaning of a single statement executed in a state s is a new state s, which reflects the effects of the statement M stmt ( stmt, s) = s N. Meng, S. Arthur 1 Assignment Statements M
More informationStructure of Programming Languages Lecture 5
Structure of Programming Languages Lecture 5 CSCI 6636 4536 June, 2017 CSCI 6636 4536 Lecture 10... 1/16 June, 2017 1 / 16 Outline 1 Expressions and Evaluation 2 Control Structures Conditionals Repetition
More informationCMSC430 Spring 2014 Midterm 2 Solutions
CMSC430 Spring 2014 Midterm 2 Solutions 1. (12 pts) Syntax directed translation & type checking Consider the following grammar fragment for an expression for C--: exp CONST IDENT 1 IDENT 2 [ exp 1 ] Assume
More informationNative Simulation of Complex VLIW Instruction Sets Using Static Binary Translation and Hardware-Assisted Virtualization
Native Simulation of Complex VLIW Instruction Sets Using Static Binary Translation and Hardware-Assisted Virtualization Mian-Muhammad Hamayun, Frédéric Pétrot and Nicolas Fournel System Level Synthesis
More informationEliminating Annotations by Automatic Flow Analysis of Real-Time Programs
Eliminating Annotations by Automatic Flow Analysis of Real-Time Programs Jan Gustafsson Department of Computer Engineering, Mälardalen University Box 883, S-721 23 Västerås, Sweden jangustafsson@mdhse
More informationCMPT 473 Software Quality Assurance. Graph Coverage. Nick Sumner
CMPT 473 Software Quality Assurance Graph Coverage Nick Sumner Recall: Coverage/Adequacy Can't look at all possible inputs. Need to determine if a test suite covers / is adequate for our quality objectives.
More informationPrinciples of Programming Languages Topic: Scope and Memory Professor Louis Steinberg Fall 2004
Principles of Programming Languages Topic: Scope and Memory Professor Louis Steinberg Fall 2004 CS 314, LS,BR,LTM: Scope and Memory 1 Review Functions as first-class objects What can you do with an integer?
More informationStatic Program Checking
Bounded Verification Jalloy Automated Software Analysis Group, Institute of Theoretical Informatics Jun.-prof. Mana Taghdiri June 5, 2014 KIT University of the State of Baden-Wuerttemberg and National
More informationLecture 6. Abstract Interpretation
Lecture 6. Abstract Interpretation Wei Le 2014.10 Outline Motivation History What it is: an intuitive understanding An example Steps of abstract interpretation Galois connection Narrowing and Widening
More informationCS153: Compilers Lecture 17: Control Flow Graph and Data Flow Analysis
CS153: Compilers Lecture 17: Control Flow Graph and Data Flow Analysis Stephen Chong https://www.seas.harvard.edu/courses/cs153 Announcements Project 5 out Due Tuesday Nov 13 (14 days) Project 6 out Due
More informationcontrol edge synchronization edge MGOTO COEND
and Optimization of Explicitly Analysis Programs using the Parallel Parallel Program Graph Representation Vivek Sarkar MIT Laboratory for Computer Science (vivek@lcs.mit.edu) 1 Motivation Current sequence
More informationFachhochschule Wedel Technical Report Nr Implementing the Forth Inner Interpreter in High Level Forth
Implementing the Forth Inner Interpreter in High Level Forth Ulrich Hoffmann Abstract This document defines a Forth threaded code (inner) interpreter written entirely in high level standard
More informationCS 61A Interpreters, Tail Calls, Macros, Streams, Iterators. Spring 2019 Guerrilla Section 5: April 20, Interpreters.
CS 61A Spring 2019 Guerrilla Section 5: April 20, 2019 1 Interpreters 1.1 Determine the number of calls to scheme eval and the number of calls to scheme apply for the following expressions. > (+ 1 2) 3
More informationData Flow Analysis. Program Analysis
Program Analysis https://www.cse.iitb.ac.in/~karkare/cs618/ Data Flow Analysis Amey Karkare Dept of Computer Science and Engg IIT Kanpur Visiting IIT Bombay karkare@cse.iitk.ac.in karkare@cse.iitb.ac.in
More informationProgramming Languages Third Edition. Chapter 7 Basic Semantics
Programming Languages Third Edition Chapter 7 Basic Semantics Objectives Understand attributes, binding, and semantic functions Understand declarations, blocks, and scope Learn how to construct a symbol
More informationIteration -- Once Is Not Enough
Iteration -- Once Is Not Enough ),7 Congratulations! The Day Find project is done! -- Reflect This is a significant accomplishment Understand a fundamental algorithm -- binary search Know how to search
More information