29 AddTimer(Label::Timer).start();
40 JLM_ASSERT(currentTransformationTimer_ ==
nullptr);
41 currentTransformationTimer_ = &AddTimer(
fullName +
"-Timer");
42 currentTransformationTimer_->start();
48 JLM_ASSERT(currentTransformationTimer_ !=
nullptr);
49 currentTransformationTimer_->stop();
50 currentTransformationTimer_ =
nullptr;
56 GetTimer(Label::Timer).stop();
57 AddMeasurement(Label::NumRvsdgNodesAfter,
nnodes(&graph.GetRootRegion()));
60 static std::unique_ptr<Statistics>
63 return std::make_unique<Statistics>(
sourceFile);
69 return collector.IsDemanded(Id::RvsdgOptimization);
83 std::unique_ptr<Statistics> statistics;
85 statistics = Statistics::Create(
rvsdgModule.SourceFilePath().value());
88 statistics->StartMeasuring();
104 statistics->StartTransformationMeasuring(
112 statistics->EndTransformationMeasuring();
114 if (dumpRvsdgGraphs_)
static jlm::util::StatisticsCollector statisticsCollector
util::graph::Graph & WriteGraphs(util::graph::Writer &writer, const Region ®ion, bool emitTypeGraph)
Region & GetRootRegion() const noexcept
const FilePath & GetOrCreateOutputDirectory() const noexcept
const StatisticsCollectorSettings & GetSettings() const noexcept
void CollectDemandedStatistics(std::unique_ptr< Statistics > statistics)
size_t nnodes(const jlm::rvsdg::Region *region) noexcept
NodeType * TryGetOwnerNode(const rvsdg::Input &input) noexcept
Checks if this is an input to a node of specified type.
static std::string strfmt(Args... args)