Generalize debug-info support a bit. (#34)
* Generalize debug-info support a bit. Previously, debug value-label support required each vreg to have a disjoint sequence of instruction ranges, each with one label. Unfortunately, it's entirely possible for multiple values at the program level to map to one vreg at the IR level, leading to multiple labels. This PR generalizes the debug-info generation support to allow for arbitrary (label, range, vreg) tuples, as long as they are sorted by vreg, with no other requirements. The lookup is a little more costly when we generate the debuginfo, but in practice we shouldn't have more than a *few* debug value labels per vreg, so in practice the constants should be small. * Typo fix from Amanieu Co-authored-by: Amanieu d'Antras <amanieu@gmail.com> Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
This commit is contained in:
@@ -962,9 +962,7 @@ pub trait Function {
|
||||
/// The instruction indices imply a program point just *before*
|
||||
/// the instruction.
|
||||
///
|
||||
/// Preconditions: we require this slice to be sorted in
|
||||
/// lexicographic order (i.e., first by vreg, then by instruction
|
||||
/// index), and we require the ranges to be non-overlapping.
|
||||
/// Precondition: we require this slice to be sorted by vreg.
|
||||
fn debug_value_labels(&self) -> &[(VReg, Inst, Inst, u32)] {
|
||||
&[]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user