Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
vezenovm committed Aug 29, 2024
1 parent e0ad0a9 commit 5bbaca8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions compiler/noirc_evaluator/src/ssa/opt/mem2reg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ impl<'f> PerFunctionContext<'f> {
}

self.handle_terminator(block, &mut references);

// If there's only 1 block in the function total, we can remove any remaining last stores
// as well. We can't do this if there are multiple blocks since subsequent blocks may
// reference these stores.
Expand Down Expand Up @@ -271,7 +271,7 @@ impl<'f> PerFunctionContext<'f> {
// function calls in-between, we can remove the previous store.
if let Some(last_store) = references.last_stores.get(&address) {
self.instructions_to_remove.insert(*last_store);
}
}

if let Some(last_load) = self.last_loads.get(&address) {
let load_result = self.inserter.function.dfg.instruction_results(*last_load)[0];
Expand All @@ -281,7 +281,7 @@ impl<'f> PerFunctionContext<'f> {
}

references.set_known_value(address, value);
references.last_stores.insert(address, instruction);
references.last_stores.insert(address, instruction);
}
Instruction::Allocate => {
// Register the new reference
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_evaluator/src/ssa/opt/mem2reg/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ impl Block {
// even if we don't have a known address? If not we'll have to invalidate all
// known references if this reference is ever stored to.
}
}
}
// else {
// self.references.insert(result, ReferenceValue::Known(address));
// }
Expand Down

0 comments on commit 5bbaca8

Please sign in to comment.