Related articles |
---|
Register Spilling Heuristic ? shafitvm@gmail.com (Mohamed Shafi) (2007-10-24) |
Re: Register Spilling Heuristic ? preston.briggs@gmail.com (preston.briggs@gmail.com) (2007-10-24) |
From: | "preston.briggs@gmail.com" <preston.briggs@gmail.com> |
Newsgroups: | comp.compilers |
Date: | Wed, 24 Oct 2007 21:56:30 -0000 |
Organization: | Compilers Central |
References: | 07-10-075 |
Keywords: | registers |
Posted-Date: | 24 Oct 2007 18:38:16 EDT |
On Oct 23, 9:49 pm, "Mohamed Shafi" <shafi...@gmail.com> wrote:
> I am trying to implement Briggs register allocator. While doing that i
> came across documents indicating how to choose nodes for spilling. The
> documents says to avoid choosing nodes that are the tiny live ranges
> resulting from the fetches of previously spilled registers.
>
> What does this mean? [...]
Generally, when a live range is spilled, a store is inserted
immediately after each definition of the live range and a load is
inserted immediately before each use. These new instructions define
new live ranges (for example, reaching from an existing definition to
a new store) that should not be spilled again (because they are so
show that there's possible profit in spilling them). In my allocator,
such live ranges are given an infinite spill cost and will not be
spilled.
My impression is that some people, in attempting to implement my
allocator, get the calculation of spill costs wrong, especially for
these very short ranges. This causes their allocators to run for a
long time, repeatedly spilling and rebuilding the interference
graph...
Care is required. Implement plenty of debugging infrastructure to
help you examine computed spill costs and make sure they're correct.
Preston
Return to the
comp.compilers page.
Search the
comp.compilers archives again.