From 5bbaca85ecc267fd3602c138ace66e5388e9ca1d Mon Sep 17 00:00:00 2001 From: Maxim Vezenov Date: Thu, 29 Aug 2024 21:09:14 +0000 Subject: [PATCH] fmt --- compiler/noirc_evaluator/src/ssa/opt/mem2reg.rs | 6 +++--- compiler/noirc_evaluator/src/ssa/opt/mem2reg/block.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/noirc_evaluator/src/ssa/opt/mem2reg.rs b/compiler/noirc_evaluator/src/ssa/opt/mem2reg.rs index 1701df03502..aebf9abbe50 100644 --- a/compiler/noirc_evaluator/src/ssa/opt/mem2reg.rs +++ b/compiler/noirc_evaluator/src/ssa/opt/mem2reg.rs @@ -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. @@ -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]; @@ -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 diff --git a/compiler/noirc_evaluator/src/ssa/opt/mem2reg/block.rs b/compiler/noirc_evaluator/src/ssa/opt/mem2reg/block.rs index 54a7eb58067..ca11a4ec57f 100644 --- a/compiler/noirc_evaluator/src/ssa/opt/mem2reg/block.rs +++ b/compiler/noirc_evaluator/src/ssa/opt/mem2reg/block.rs @@ -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)); // }