Register Allocation III. Interference Graph Allocators. Computing the Interference Graph (in MiniJava compiler)

Size: px
Start display at page:

Download "Register Allocation III. Interference Graph Allocators. Computing the Interference Graph (in MiniJava compiler)"

Transcription

1 Register Alloation III Announements Reommen have interferene graph onstrution working by Monay Last leture Register alloation aross funtion alls Toay Register alloation options Interferene Graph Alloators Chaitin Briggs CS553 Leture Register Alloation III 2 CS553 Leture Register Alloation III 3 Granularity of Alloation (Renumber step in Briggs) What is alloate to registers? Variables/Temporaries Live ranges/webs (i.e., u-hains with ommon uses) Values (i.e., efinitions; same as variables with SSA) t 1 : x := 5 b 2 t 2 : y := x b 3 t 3 : x := y+1 b 4 b 1 t 6 :... x... t 4 :... x... t 5 : x := 3 Variables: 2 (x & y) Live Ranges/Web: 3 (t 1 t 2,t 4 ; t 2 t 3 ; t 3,t 5 t 6 ) Values: 4 (t 1, t 2, t 3, t 5, φ (t 3,t 5 )) What are the traeoffs? Eah alloation unit is given a symboli register name (e.g., s1, s2, et.) CS553 Leture Register Alloation III 4 Computing the Interferene Graph (in MiniJava ompiler) Use results of live variable analysis for eah flow graph noe n o for eah ef in ef(n) o for eah temp in liveout(n) o if ( not stmt(n) isa MOVE or ef!= temp ) then E E (ef, temp) CS553 Leture Register Alloation III 5 1

2 Coalesing Coalesing Logistis Move instrutions Coe generation an proue unneessary move instrutions mov t1, t2 If we an assign t1 an t2 to the same register, we an eliminate the move If t1 an t2 are not onnete in the interferene graph, oalese them into a single variable Rule When builing the interferene graph, o NOT make virtual registers interfere ue to opies. If the virtual registers s1 an s2 o not interfere an there is a opy statement s1 = s2 then s1 an s2 an be oalese. Example Problem Coalesing an inrease the number of eges an make a graph unolorable Limit oalesing to avoi unolorable graphs oalese t1 t2 t1 t2 CS553 Leture Register Alloation III 6 CS553 Leture Register Alloation III 7 Coalesing in MiniJava ompiler Currently the InterfereneGraph only has one Temp.Temp assoiate with eah noe represent eah merge noe with just one of the temps keep a separate map of representatives mappe to sets of temps also keep a map of temps mappe to their representative when rewriting the oe use the representative instea of the original temp Register Alloation: Spilling If we an t fin a k-oloring of the interferene graph Spill variables (noes) until the graph is olorable Choosing variables to spill Choose least frequently aesse variables Break ties by hoosing noes with the most onflits in the interferene graph Yes, these are heuristis! CS553 Leture Register Alloation III 8 CS553 Leture Register Alloation III 9 2

3 Weighte Interferene Graph Goal Weight(s) =! f ( r) f(r) is exeution frequeny of r " referenes r of s Stati approximation Use some reasonable sheme to rank variables One possibility Weight(s) = 1 Noes after branh: ½ weight of branh Noes in loop: 10 weight of noes outsie loop Improvement #1: Simplifiation Phase [Chaitin 81] Noes with < k neighbors are guarantee olorable Improvement over simple greey oloring algorithm Remove them from the graph first Reues the egree of the remaining noes Must spill only when all remaining noes have egree k Referre to as pessimisti spilling CS553 Leture Register Alloation III 10 CS553 Leture Register Alloation III 11 The Problem: Worst Case Assumptions Improvement #2: Optimisti Spilling [Briggs 89] Is the following graph 2-olorable? s1 s1 s4 s2 s4 s3 Clearly 2-olorable But Chaitin s algorithm leas to an immeiate blok an spill The algorithm assumes the worst ase, namely, that all neighbors will be assigne a ifferent olor CS553 Leture Register Alloation III 12 s2 s3 Some neighbors might get the same olor Noes with k neighbors might be olorable Bloking oes not imply that spilling is neessary Push bloke noes on stak (rather than plae in spill set) Chek olorability upon popping the stak, when more information is available Defer eision CS553 Leture Register Alloation III 13 3

4 Algorithm [Briggs et al. 89] while interferene graph not empty o while a noe n with < k neighbors o Remove n from the graph simplify Push n on a stak if any noes remain in the graph then { bloke with >= k eges } Pik a noe n to spill { lowest spill-ost/highest egree } Push n on stak efer eision Remove n from the graph while stak not empty o Pop noe n from stak make eision if n is olorable then Alloate n to a register else Insert spill oe for n { Store after ef; loa before use } Reonstrut interferene graph & start over CS553 Leture Register Alloation III 14 Example Attempt to 2-olor this graph (, ) Stak: b * f* a* e* * bloke noe e a f CS553 Leture Register Alloation III 15 b Weighte orer: e a f b Possible Register Alloation Design Overall algorithm: graph oloring with simplifiation Interferene graph: two temps interfere if one is efine in a stmt an the other is live out of the same stmt exeption is a MOVE statement where the temps are the soure an est Coalese: Briggs strategy oalese if new noe will have fewer than K neighbors of signifiant egree (>= K) Spill heuristi: spill the noe with the lowest weight an break ties by spilling the noe with the most ajaent eges Simplifiation: optimisti Selet: pop everything off the stak before generating spill oe Improvement #3: Live Range Splitting [Chow & Hennessy 84] Start with variables as our alloation unit When a variable an t be alloate, split it into multiple subranges for separate alloation Seletive spilling: put some subranges in registers, some in memory Insert memory operations at bounaries Why is this a goo iea? CS553 Leture Register Alloation III 16 CS553 Leture Register Alloation III 18 4

5 Improvement #4: Rematerialization [Chaitin 82]&[Briggs 84] Seletively re-ompute values rather than loaing from memory Reverse CSE Next Time Leture Instrution sheuling Easy ase Value an be ompute in single instrution, an All operans are available Examples Constants Aresses of global variables Aresses of loal variables (on stak) CS553 Leture Register Alloation III 19 CS553 Leture Register Alloation III 20 5

Register Allocation III. Interference Graph Allocators. Coalescing. Granularity of Allocation (Renumber step in Briggs) Chaitin

Register Allocation III. Interference Graph Allocators. Coalescing. Granularity of Allocation (Renumber step in Briggs) Chaitin Register Alloation III Last time Register alloation aross funtion alls Toay Register alloation options Interferene Graph Alloators Chaitin Briggs CS553 Leture Register Alloation III 1 CS553 Leture Register

More information

Compilation Lecture 11a. Register Allocation Noam Rinetzky. Text book: Modern compiler implementation in C Andrew A.

Compilation Lecture 11a. Register Allocation Noam Rinetzky. Text book: Modern compiler implementation in C Andrew A. Compilation 0368-3133 Leture 11a Text book: Modern ompiler implementation in C Andrew A. Appel Register Alloation Noam Rinetzky 1 Registers Dediated memory loations that an be aessed quikly, an have omputations

More information

Low-Level Issues. Register Allocation. Last lecture! Liveness analysis! Register allocation. ! More register allocation. ! Instruction scheduling

Low-Level Issues. Register Allocation. Last lecture! Liveness analysis! Register allocation. ! More register allocation. ! Instruction scheduling Low-Level Issues Last lecture! Liveness analysis! Register allocation!today! More register allocation!later! Instruction scheduling CS553 Lecture Register Allocation I 1 Register Allocation!Problem! Assign

More information

1 Disjoint-set data structure.

1 Disjoint-set data structure. CS 124 Setion #4 Union-Fin, Greey Algorithms 2/20/17 1 Disjoint-set ata struture. 1.1 Operations Disjoint-set ata struture enale us to effiiently perform operations suh as plaing elements into sets, querying

More information

splitting tehniques that partition live ranges have been proposed to solve both the spilling problem[5][8] and the assignment problem[8][9]. The parti

splitting tehniques that partition live ranges have been proposed to solve both the spilling problem[5][8] and the assignment problem[8][9]. The parti Load/Store Range Analysis for Global Register Alloation Priyadarshan Kolte and Mary Jean Harrold Department of Computer Siene Clemson University Abstrat Live range splitting tehniques divide the live ranges

More information

CMSC 430 Introduction to Compilers. Spring Register Allocation

CMSC 430 Introduction to Compilers. Spring Register Allocation CMSC 430 Introuction to Compilers Spring 2016 Register Allocation Introuction Change coe that uses an unoune set of virtual registers to coe that uses a finite set of actual regs For ytecoe targets, can

More information

Register allocation. Overview

Register allocation. Overview Register allocation Register allocation Overview Variables may be stored in the main memory or in registers. { Main memory is much slower than registers. { The number of registers is strictly limited.

More information

Rematerialization. Graph Coloring Register Allocation. Some expressions are especially simple to recompute: Last Time

Rematerialization. Graph Coloring Register Allocation. Some expressions are especially simple to recompute: Last Time Graph Coloring Register Allocation Last Time Chaitin et al. Briggs et al. Today Finish Briggs et al. basics An improvement: rematerialization Rematerialization Some expressions are especially simple to

More information

COMP 181. Prelude. Intermediate representations. Today. Types of IRs. High-level IR. Intermediate representations and code generation

COMP 181. Prelude. Intermediate representations. Today. Types of IRs. High-level IR. Intermediate representations and code generation Prelude COMP 181 Intermediate representations and ode generation November, 009 What is this devie? Large Hadron Collider What is a hadron? Subatomi partile made up of quarks bound by the strong fore What

More information

LAB 4: Operations on binary images Histograms and color tables

LAB 4: Operations on binary images Histograms and color tables LAB 4: Operations on binary images Histograms an olor tables Computer Vision Laboratory Linköping University, Sween Preparations an start of the lab system You will fin a ouple of home exerises (marke

More information

Code generation for modern processors

Code generation for modern processors Code generation for modern processors Definitions (1 of 2) What are the dominant performance issues for a superscalar RISC processor? Refs: AS&U, Chapter 9 + Notes. Optional: Muchnick, 16.3 & 17.1 Instruction

More information

Code generation for modern processors

Code generation for modern processors Code generation for modern processors What are the dominant performance issues for a superscalar RISC processor? Refs: AS&U, Chapter 9 + Notes. Optional: Muchnick, 16.3 & 17.1 Strategy il il il il asm

More information

Register Allocation (wrapup) & Code Scheduling. Constructing and Representing the Interference Graph. Adjacency List CS2210

Register Allocation (wrapup) & Code Scheduling. Constructing and Representing the Interference Graph. Adjacency List CS2210 Register Allocation (wrapup) & Code Scheduling CS2210 Lecture 22 Constructing and Representing the Interference Graph Construction alternatives: as side effect of live variables analysis (when variables

More information

CS553 Lecture Introduction to Data-flow Analysis 1

CS553 Lecture Introduction to Data-flow Analysis 1 ! Ide Introdution to Dt-flow nlysis!lst Time! Implementing Mrk nd Sweep GC!Tody! Control flow grphs! Liveness nlysis! Register llotion CS553 Leture Introdution to Dt-flow Anlysis 1 Dt-flow Anlysis! Dt-flow

More information

Chapter 2: Introduction to Maple V

Chapter 2: Introduction to Maple V Chapter 2: Introdution to Maple V 2-1 Working with Maple Worksheets Try It! (p. 15) Start a Maple session with an empty worksheet. The name of the worksheet should be Untitled (1). Use one of the standard

More information

Compiler Design. Register Allocation. Hwansoo Han

Compiler Design. Register Allocation. Hwansoo Han Compiler Design Register Allocation Hwansoo Han Big Picture of Code Generation Register allocation Decides which values will reside in registers Changes the storage mapping Concerns about placement of

More information

This fact makes it difficult to evaluate the cost function to be minimized

This fact makes it difficult to evaluate the cost function to be minimized RSOURC LLOCTION N SSINMNT In the resoure alloation step the amount of resoures required to exeute the different types of proesses is determined. We will refer to the time interval during whih a proess

More information

Today More register allocation Clarifications from last time Finish improvements on basic graph coloring concept Procedure calls Interprocedural

Today More register allocation Clarifications from last time Finish improvements on basic graph coloring concept Procedure calls Interprocedural More Register Allocation Last time Register allocation Global allocation via graph coloring Today More register allocation Clarifications from last time Finish improvements on basic graph coloring concept

More information

Anchoring quartet-based phylogenetic distances and applications to species tree reconstruction

Anchoring quartet-based phylogenetic distances and applications to species tree reconstruction Anhoring quartet-base phylogeneti istanes an appliations to speies tree reonstrution Erfan Sayyari an Siavash Mirarab Department of Eletrial an Computer Engineering University of California at San Diego

More information

Global Register Allocation via Graph Coloring

Global Register Allocation via Graph Coloring Global Register Allocation via Graph Coloring Copyright 2003, Keith D. Cooper, Ken Kennedy & Linda Torczon, all rights reserved. Students enrolled in Comp 412 at Rice University have explicit permission

More information

Announcements. Lecture Caching Issues for Multi-core Processors. Shared Vs. Private Caches for Small-scale Multi-core

Announcements. Lecture Caching Issues for Multi-core Processors. Shared Vs. Private Caches for Small-scale Multi-core Announements Your fous should be on the lass projet now Leture 17: Cahing Issues for Multi-ore Proessors This week: status update and meeting A short presentation on: projet desription (problem, importane,

More information

Solutions to Tutorial 2 (Week 9)

Solutions to Tutorial 2 (Week 9) The University of Syney Shool of Mathematis an Statistis Solutions to Tutorial (Week 9) MATH09/99: Disrete Mathematis an Graph Theory Semester, 0. Determine whether eah of the following sequenes is the

More information

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Test I Solutions

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Test I Solutions Department of Eletrial Engineering and Computer iene MAACHUETT INTITUTE OF TECHNOLOGY 6.035 Fall 2016 Test I olutions 1 I Regular Expressions and Finite-tate Automata For Questions 1, 2, and 3, let the

More information

Lecture 15 Register Allocation & Spilling

Lecture 15 Register Allocation & Spilling I. Motivation Lecture 15 Register Allocation & Spilling I. Introduction II. Abstraction and the Problem III. Algorithm IV. Spilling Problem Allocation of variables (pseudo-registers) to hardware registers

More information

Algorithms for External Memory Lecture 6 Graph Algorithms - Weighted List Ranking

Algorithms for External Memory Lecture 6 Graph Algorithms - Weighted List Ranking Algorithms for External Memory Leture 6 Graph Algorithms - Weighted List Ranking Leturer: Nodari Sithinava Sribe: Andi Hellmund, Simon Ohsenreither 1 Introdution & Motivation After talking about I/O-effiient

More information

CS453 INTRODUCTION TO DATAFLOW ANALYSIS

CS453 INTRODUCTION TO DATAFLOW ANALYSIS CS453 INTRODUCTION TO DATAFLOW ANALYSIS CS453 Leture Register llotion using liveness nlysis 1 Introdution to Dt-flow nlysis Lst Time Register llotion for expression trees nd lol nd prm vrs Tody Register

More information

Lecture 14. Recursion

Lecture 14. Recursion Leture 14 Reursion Announements for Today Prelim 1 Tonight at 5:15 OR 7:30 A D (5:15, Uris G01) E-K (5:15, Statler) L P (7:30, Uris G01) Q-Z (7:30, Statler) Graded y noon on Sun Sores will e in CMS In

More information

On - Line Path Delay Fault Testing of Omega MINs M. Bellos 1, E. Kalligeros 1, D. Nikolos 1,2 & H. T. Vergos 1,2

On - Line Path Delay Fault Testing of Omega MINs M. Bellos 1, E. Kalligeros 1, D. Nikolos 1,2 & H. T. Vergos 1,2 On - Line Path Delay Fault Testing of Omega MINs M. Bellos, E. Kalligeros, D. Nikolos,2 & H. T. Vergos,2 Dept. of Computer Engineering and Informatis 2 Computer Tehnology Institute University of Patras,

More information

Register Allocation. Note by Baris Aktemur: Our slides are adapted from Cooper and Torczon s slides that they prepared for COMP 412 at Rice.

Register Allocation. Note by Baris Aktemur: Our slides are adapted from Cooper and Torczon s slides that they prepared for COMP 412 at Rice. Register Allocation Note by Baris Aktemur: Our slides are adapted from Cooper and Torczon s slides that they prepared for COMP at Rice. Copyright 00, Keith D. Cooper & Linda Torczon, all rights reserved.

More information

Register Allocation. Preston Briggs Reservoir Labs

Register Allocation. Preston Briggs Reservoir Labs Register Allocation Preston Briggs Reservoir Labs An optimizing compiler SL FE IL optimizer IL BE SL A classical optimizing compiler (e.g., LLVM) with three parts and a nice separation of concerns: front

More information

Register Allocation. Global Register Allocation Webs and Graph Coloring Node Splitting and Other Transformations

Register Allocation. Global Register Allocation Webs and Graph Coloring Node Splitting and Other Transformations Register Allocation Global Register Allocation Webs and Graph Coloring Node Splitting and Other Transformations Copyright 2015, Pedro C. Diniz, all rights reserved. Students enrolled in the Compilers class

More information

CS269I: Incentives in Computer Science Lecture #8: Incentives in BGP Routing

CS269I: Incentives in Computer Science Lecture #8: Incentives in BGP Routing CS269I: Incentives in Computer Science Lecture #8: Incentives in BGP Routing Tim Roughgaren October 19, 2016 1 Routing in the Internet Last lecture we talke about elay-base (or selfish ) routing, which

More information

Conflicts Analysis for Inter-Enterprise Business Process Model

Conflicts Analysis for Inter-Enterprise Business Process Model Conflits Analysis for nter-enterprise Business Proess Moel Wei DNG, Zhong TAN, Jian WANG, Jun ZHU, Haiqi LANG,Lei ZHANG {ingw, tianz, wangwj, zhujun, lianghq, lzhang}@n.ibm.om BM China Researh Lab, BM

More information

CSC D70: Compiler Optimization Register Allocation

CSC D70: Compiler Optimization Register Allocation CSC D70: Compiler Optimization Register Allocation Prof. Gennady Pekhimenko University of Toronto Winter 2018 The content of this lecture is adapted from the lectures of Todd Mowry and Phillip Gibbons

More information

Computer Organization

Computer Organization Computer Organization Douglas Comer Computer Science Department Purue University 250 N. University Street West Lafayette, IN 47907-2066 http://www.cs.purue.eu/people/comer Copyright 2006. All rights reserve.

More information

Total 100

Total 100 CS331 SOLUTION Problem # Points 1 10 2 15 3 25 4 20 5 15 6 15 Total 100 1. ssume you are dealing with a ompiler for a Java-like language. For eah of the following errors, irle whih phase would normally

More information

Connection Guide. Installing the printer locally (Windows) What is local printing? Installing the printer using the Software and Documentation CD

Connection Guide. Installing the printer locally (Windows) What is local printing? Installing the printer using the Software and Documentation CD Page 1 of 7 Connetion Guide Installing the printer loally (Windows) Note: When installing a loally attahed printer, if the operating system is not supported y the Software and Doumentation CD, then the

More information

The C2 Register Allocator. Niclas Adlertz

The C2 Register Allocator. Niclas Adlertz The C2 Register Allocator Niclas Adlertz 1 1 Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated

More information

INTRODUCTION. USB Connection Cable included

INTRODUCTION. USB Connection Cable included INTRODUCTION USB Connetion Cable inlue PRG007 is the new programming interfae for alarms, l, parking now available an future proution. It s Winows sw base on. After owloaing an installing the software

More information

CS 406/534 Compiler Construction Instruction Selection and Global Register Allocation

CS 406/534 Compiler Construction Instruction Selection and Global Register Allocation CS 406/534 Compiler Construction Instruction Selection and Global Register Allocation Prof. Li Xu Dept. of Computer Science UMass Lowell Fall 2004 Part of the course lecture notes are based on Prof. Keith

More information

Redundant Computation Elimination Optimizations. Redundancy Elimination. Value Numbering CS2210

Redundant Computation Elimination Optimizations. Redundancy Elimination. Value Numbering CS2210 Redundant Computation Elimination Optimizations CS2210 Lecture 20 Redundancy Elimination Several categories: Value Numbering local & global Common subexpression elimination (CSE) local & global Loop-invariant

More information

Allocating Rotating Registers by Scheduling

Allocating Rotating Registers by Scheduling Alloating Rotating Registers by Sheduling Hongbo Rong Hyunhul Park Cheng Wang Youfeng Wu Programming Systems Lab Intel Labs {hongbo.rong,hyunhul.park,heng..wang,youfeng.wu}@intel.om ABSTRACT A rotating

More information

Interference graph. Register Allocation. A bigger example. Units of allocation

Interference graph. Register Allocation. A bigger example. Units of allocation Rgistr Alloation Intrfrn graph Th prolm: assign mahin rsours (rgistrs, stak loations) to hol run-tim ata Constraint: simultanously liv ata alloat to iffrnt loations Goal: minimiz ovrha of stak loas & stors

More information

Graph-Based vs Depth-Based Data Representation for Multiview Images

Graph-Based vs Depth-Based Data Representation for Multiview Images Graph-Based vs Depth-Based Data Representation for Multiview Images Thomas Maugey, Antonio Ortega, Pasal Frossard Signal Proessing Laboratory (LTS), Eole Polytehnique Fédérale de Lausanne (EPFL) Email:

More information

Containers: Queue and List

Containers: Queue and List Continers: Queue n List Queue A ontiner in whih insertion is one t one en (the til) n eletion is one t the other en (the he). Also lle FIFO (First-In, First-Out) Jori Cortell n Jori Petit Deprtment of

More information

Advanced Algorithms for Fast and Scalable Deep Packet Inspection

Advanced Algorithms for Fast and Scalable Deep Packet Inspection Avane Algorithms for Fast an Salale Deep Paket Inspetion Sailesh Kumar Washington University sailesh@arl.wustl.eu Jonathan Turner Washington University jon.turner@wustl.eu John Williams Ciso Systems jwill@iso.om

More information

Unsupervised Segmentation of Stereoscopic Video Objects: Proposal. and Comparison of Two Depth-Based Approaches

Unsupervised Segmentation of Stereoscopic Video Objects: Proposal. and Comparison of Two Depth-Based Approaches Unsupervise Segmentation of Stereosopi Vieo Objets: Proposal an Comparison of Two Depth-Base Approahes Klimis S. Ntalianis an Athanasios S.Drigas Net Meia Lab, NCSR Demokritos, Athens, Greee E-mail: kntal@image.ntua.gr

More information

OPERATING INSTRUCTIONS FOR. COPA (Computer Aided Photoelastic Analysis) PROGRAMME: VERSION 3. Philip Siegmann & Eann Patterson

OPERATING INSTRUCTIONS FOR. COPA (Computer Aided Photoelastic Analysis) PROGRAMME: VERSION 3. Philip Siegmann & Eann Patterson OPERATNG NSTRUCTONS FOR COPA (Computer Aie Photoelasti Analysis) PROGRAMME: VERSON 3 Philip Siegmann & Eann Patterson ntroution This oument aompanies a new piee of software initially proue in the Experimental

More information

Keeping Things Simple: Finding Frequent Item Sets by Recursive Elimination

Keeping Things Simple: Finding Frequent Item Sets by Recursive Elimination Keeping Things Simple: Fining Frequent Item Sets y Reursive Elimination Christian Borgelt Department of Knowlege Proessing an Language Engineering Shool of Computer Siene, Otto-von-Guerike-University of

More information

Accelerating Multiprocessor Simulation with a Memory Timestamp Record

Accelerating Multiprocessor Simulation with a Memory Timestamp Record Aelerating Multiproessor Simulation with a Memory Timestamp Reord Kenneth Barr Heidi Pan Mihael Zhang Krste Asanovi Marh, 5 Massahusetts Institute of Tehnology Intelligent sampling gives est speed-auray

More information

Connection Guide. Installing the printer locally (Windows) What is local printing? Installing the printer using the Software and Documentation CD

Connection Guide. Installing the printer locally (Windows) What is local printing? Installing the printer using the Software and Documentation CD Connetion Guide Page 1 of 5 Connetion Guide Installing the printer loally (Windows) Note: If the Software and Doumentation CD does not support the operating system, you must use the Add Printer Wizard.

More information

Lecture 6. Register Allocation. I. Introduction. II. Abstraction and the Problem III. Algorithm

Lecture 6. Register Allocation. I. Introduction. II. Abstraction and the Problem III. Algorithm I. Introduction Lecture 6 Register Allocation II. Abstraction and the Problem III. Algorithm Reading: Chapter 8.8.4 Before next class: Chapter 10.1-10.2 CS243: Register Allocation 1 I. Motivation Problem

More information

Register Allocation. Register Allocation. Local Register Allocation. Live range. Register Allocation for Loops

Register Allocation. Register Allocation. Local Register Allocation. Live range. Register Allocation for Loops DF00100 Advanced Compiler Construction Register Allocation Register Allocation: Determines values (variables, temporaries, constants) to be kept when in registers Register Assignment: Determine in which

More information

Enumerating pseudo-triangulations in the plane

Enumerating pseudo-triangulations in the plane Enumerating pseuo-triangulations in the plane Sergey Bereg Astrat A pseuo-triangle is a simple polygon with exatly three onvex verties. A pseuo-triangulation of a finite point set S in the plane is a partition

More information

6.823 Computer System Architecture. Problem Set #3 Spring 2002

6.823 Computer System Architecture. Problem Set #3 Spring 2002 6.823 Computer System Architecture Problem Set #3 Spring 2002 Stuents are strongly encourage to collaborate in groups of up to three people. A group shoul han in only one copy of the solution to the problem

More information

Multi-Channel Wireless Networks: Capacity and Protocols

Multi-Channel Wireless Networks: Capacity and Protocols Multi-Channel Wireless Networks: Capaity and Protools Tehnial Report April 2005 Pradeep Kyasanur Dept. of Computer Siene, and Coordinated Siene Laboratory, University of Illinois at Urbana-Champaign Email:

More information

Register Allocation via Hierarchical Graph Coloring

Register Allocation via Hierarchical Graph Coloring Register Allocation via Hierarchical Graph Coloring by Qunyan Wu A THESIS Submitted in partial fulfillment of the requirements for the degree of MASTER OF SCIENCE IN COMPUTER SCIENCE MICHIGAN TECHNOLOGICAL

More information

SSA-Form Register Allocation

SSA-Form Register Allocation SSA-Form Register Allocation Foundations Sebastian Hack Compiler Construction Course Winter Term 2009/2010 saarland university computer science 2 Overview 1 Graph Theory Perfect Graphs Chordal Graphs 2

More information

CSE P 501 Compilers. Register Allocation Hal Perkins Autumn /22/ Hal Perkins & UW CSE P-1

CSE P 501 Compilers. Register Allocation Hal Perkins Autumn /22/ Hal Perkins & UW CSE P-1 CSE P 501 Compilers Register Allocation Hal Perkins Autumn 2011 11/22/2011 2002-11 Hal Perkins & UW CSE P-1 Agenda Register allocation constraints Local methods Faster compile, slower code, but good enough

More information

Greedy Algorithm. Algorithm Fall Semester

Greedy Algorithm. Algorithm Fall Semester Greey Algorithm Algorithm 0 Fll Semester Optimiztion prolems An optimiztion prolem is one in whih you wnt to fin, not just solution, ut the est solution A greey lgorithm sometimes works well for optimiztion

More information

Data Structures in Java

Data Structures in Java Data Strutures in Java Leture 8: Trees and Tree Traversals. 10/5/2015 Daniel Bauer 1 Trees in Computer Siene A lot of data omes in a hierarhial/nested struture. Mathematial expressions. Program struture.

More information

Dynamic Restoration in Multi-layer IP/MPLS-over- Flexgrid Networks

Dynamic Restoration in Multi-layer IP/MPLS-over- Flexgrid Networks Dynami Restoration in Multi-layer IP/MPLS-over- Flexgri Networks Alberto Castro, Luis Velaso, Jaume Comellas, an Gabriel Junyent Universitat Politènia e Catalunya (UPC), Barelona, Spain E-mail: aastro@a.up.eu

More information

Dynamic Programming. Lecture #8 of Algorithms, Data structures and Complexity. Joost-Pieter Katoen Formal Methods and Tools Group

Dynamic Programming. Lecture #8 of Algorithms, Data structures and Complexity. Joost-Pieter Katoen Formal Methods and Tools Group Dynami Programming Leture #8 of Algorithms, Data strutures and Complexity Joost-Pieter Katoen Formal Methods and Tools Group E-mail: katoen@s.utwente.nl Otober 29, 2002 JPK #8: Dynami Programming ADC (214020)

More information

A {k, n}-secret Sharing Scheme for Color Images

A {k, n}-secret Sharing Scheme for Color Images A {k, n}-seret Sharing Sheme for Color Images Rastislav Luka, Konstantinos N. Plataniotis, and Anastasios N. Venetsanopoulos The Edward S. Rogers Sr. Dept. of Eletrial and Computer Engineering, University

More information

Definitions Homework. Quine McCluskey Optimal solutions are possible for some large functions Espresso heuristic. Definitions Homework

Definitions Homework. Quine McCluskey Optimal solutions are possible for some large functions Espresso heuristic. Definitions Homework EECS 33 There be Dragons here http://ziyang.ees.northwestern.edu/ees33/ Teaher: Offie: Email: Phone: L477 Teh dikrp@northwestern.edu 847 467 2298 Today s material might at first appear diffiult Perhaps

More information

Multitarget Data Association with Higher-Order Motion Models

Multitarget Data Association with Higher-Order Motion Models Multitarget Data Assoiation with Higher-Orer Motion Moels Robert T. Collins The Pennsylvania State University University Park, PA 16802, USA Abstrat We present an iterative approximate solution to the

More information

Non-homogeneous Generalization in Privacy Preserving Data Publishing

Non-homogeneous Generalization in Privacy Preserving Data Publishing Non-homogeneous Generalization in Privacy Preserving Data Publishing W. K. Wong, Nios Mamoulis an Davi W. Cheung Department of Computer Science, The University of Hong Kong Pofulam Roa, Hong Kong {wwong2,nios,cheung}@cs.hu.h

More information

Automatic Physical Design Tuning: Workload as a Sequence Sanjay Agrawal Microsoft Research One Microsoft Way Redmond, WA, USA +1-(425)

Automatic Physical Design Tuning: Workload as a Sequence Sanjay Agrawal Microsoft Research One Microsoft Way Redmond, WA, USA +1-(425) Automati Physial Design Tuning: Workload as a Sequene Sanjay Agrawal Mirosoft Researh One Mirosoft Way Redmond, WA, USA +1-(425) 75-357 sagrawal@mirosoft.om Eri Chu * Computer Sienes Department University

More information

Performance Benchmarks for an Interactive Video-on-Demand System

Performance Benchmarks for an Interactive Video-on-Demand System Performane Benhmarks for an Interative Video-on-Demand System. Guo,P.G.Taylor,E.W.M.Wong,S.Chan,M.Zukerman andk.s.tang ARC Speial Researh Centre for Ultra-Broadband Information Networks (CUBIN) Department

More information

Multiple Assignments

Multiple Assignments Two Outputs Conneted Together Multiple Assignments Two Outputs Conneted Together if (En1) Q

More information

Fall Compiler Principles Lecture 12: Register Allocation. Roman Manevich Ben-Gurion University

Fall Compiler Principles Lecture 12: Register Allocation. Roman Manevich Ben-Gurion University Fall 2014-2015 Compiler Principles Lecture 12: Register Allocation Roman Manevich Ben-Gurion University Syllabus Front End Intermediate Representation Optimizations Code Generation Scanning Lowering Local

More information

Reading Object Code. A Visible/Z Lesson

Reading Object Code. A Visible/Z Lesson Reading Objet Code A Visible/Z Lesson The Idea: When programming in a high-level language, we rarely have to think about the speifi ode that is generated for eah instrution by a ompiler. But as an assembly

More information

CA Release Automation 5.x Implementation Proven Professional Exam (CAT-600) Study Guide Version 1.1

CA Release Automation 5.x Implementation Proven Professional Exam (CAT-600) Study Guide Version 1.1 Exam (CAT-600) Study Guide Version 1.1 PROPRIETARY AND CONFIDENTIAL INFORMATION 2016 CA. All rights reserved. CA onfidential & proprietary information. For CA, CA Partner and CA Customer use only. No unauthorized

More information

The Reconstruction of Graphs. Dhananjay P. Mehendale Sir Parashurambhau College, Tilak Road, Pune , India. Abstract

The Reconstruction of Graphs. Dhananjay P. Mehendale Sir Parashurambhau College, Tilak Road, Pune , India. Abstract The Reconstruction of Graphs Dhananay P. Mehenale Sir Parashurambhau College, Tila Roa, Pune-4030, Inia. Abstract In this paper we iscuss reconstruction problems for graphs. We evelop some new ieas lie

More information

Divide-and-conquer algorithms 1

Divide-and-conquer algorithms 1 * 1 Multipliation Divide-and-onquer algorithms 1 The mathematiian Gauss one notied that although the produt of two omplex numbers seems to! involve four real-number multipliations it an in fat be done

More information

Learning Convention Propagation in BeerAdvocate Reviews from a etwork Perspective. Abstract

Learning Convention Propagation in BeerAdvocate Reviews from a etwork Perspective. Abstract CS 9 Projet Final Report: Learning Convention Propagation in BeerAdvoate Reviews from a etwork Perspetive Abstrat We look at the way onventions propagate between reviews on the BeerAdvoate dataset, and

More information

Abstract. We describe a parametric hybrid Bezier patch that, in addition. schemes are local in that changes to part of the data only aect portions of

Abstract. We describe a parametric hybrid Bezier patch that, in addition. schemes are local in that changes to part of the data only aect portions of A Parametri Hyrid Triangular Bezier Path Stephen Mann and Matthew Davidhuk Astrat. We desrie a parametri hyrid Bezier path that, in addition to lending interior ontrol points, lends oundary ontrol points.

More information

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed.

Here are a couple of warnings to my students who may be here to get a copy of what happened on a day that you missed. Preface Here are my online notes for my Calculus I course that I teach here at Lamar University. Despite the fact that these are my class notes, they shoul be accessible to anyone wanting to learn Calculus

More information

Recursion examples: Problem 2. (More) Recursion and Lists. Tail recursion. Recursion examples: Problem 2. Recursion examples: Problem 3

Recursion examples: Problem 2. (More) Recursion and Lists. Tail recursion. Recursion examples: Problem 2. Recursion examples: Problem 3 Reursion eamples: Problem 2 (More) Reursion and s Reursive funtion to reverse a string publi String revstring(string str) { if(str.equals( )) return str; return revstring(str.substring(1, str.length()))

More information

Outline. CS38 Introduction to Algorithms. Administrative Stuff. Administrative Stuff. Motivation/Overview. Administrative Stuff

Outline. CS38 Introduction to Algorithms. Administrative Stuff. Administrative Stuff. Motivation/Overview. Administrative Stuff Outline CS38 Introdution to Algorithms Leture 1 April 1, 2014 administrative stuff motivation and overview of the ourse stale mathings example graphs, representing graphs graph traversals (BFS, DFS) onnetivity,

More information

CS 406/534 Compiler Construction Putting It All Together

CS 406/534 Compiler Construction Putting It All Together CS 406/534 Compiler Construction Putting It All Together Prof. Li Xu Dept. of Computer Science UMass Lowell Fall 2004 Part of the course lecture notes are based on Prof. Keith Cooper, Prof. Ken Kennedy

More information

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved. Chpter 9 Greey Tehnique Copyright 2007 Person Aison-Wesley. All rights reserve. Greey Tehnique Construts solution to n optimiztion prolem piee y piee through sequene of hoies tht re: fesile lolly optiml

More information

Reading Object Code. A Visible/Z Lesson

Reading Object Code. A Visible/Z Lesson Reading Objet Code A Visible/Z Lesson The Idea: When programming in a high-level language, we rarely have to think about the speifi ode that is generated for eah instrution by a ompiler. But as an assembly

More information

Pipelined Multipliers for Reconfigurable Hardware

Pipelined Multipliers for Reconfigurable Hardware Pipelined Multipliers for Reonfigurable Hardware Mithell J. Myjak and José G. Delgado-Frias Shool of Eletrial Engineering and Computer Siene, Washington State University Pullman, WA 99164-2752 USA {mmyjak,

More information

Backpressure-based Packet-by-Packet Adaptive Routing in Communication Networks

Backpressure-based Packet-by-Packet Adaptive Routing in Communication Networks 1 Backpressure-base Packet-by-Packet Aaptive Routing in Communication Networks Eleftheria Athanasopoulou, Loc Bui, Tianxiong Ji, R. Srikant, an Alexaner Stolyar Abstract Backpressure-base aaptive routing

More information

8 Instruction Selection

8 Instruction Selection 8 Instrution Seletion The IR ode instrutions were designed to do exatly one operation: load/store, add, subtrat, jump, et. The mahine instrutions of a real CPU often perform several of these primitive

More information

COST PERFORMANCE ASPECTS OF CCD FAST AUXILIARY MEMORY

COST PERFORMANCE ASPECTS OF CCD FAST AUXILIARY MEMORY COST PERFORMANCE ASPECTS OF CCD FAST AUXILIARY MEMORY Dileep P, Bhondarkor Texas Instruments Inorporated Dallas, Texas ABSTRACT Charge oupled devies (CCD's) hove been mentioned as potential fast auxiliary

More information

CA Test Data Manager 4.x Implementation Proven Professional Exam (CAT-681) Study Guide Version 1.0

CA Test Data Manager 4.x Implementation Proven Professional Exam (CAT-681) Study Guide Version 1.0 Implementation Proven Professional Study Guide Version 1.0 PROPRIETARY AND CONFIDENTIAL INFORMATION 2017 CA. All rights reserved. CA onfidential & proprietary information. For CA, CA Partner and CA Customer

More information

Evaluation of Benchmark Performance Estimation for Parallel. Fortran Programs on Massively Parallel SIMD and MIMD. Computers.

Evaluation of Benchmark Performance Estimation for Parallel. Fortran Programs on Massively Parallel SIMD and MIMD. Computers. Evaluation of Benhmark Performane Estimation for Parallel Fortran Programs on Massively Parallel SIMD and MIMD Computers Thomas Fahringer Dept of Software Tehnology and Parallel Systems University of Vienna

More information

Multiple-Criteria Decision Analysis: A Novel Rank Aggregation Method

Multiple-Criteria Decision Analysis: A Novel Rank Aggregation Method 3537 Multiple-Criteria Deision Analysis: A Novel Rank Aggregation Method Derya Yiltas-Kaplan Department of Computer Engineering, Istanbul University, 34320, Avilar, Istanbul, Turkey Email: dyiltas@ istanbul.edu.tr

More information

Multi-hop Fast Conflict Resolution Algorithm for Ad Hoc Networks

Multi-hop Fast Conflict Resolution Algorithm for Ad Hoc Networks Multi-hop Fast Conflit Resolution Algorithm for Ad Ho Networks Shengwei Wang 1, Jun Liu 2,*, Wei Cai 2, Minghao Yin 2, Lingyun Zhou 2, and Hui Hao 3 1 Power Emergeny Center, Sihuan Eletri Power Corporation,

More information

Preamble. Singly linked lists. Collaboration policy and academic integrity. Getting help

Preamble. Singly linked lists. Collaboration policy and academic integrity. Getting help CS2110 Spring 2016 Assignment A. Linke Lists Due on the CMS by: See the CMS 1 Preamble Linke Lists This assignment begins our iscussions of structures. In this assignment, you will implement a structure

More information

Recitation Caches and Blocking. 4 March 2019

Recitation Caches and Blocking. 4 March 2019 15-213 Recitation Caches an Blocking 4 March 2019 Agena Reminers Revisiting Cache Lab Caching Review Blocking to reuce cache misses Cache alignment Reminers Due Dates Cache Lab (Thursay 3/7) Miterm Exam

More information

Extracting Partition Statistics from Semistructured Data

Extracting Partition Statistics from Semistructured Data Extrating Partition Statistis from Semistrutured Data John N. Wilson Rihard Gourlay Robert Japp Mathias Neumüller Department of Computer and Information Sienes University of Strathlyde, Glasgow, UK {jnw,rsg,rpj,mathias}@is.strath.a.uk

More information

Runtime Support for OOLs Part II Comp 412

Runtime Support for OOLs Part II Comp 412 COMP 412 FALL 2017 Runtime Support for OOLs Part II Comp 412 soure IR Front End Optimizer Bak End IR target Copright 2017, Keith D. Cooper & Linda Torzon, all rights reserved. Students enrolled in Comp

More information

Generalized Edge Coloring for Channel Assignment in Wireless Networks

Generalized Edge Coloring for Channel Assignment in Wireless Networks TR-IIS-05-021 Generalize Ege Coloring for Channel Assignment in Wireless Networks Chun-Chen Hsu, Pangfeng Liu, Da-Wei Wang, Jan-Jan Wu December 2005 Technical Report No. TR-IIS-05-021 http://www.iis.sinica.eu.tw/lib/techreport/tr2005/tr05.html

More information

Almost Disjunct Codes in Large Scale Multihop Wireless Network Media Access Control

Almost Disjunct Codes in Large Scale Multihop Wireless Network Media Access Control Almost Disjunct Coes in Large Scale Multihop Wireless Network Meia Access Control D. Charles Engelhart Anan Sivasubramaniam Penn. State University University Park PA 682 engelhar,anan @cse.psu.eu Abstract

More information

Questions? Post on piazza, or Radhika (radhika at eecs.berkeley) or Sameer (sa at berkeley)!

Questions? Post on piazza, or  Radhika (radhika at eecs.berkeley) or Sameer (sa at berkeley)! EE122 Fall 2013 HW3 Instructions Recor your answers in a file calle hw3.pf. Make sure to write your name an SID at the top of your assignment. For each problem, clearly inicate your final answer, bol an

More information

Detection and Recognition of Non-Occluded Objects using Signature Map

Detection and Recognition of Non-Occluded Objects using Signature Map 6th WSEAS International Conferene on CIRCUITS, SYSTEMS, ELECTRONICS,CONTROL & SIGNAL PROCESSING, Cairo, Egypt, De 9-31, 007 65 Detetion and Reognition of Non-Oluded Objets using Signature Map Sangbum Park,

More information

Additional Divide and Conquer Algorithms. Skipping from chapter 4: Quicksort Binary Search Binary Tree Traversal Matrix Multiplication

Additional Divide and Conquer Algorithms. Skipping from chapter 4: Quicksort Binary Search Binary Tree Traversal Matrix Multiplication Aitional Divie an Conquer Algorithms Skipping from chapter 4: Quicksort Binary Search Binary Tree Traversal Matrix Multiplication Divie an Conquer Closest Pair Let s revisit the closest pair problem. Last

More information