BUBO: An Experiment in Local Spilling for Global Register Allocation

dc.contributor.advisorCooper, Keith D.
dc.creatorLi, Lung
dc.date.accessioned2019-05-16T20:43:00Z
dc.date.available2019-05-16T20:43:00Z
dc.date.created2017-12
dc.date.issued2017-08-15
dc.date.submittedDecember 2017
dc.date.updated2019-05-16T20:43:00Z
dc.description.abstractThis thesis presents the design of the Bubble-Out, Bottom-Up Partial Live-Range Spiller (BUBO), a tool designed to be used as a pre-conditioner for a graph-coloring global register allocator. The job of a register allocator is to decide, at each point in the code, which values should be kept in registers and which values should be kept, instead, in memory; and which values should be kept in which register for those kept in registers. The strength of graph-coloring allocators is that they do an excellent job of assigning registers effectively.Their primary weakness lies in the methods that they use to decide which values cannot be kept in a register, a process called spilling. The idea behind bubo is to pre-condition the problem—that is, to transform the code to a form where the graph-coloring allocator will produce better code. BUBO makes the spill decisions and modifies the code to reflect them. It presents the allocator with a version of the program that has, at each point, demand for registers that can be satisfied by the processor’s set of registers. By building a tool that focuses intensely on spilling and that builds on and extends the strong spilling techniques developed in local register allocation, bubo should improve the overall quality of code produced by a compiler’s back end. Bubo extends the local spilling ideas from Best’s classic algorithm to a global scope, while retaining a focus on those regions in the code where spilling is actually needed. It extends the notion of distance used in local allocation to include both a forward distance, distance to next use, to estimate the cost of restores; and a backward distance, distance to previous access, to estimate the effectiveness of spilling. It extends those measures from local scope to global scope by using branch probabilities. It reconciles conflicting local allocation decisions when it processes merge points in the reverse CFG, using a careful analysis to find a solution with low estimated runtime cost. It prevents placing spill code inside loops, unless it’s necessary, to reduce the execution frequency of the inserted code. As a result, bubo introduces spills in a way that is sensitive to the demand for registers—it only spills values that are live in regions of the code where the number of such values exceeds the available set of hardware registers—and to the structure of the program—it tries to place the inserted operations in places that execute less frequently than the accesses to the value—and to the runtime cost of spill code—it estimates the cost of restores instead of assuming a fixed cost and placing spills as close to corresponding definitions as possible so that the latencies of spills are likely to be hidden by scheduling. During the design of BUBO, several notions were introduced to describe the spilling problm. The key notions are high pressure region, spill decision points(SDP) and restore decision points(RDP). The notion of high pressure region can be used to understand and thus evaluate the effectiveness of a spill. A deep sight of using a distance metric for spilling is that it approximates high pressure region coverage. The notion of SDP and RDP lead to better estimation of spill cost. A spill must happen before a SDP and a restore can be placed at earliest after a RDP. This insight leads to the reasoning of the runtime cost of spill and restore statically, at compile time, and thus to better spill decisions.
dc.format.mimetypeapplication/pdf
dc.identifier.citationLi, Lung. "BUBO: An Experiment in Local Spilling for Global Register Allocation." (2017) Master’s Thesis, Rice University. <a href="https://hdl.handle.net/1911/105536">https://hdl.handle.net/1911/105536</a>.
dc.identifier.urihttps://hdl.handle.net/1911/105536
dc.language.isoeng
dc.rightsCopyright is held by the author, unless otherwise indicated. Permission to reuse, publish, or reproduce the work beyond the bounds of fair use or other exemptions to copyright law must be obtained from the copyright holder.
dc.subjectCompiler
dc.subjectRegister Allocation
dc.subjectSpilling
dc.subjectLocal
dc.subjectGlobal
dc.subjectStatic Analysis
dc.subjectRegister Pressure
dc.subjectRegister Pressure Region
dc.subjectHigh Pressure Region
dc.subjectLow Pressure Region
dc.subjectSpill Decision Point
dc.subjectRestore Decision Point
dc.titleBUBO: An Experiment in Local Spilling for Global Register Allocation
dc.typeThesis
dc.type.materialText
thesis.degree.departmentComputer Science
thesis.degree.disciplineEngineering
thesis.degree.grantorRice University
thesis.degree.levelMasters
thesis.degree.nameMaster of Science
Files
Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
LI-DOCUMENT-2017.pdf
Size:
766.05 KB
Format:
Adobe Portable Document Format
License bundle
Now showing 1 - 2 of 2
No Thumbnail Available
Name:
PROQUEST_LICENSE.txt
Size:
5.84 KB
Format:
Plain Text
Description:
No Thumbnail Available
Name:
LICENSE.txt
Size:
2.6 KB
Format:
Plain Text
Description: