Skip to content

Commit 24c1180

Browse files
authored
Remove the merged_into field of LiveRangeData (#141)
This field was never written to after initialization, and the only function that looked at its value was never called.
1 parent 19495b9 commit 24c1180

3 files changed

Lines changed: 1 addition & 17 deletions

File tree

src/ion/data_structures.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ pub struct LiveRange {
123123
pub uses_spill_weight_and_flags: u32,
124124

125125
pub uses: UseList,
126-
127-
pub merged_into: LiveRangeIndex,
128126
}
129127

130128
#[derive(Clone, Copy, Debug, PartialEq, Eq)]

src/ion/liveranges.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,7 @@ impl<'a, F: Function> Env<'a, F> {
175175
vreg: VRegIndex::invalid(),
176176
bundle: LiveBundleIndex::invalid(),
177177
uses_spill_weight_and_flags: 0,
178-
179178
uses: smallvec![],
180-
181-
merged_into: LiveRangeIndex::invalid(),
182179
});
183180

184181
LiveRangeIndex::new(idx)

src/ion/merge.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212

1313
//! Bundle merging.
1414
15-
use super::{
16-
Env, LiveBundleIndex, LiveRangeIndex, SpillSet, SpillSetIndex, SpillSlotIndex, VRegIndex,
17-
};
15+
use super::{Env, LiveBundleIndex, SpillSet, SpillSetIndex, SpillSlotIndex, VRegIndex};
1816
use crate::{
1917
ion::data_structures::BlockparamOut, Function, Inst, OperandConstraint, OperandKind, PReg,
2018
};
@@ -352,15 +350,6 @@ impl<'a, F: Function> Env<'a, F> {
352350
trace!("done merging bundles");
353351
}
354352

355-
pub fn resolve_merged_lr(&self, mut lr: LiveRangeIndex) -> LiveRangeIndex {
356-
let mut iter = 0;
357-
while iter < 100 && self.ranges[lr.index()].merged_into.is_valid() {
358-
lr = self.ranges[lr.index()].merged_into;
359-
iter += 1;
360-
}
361-
lr
362-
}
363-
364353
pub fn compute_bundle_prio(&self, bundle: LiveBundleIndex) -> u32 {
365354
// The priority is simply the total "length" -- the number of
366355
// instructions covered by all LiveRanges.

0 commit comments

Comments
 (0)