Skip to content

Commit

Permalink
Move arguments/results allocation inside the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
rkarabut committed Dec 5, 2024
1 parent 4c69ed6 commit dc12963
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ impl DependencyContext {
all_functions: &BTreeMap<FunctionId, Function>,
) {
trace!("processing instructions of block {} of function {}", block, function);
let mut arguments = Vec::new();
let mut results = Vec::new();

for instruction in function.dfg[block].instructions() {
// Optimization: there is no reason to do anything until a Brillig
Expand All @@ -243,8 +241,8 @@ impl DependencyContext {
}
}

arguments.clear();
results.clear();
let mut arguments = Vec::new();
let mut results = Vec::new();

// Collect non-constant instruction arguments
function.dfg[*instruction].for_each_value(|value_id| {
Expand Down

0 comments on commit dc12963

Please sign in to comment.