Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Register allocation
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Mixed approaches === ==== Hybrid allocation ==== Some other register allocation approaches do not limit to one technique to optimize register's use. Cavazos et al., for instance, proposed a solution where it is possible to use both the linear scan and the graph coloring algorithms.{{sfn|Eisl|Marr|Würthinger|Mössenböck|2017|p=11}} In this approach, the choice between one or the other solution is determined dynamically: first, a [[machine learning]] algorithm is used "offline", that is to say not at runtime, to build a heuristic function that determines which allocation algorithm needs to be used. The heuristic function is then used at runtime; in light of the code behavior, the allocator can then choose between one of the two available algorithms.{{sfn|Cavazos|Moss|O’Boyle|2006|p=124-127}} Trace register allocation is a recent approach developed by Eisl et al.{{sfn|Eisl|Grimmer|Simon|Würthinger|2016|p=14:1}}{{sfn|Eisl|Grimmer|Simon|Würthinger|2016|p=1}} This technique handles the allocation locally: it relies on dynamic [[Profiling (computer programming)|profiling]] data to determine which branches will be the most frequently used in a given control flow graph. It then infers a set of "traces" (i.e. code segments) in which the merge point is ignored in favor of the most used branch. Each trace is then independently processed by the allocator. This approach can be considered as hybrid because it is possible to use different register allocation algorithms between the different traces.{{sfn|Eisl|Grimmer|Simon|Würthinger|2016|p=4}} ==== Split allocation ==== Split allocation is another register allocation technique that combines different approaches, usually considered as opposite. For instance, the hybrid allocation technique can be considered as split because the first heuristic building stage is performed offline, and the heuristic use is performed online.{{sfn|Cavazos|Moss|O’Boyle|2006|p=124}} In the same fashion, B. Diouf et al. proposed an allocation technique relying both on offline and online behaviors, namely static and dynamic compilation.{{sfn|Diouf|Cohen|Rastello|Cavazos|2010|p=66}}{{sfn|Cohen|Rohou|2010|p=1}} During the offline stage, an optimal spill set is first gathered using [[Integer programming|Integer Linear Programming]]. Then, live ranges are annotated using the <code>compressAnnotation</code> algorithm which relies on the previously identified optimal spill set. Register allocation is performed afterwards during the online stage, based on the data collected in the offline phase.{{sfn|Diouf|Cohen|Rastello|Cavazos|2010|p=72}} In 2007, Bouchez et al. suggested as well to split the register allocation in different stages, having one stage dedicated to spilling, and one dedicated to coloring and coalescing.{{sfn|Bouchez|Darte|Rastello|2007a|p=1}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)