Reconstruct locations of the original source variable
This commit is contained in:
committed by
Dan Gohman
parent
d6059d4605
commit
8f95c51730
@@ -29,6 +29,7 @@ use crate::simple_gvn::do_simple_gvn;
|
||||
use crate::simple_preopt::do_preopt;
|
||||
use crate::timing;
|
||||
use crate::unreachable_code::eliminate_unreachable_code;
|
||||
use crate::value_label::{build_value_labels_ranges, ComparableSourceLoc, ValueLabelsRanges};
|
||||
use crate::verifier::{verify_context, verify_locations, VerifierErrors, VerifierResult};
|
||||
use std::vec::Vec;
|
||||
|
||||
@@ -331,4 +332,13 @@ impl Context {
|
||||
self.verify_locations_if(isa)?;
|
||||
Ok(code_size)
|
||||
}
|
||||
|
||||
/// Builds ranges and location for specified value labels.
|
||||
pub fn build_value_labels_ranges(&self, isa: &TargetIsa) -> CodegenResult<ValueLabelsRanges> {
|
||||
Ok(build_value_labels_ranges::<ComparableSourceLoc>(
|
||||
&self.func,
|
||||
&self.regalloc,
|
||||
isa,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user