Skip to content

Commit 7fcd4cb

Browse files
first_assignment no longer needs a getter
1 parent da03a98 commit 7fcd4cb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/librustc_codegen_ssa/mir/analyze.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,6 @@ impl<Bx: BuilderMethods<'a, 'tcx>> LocalAnalyzer<'mir, 'a, 'tcx, Bx> {
6969
analyzer
7070
}
7171

72-
fn first_assignment(&self, local: mir::Local) -> Option<Location> {
73-
self.first_assignment[local]
74-
}
75-
7672
fn not_ssa(&mut self, local: mir::Local) {
7773
debug!("marking {:?} as non-SSA", local);
7874
self.non_ssa_locals.insert(local);
@@ -220,7 +216,7 @@ impl<'mir, 'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> Visitor<'tcx>
220216
// optimizations) require locals to be in (uninitialized) memory.
221217
// N.B., there can be uninitialized reads of a local visited after
222218
// an assignment to that local, if they happen on disjoint paths.
223-
let ssa_read = match self.first_assignment(local) {
219+
let ssa_read = match self.first_assignment[local] {
224220
Some(assignment_location) => {
225221
assignment_location.dominates(location, &self.dominators)
226222
}

0 commit comments

Comments
 (0)