Skip to content

Commit

Permalink
GC metadata in trace verbosity pass.
Browse files Browse the repository at this point in the history
Also remove some debris and use our `IsOkAndHolds()`.

Work towards #1082.

PiperOrigin-RevId: 613721618
  • Loading branch information
grebe authored and copybara-github committed Mar 7, 2024
1 parent b92a9fe commit 851c6fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions xls/codegen/trace_verbosity_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ absl::StatusOr<bool> TraceVerbosityPass::RunInternal(
CodegenPassUnit* unit, const CodegenPassOptions& options,
PassResults* results) const {
bool changed = false;
// for (const auto& [block, metadata] : unit->metadata) {
XLS_ASSIGN_OR_RETURN(
bool block_changed,
FilterVerboseTraces(unit->block,
options.codegen_options.max_trace_verbosity()));
changed = changed || block_changed;
// }

if (changed) {
unit->GcMetadata();
}

return changed;
}
Expand Down
2 changes: 1 addition & 1 deletion xls/codegen/trace_verbosity_pass_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ using TraceVerbosityPassTest = IrTestBase;
using ::testing::Contains;
using ::testing::Eq;
using ::testing::Gt;
using ::testing::status::IsOkAndHolds;
using ::xls::status_testing::IsOkAndHolds;

namespace m = ::xls::op_matchers;

Expand Down

0 comments on commit 851c6fd

Please sign in to comment.