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
Graph coloring
(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!
=== Register allocation === {{Main|Register allocation}} A [[compiler]] is a [[computer program]] that translates one [[computer language]] into another. To improve the execution time of the resulting code, one of the techniques of [[compiler optimization]] is [[register allocation]], where the most frequently used values of the compiled program are kept in the fast [[processor register]]s. Ideally, values are assigned to registers so that they can all reside in the registers when they are used. The textbook approach to this problem is to model it as a graph coloring problem.{{sfnp|Chaitin|1982}} The compiler constructs an ''interference graph'', where vertices are variables and an edge connects two vertices if they are needed at the same time. If the graph can be colored with ''k'' colors then any set of variables needed at the same time can be stored in at most ''k'' registers.
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)