Skip to content

Commit

Permalink
Fix mem usage tracking of semir (#4684)
Browse files Browse the repository at this point in the history
The call got misplaced during refactoring.
  • Loading branch information
jonmeow authored Dec 14, 2024
1 parent 18d9935 commit 1d5d461
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions toolchain/driver/compile_subcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,6 @@ class CompilationUnit {

sem_ir_.emplace(&*parse_tree_, check_ir_id, parse_tree_->packaging_decl(),
value_stores_, input_filename_);
if (mem_usage_) {
mem_usage_->Collect("sem_ir_", *sem_ir_);
}

sem_ir_converter_.emplace(node_converters, &*sem_ir_);
return {.consumer = consumer_,
.value_stores = &value_stores_,
Expand All @@ -465,6 +461,10 @@ class CompilationUnit {
// to wait for code generation.
consumer_->Flush();

if (mem_usage_) {
mem_usage_->Collect("sem_ir_", *sem_ir_);
}

if (options_.dump_raw_sem_ir && IncludeInDumps()) {
CARBON_VLOG("*** Raw SemIR::File ***\n{0}\n", *sem_ir_);
sem_ir_->Print(driver_env_->output_stream, options_.builtin_sem_ir);
Expand Down

0 comments on commit 1d5d461

Please sign in to comment.