Java Reference
In-Depth Information
Splitting Intervals
In some cases, where an interval cannot be assigned a physical register for its entire lifetime,
we will want to split intervals.
Consider the interval for virtual register V33:
V33: [5, 35] [45, 50]
Originally, this interval is modeled by the NInterval object in Figure 7.6(a).
FIGURE 7.6 The splitting of interval V33.
Then, we split the interval twice:
1. First, the interval is split at position 20. This creates a new interval V39 (the next
available virtual register number) with all ranges and use positions above 20. The
original range [5, 35] is split into the range [5, 20] for interval V33 and the range [25,
35] for interval V39.
2. Next, the interval V39 is split at position 40, creating the new interval V40. Although
the split occurred at position 40, interval V39 now ends at position 35 and interval
V40 starts at position 45 because neither interval is live between 35 and 45.
The result of the two splits is illustrated in Figure 7.6(b). Each interval maintains an array
of split children.
 
Search WWH ::




Custom Search