From 0647a791de9287ce18b3130abe274952ec79a26b Mon Sep 17 00:00:00 2001 From: Nico Reissmann Date: Tue, 6 Feb 2024 04:49:34 +0100 Subject: [PATCH 1/3] Rename BasicEncoderEncoding to MemoryStateEncoder --- .../opt/alias-analyses/MemoryStateEncoder.cpp | 2 +- jlm/tooling/CommandLine.cpp | 20 +++++++++---------- jlm/tooling/CommandLine.hpp | 2 +- jlm/util/Statistics.hpp | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/jlm/llvm/opt/alias-analyses/MemoryStateEncoder.cpp b/jlm/llvm/opt/alias-analyses/MemoryStateEncoder.cpp index 2ffbfaeba..3a3bb67b5 100644 --- a/jlm/llvm/opt/alias-analyses/MemoryStateEncoder.cpp +++ b/jlm/llvm/opt/alias-analyses/MemoryStateEncoder.cpp @@ -24,7 +24,7 @@ class EncodingStatistics final : public jlm::util::Statistics ~EncodingStatistics() override = default; explicit EncodingStatistics(jlm::util::filepath sourceFile) - : Statistics(Statistics::Id::BasicEncoderEncoding), + : Statistics(Statistics::Id::MemoryStateEncoder), NumNodesBefore_(0), SourceFile_(std::move(sourceFile)) {} diff --git a/jlm/tooling/CommandLine.cpp b/jlm/tooling/CommandLine.cpp index c90e33e26..847287cd2 100644 --- a/jlm/tooling/CommandLine.cpp +++ b/jlm/tooling/CommandLine.cpp @@ -183,8 +183,6 @@ JlmOptCommandLineOptions::FromCommandLineArgumentToStatisticsId( { static std::unordered_map map( { { StatisticsCommandLineArgument::Aggregation_, util::Statistics::Id::Aggregation }, - { StatisticsCommandLineArgument::BasicEncoderEncoding_, - util::Statistics::Id::BasicEncoderEncoding }, { StatisticsCommandLineArgument::Annotation_, util::Statistics::Id::Annotation }, { StatisticsCommandLineArgument::CommonNodeElimination_, util::Statistics::Id::CommonNodeElimination }, @@ -202,6 +200,8 @@ JlmOptCommandLineOptions::FromCommandLineArgumentToStatisticsId( { StatisticsCommandLineArgument::LoopUnrolling_, util::Statistics::Id::LoopUnrolling }, { StatisticsCommandLineArgument::MemoryNodeProvisioning_, util::Statistics::Id::MemoryNodeProvisioning }, + { StatisticsCommandLineArgument::MemoryStateEncoder_, + util::Statistics::Id::MemoryStateEncoder }, { StatisticsCommandLineArgument::PullNodes_, util::Statistics::Id::PullNodes }, { StatisticsCommandLineArgument::PushNodes_, util::Statistics::Id::PushNodes }, { StatisticsCommandLineArgument::ReduceNodes_, util::Statistics::Id::ReduceNodes }, @@ -230,8 +230,6 @@ JlmOptCommandLineOptions::ToCommandLineArgument(jlm::util::Statistics::Id statis { util::Statistics::Id::AndersenAnalysis, StatisticsCommandLineArgument::AndersenAnalysis_ }, { util::Statistics::Id::Annotation, StatisticsCommandLineArgument::Annotation_ }, - { util::Statistics::Id::BasicEncoderEncoding, - StatisticsCommandLineArgument::BasicEncoderEncoding_ }, { util::Statistics::Id::CommonNodeElimination, StatisticsCommandLineArgument::CommonNodeElimination_ }, { util::Statistics::Id::ControlFlowRecovery, @@ -248,6 +246,8 @@ JlmOptCommandLineOptions::ToCommandLineArgument(jlm::util::Statistics::Id statis { util::Statistics::Id::LoopUnrolling, StatisticsCommandLineArgument::LoopUnrolling_ }, { util::Statistics::Id::MemoryNodeProvisioning, StatisticsCommandLineArgument::MemoryNodeProvisioning_ }, + { util::Statistics::Id::MemoryStateEncoder, + StatisticsCommandLineArgument::MemoryStateEncoder_ }, { util::Statistics::Id::PullNodes, StatisticsCommandLineArgument::PullNodes_ }, { util::Statistics::Id::PushNodes, StatisticsCommandLineArgument::PushNodes_ }, { util::Statistics::Id::ReduceNodes, StatisticsCommandLineArgument::ReduceNodes_ }, @@ -512,7 +512,6 @@ JlcCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) auto aggregationStatisticsId = util::Statistics::Id::Aggregation; auto andersenAnalysisStatisticsId = util::Statistics::Id::AndersenAnalysis; auto annotationStatisticsId = util::Statistics::Id::Annotation; - auto basicEncoderEncodingStatisticsId = util::Statistics::Id::BasicEncoderEncoding; auto commonNodeEliminationStatisticsId = util::Statistics::Id::CommonNodeElimination; auto controlFlowRecoveryStatisticsId = util::Statistics::Id::ControlFlowRecovery; auto dataNodeToDeltaStatisticsId = util::Statistics::Id::DataNodeToDelta; @@ -522,6 +521,7 @@ JlcCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) auto jlmToRvsdgConversionStatisticsId = util::Statistics::Id::JlmToRvsdgConversion; auto loopUnrollingStatisticsId = util::Statistics::Id::LoopUnrolling; auto memoryNodeProvisioningStatisticsId = util::Statistics::Id::MemoryNodeProvisioning; + auto memoryStateEncoderStatisticsId = util::Statistics::Id::MemoryStateEncoder; auto pullNodesStatisticsId = util::Statistics::Id::PullNodes; auto pushNodesStatisticsId = util::Statistics::Id::PushNodes; auto reduceNodesStatisticsId = util::Statistics::Id::ReduceNodes; @@ -547,8 +547,8 @@ JlcCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) JlmOptCommandLineOptions::ToCommandLineArgument(annotationStatisticsId), "Collect aggregation tree annotation pass statistics."), ::clEnumValN( - basicEncoderEncodingStatisticsId, - JlmOptCommandLineOptions::ToCommandLineArgument(basicEncoderEncodingStatisticsId), + memoryStateEncoderStatisticsId, + JlmOptCommandLineOptions::ToCommandLineArgument(memoryStateEncoderStatisticsId), "Collect memory state encoding pass statistics."), ::clEnumValN( commonNodeEliminationStatisticsId, @@ -771,7 +771,6 @@ JlmOptCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) auto aggregationStatisticsId = util::Statistics::Id::Aggregation; auto andersenAnalysisStatisticsId = util::Statistics::Id::AndersenAnalysis; auto annotationStatisticsId = util::Statistics::Id::Annotation; - auto basicEncoderEncodingStatisticsId = util::Statistics::Id::BasicEncoderEncoding; auto commonNodeEliminationStatisticsId = util::Statistics::Id::CommonNodeElimination; auto controlFlowRecoveryStatisticsId = util::Statistics::Id::ControlFlowRecovery; auto dataNodeToDeltaStatisticsId = util::Statistics::Id::DataNodeToDelta; @@ -781,6 +780,7 @@ JlmOptCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) auto jlmToRvsdgConversionStatisticsId = util::Statistics::Id::JlmToRvsdgConversion; auto loopUnrollingStatisticsId = util::Statistics::Id::LoopUnrolling; auto memoryNodeProvisioningStatisticsId = util::Statistics::Id::MemoryNodeProvisioning; + auto memoryStateEncoderStatisticsId = util::Statistics::Id::MemoryStateEncoder; auto pullNodesStatisticsId = util::Statistics::Id::PullNodes; auto pushNodesStatisticsId = util::Statistics::Id::PushNodes; auto reduceNodesStatisticsId = util::Statistics::Id::ReduceNodes; @@ -805,8 +805,8 @@ JlmOptCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) JlmOptCommandLineOptions::ToCommandLineArgument(annotationStatisticsId), "Write annotation statistics to file."), ::clEnumValN( - basicEncoderEncodingStatisticsId, - JlmOptCommandLineOptions::ToCommandLineArgument(basicEncoderEncodingStatisticsId), + memoryStateEncoderStatisticsId, + JlmOptCommandLineOptions::ToCommandLineArgument(memoryStateEncoderStatisticsId), "Write encoding statistics of basic encoder to file."), ::clEnumValN( commonNodeEliminationStatisticsId, diff --git a/jlm/tooling/CommandLine.hpp b/jlm/tooling/CommandLine.hpp index 8ce3e2338..cea110739 100644 --- a/jlm/tooling/CommandLine.hpp +++ b/jlm/tooling/CommandLine.hpp @@ -179,7 +179,6 @@ class JlmOptCommandLineOptions final : public CommandLineOptions inline static const char * Aggregation_ = "print-aggregation-time"; inline static const char * AndersenAnalysis_ = "print-andersen-analysis"; inline static const char * Annotation_ = "print-annotation-time"; - inline static const char * BasicEncoderEncoding_ = "print-basicencoder-encoding"; inline static const char * CommonNodeElimination_ = "print-cne-stat"; inline static const char * ControlFlowRecovery_ = "print-cfr-time"; inline static const char * DataNodeToDelta_ = "printDataNodeToDelta"; @@ -189,6 +188,7 @@ class JlmOptCommandLineOptions final : public CommandLineOptions inline static const char * JlmToRvsdgConversion_ = "print-jlm-rvsdg-conversion"; inline static const char * LoopUnrolling_ = "print-unroll-stat"; inline static const char * MemoryNodeProvisioning_ = "print-memory-node-provisioning"; + inline static const char * MemoryStateEncoder_ = "print-basicencoder-encoding"; inline static const char * PullNodes_ = "print-pull-stat"; inline static const char * PushNodes_ = "print-push-stat"; inline static const char * ReduceNodes_ = "print-reduction-stat"; diff --git a/jlm/util/Statistics.hpp b/jlm/util/Statistics.hpp index 3431d5327..1e22b7289 100644 --- a/jlm/util/Statistics.hpp +++ b/jlm/util/Statistics.hpp @@ -26,7 +26,6 @@ class Statistics Aggregation, Annotation, - BasicEncoderEncoding, CommonNodeElimination, ControlFlowRecovery, DataNodeToDelta, @@ -36,6 +35,7 @@ class Statistics JlmToRvsdgConversion, LoopUnrolling, MemoryNodeProvisioning, + MemoryStateEncoder, PullNodes, PushNodes, ReduceNodes, From 05e0bf57347442d8b33cdca427576796d6933a32 Mon Sep 17 00:00:00 2001 From: Nico Reissmann Date: Tue, 6 Feb 2024 04:58:52 +0100 Subject: [PATCH 2/3] Separate agnostic memory node provisioning statistics id --- .../AgnosticMemoryNodeProvider.hpp | 2 +- jlm/tooling/CommandLine.cpp | 18 ++++++++++++++++++ jlm/tooling/CommandLine.hpp | 2 ++ jlm/util/Statistics.hpp | 1 + .../TestAgnosticMemoryNodeProvider.cpp | 2 +- 5 files changed, 23 insertions(+), 2 deletions(-) diff --git a/jlm/llvm/opt/alias-analyses/AgnosticMemoryNodeProvider.hpp b/jlm/llvm/opt/alias-analyses/AgnosticMemoryNodeProvider.hpp index ff95750d5..5ea2faa52 100644 --- a/jlm/llvm/opt/alias-analyses/AgnosticMemoryNodeProvider.hpp +++ b/jlm/llvm/opt/alias-analyses/AgnosticMemoryNodeProvider.hpp @@ -91,7 +91,7 @@ class AgnosticMemoryNodeProvider::Statistics final : public util::Statistics util::filepath sourceFile, const util::StatisticsCollector & statisticsCollector, const PointsToGraph & pointsToGraph) - : util::Statistics(Statistics::Id::MemoryNodeProvisioning), + : util::Statistics(Statistics::Id::AgnosticMemoryNodeProvisioning), SourceFile_(std::move(sourceFile)), NumPointsToGraphMemoryNodes_(0), StatisticsCollector_(statisticsCollector) diff --git a/jlm/tooling/CommandLine.cpp b/jlm/tooling/CommandLine.cpp index 847287cd2..9dff5daa2 100644 --- a/jlm/tooling/CommandLine.cpp +++ b/jlm/tooling/CommandLine.cpp @@ -183,6 +183,8 @@ JlmOptCommandLineOptions::FromCommandLineArgumentToStatisticsId( { static std::unordered_map map( { { StatisticsCommandLineArgument::Aggregation_, util::Statistics::Id::Aggregation }, + { StatisticsCommandLineArgument::AgnosticMemoryNodeProvisioning_, + util::Statistics::Id::AgnosticMemoryNodeProvisioning }, { StatisticsCommandLineArgument::Annotation_, util::Statistics::Id::Annotation }, { StatisticsCommandLineArgument::CommonNodeElimination_, util::Statistics::Id::CommonNodeElimination }, @@ -227,6 +229,8 @@ JlmOptCommandLineOptions::ToCommandLineArgument(jlm::util::Statistics::Id statis { static std::unordered_map map( { { util::Statistics::Id::Aggregation, StatisticsCommandLineArgument::Aggregation_ }, + { util::Statistics::Id::AgnosticMemoryNodeProvisioning, + StatisticsCommandLineArgument::AgnosticMemoryNodeProvisioning_ }, { util::Statistics::Id::AndersenAnalysis, StatisticsCommandLineArgument::AndersenAnalysis_ }, { util::Statistics::Id::Annotation, StatisticsCommandLineArgument::Annotation_ }, @@ -510,6 +514,8 @@ JlcCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) cl::value_desc("value")); auto aggregationStatisticsId = util::Statistics::Id::Aggregation; + auto agnosticMemoryNodeProvisioningStatisticsId = + util::Statistics::Id::AgnosticMemoryNodeProvisioning; auto andersenAnalysisStatisticsId = util::Statistics::Id::AndersenAnalysis; auto annotationStatisticsId = util::Statistics::Id::Annotation; auto commonNodeEliminationStatisticsId = util::Statistics::Id::CommonNodeElimination; @@ -538,6 +544,11 @@ JlcCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) aggregationStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(aggregationStatisticsId), "Collect control flow graph aggregation pass statistics."), + ::clEnumValN( + agnosticMemoryNodeProvisioningStatisticsId, + JlmOptCommandLineOptions::ToCommandLineArgument( + agnosticMemoryNodeProvisioningStatisticsId), + "Collect agnostic memory node provisioning pass statistics."), ::clEnumValN( andersenAnalysisStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(andersenAnalysisStatisticsId), @@ -769,6 +780,8 @@ JlmOptCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) cl::value_desc("dir")); auto aggregationStatisticsId = util::Statistics::Id::Aggregation; + auto agnosticMemoryNodeProvisioningStatisticsId = + util::Statistics::Id::AgnosticMemoryNodeProvisioning; auto andersenAnalysisStatisticsId = util::Statistics::Id::AndersenAnalysis; auto annotationStatisticsId = util::Statistics::Id::Annotation; auto commonNodeEliminationStatisticsId = util::Statistics::Id::CommonNodeElimination; @@ -796,6 +809,11 @@ JlmOptCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) aggregationStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(aggregationStatisticsId), "Write aggregation statistics to file."), + ::clEnumValN( + agnosticMemoryNodeProvisioningStatisticsId, + JlmOptCommandLineOptions::ToCommandLineArgument( + agnosticMemoryNodeProvisioningStatisticsId), + "Collect agnostic memory node provisioning pass statistics."), ::clEnumValN( andersenAnalysisStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(andersenAnalysisStatisticsId), diff --git a/jlm/tooling/CommandLine.hpp b/jlm/tooling/CommandLine.hpp index cea110739..4e228aef7 100644 --- a/jlm/tooling/CommandLine.hpp +++ b/jlm/tooling/CommandLine.hpp @@ -177,6 +177,8 @@ class JlmOptCommandLineOptions final : public CommandLineOptions struct StatisticsCommandLineArgument { inline static const char * Aggregation_ = "print-aggregation-time"; + inline static const char * AgnosticMemoryNodeProvisioning_ = + "print-agnostic-memory-node-provisioning"; inline static const char * AndersenAnalysis_ = "print-andersen-analysis"; inline static const char * Annotation_ = "print-annotation-time"; inline static const char * CommonNodeElimination_ = "print-cne-stat"; diff --git a/jlm/util/Statistics.hpp b/jlm/util/Statistics.hpp index 1e22b7289..d36b3ed10 100644 --- a/jlm/util/Statistics.hpp +++ b/jlm/util/Statistics.hpp @@ -25,6 +25,7 @@ class Statistics FirstEnumValue, // must always be the first enum value, used for iteration Aggregation, + AgnosticMemoryNodeProvisioning, Annotation, CommonNodeElimination, ControlFlowRecovery, diff --git a/tests/jlm/llvm/opt/alias-analyses/TestAgnosticMemoryNodeProvider.cpp b/tests/jlm/llvm/opt/alias-analyses/TestAgnosticMemoryNodeProvider.cpp index a0da1664a..0fa8ec20f 100644 --- a/tests/jlm/llvm/opt/alias-analyses/TestAgnosticMemoryNodeProvider.cpp +++ b/tests/jlm/llvm/opt/alias-analyses/TestAgnosticMemoryNodeProvider.cpp @@ -830,7 +830,7 @@ TestStatistics() jlm::util::StatisticsCollectorSettings statisticsCollectorSettings( filePath, - { jlm::util::Statistics::Id::MemoryNodeProvisioning }); + { jlm::util::Statistics::Id::AgnosticMemoryNodeProvisioning }); jlm::util::StatisticsCollector statisticsCollector(statisticsCollectorSettings); // Act From c0c59ce2b978f97733f153e7158f23997cb96ac6 Mon Sep 17 00:00:00 2001 From: Nico Reissmann Date: Tue, 6 Feb 2024 05:08:08 +0100 Subject: [PATCH 3/3] Rename memoryNodeProvisioning statistics id to RegionAwareMemoryNodeProvisioning --- .../RegionAwareMemoryNodeProvider.hpp | 2 +- jlm/tooling/CommandLine.cpp | 32 +++++++++++-------- jlm/tooling/CommandLine.hpp | 3 +- jlm/util/Statistics.hpp | 2 +- .../TestRegionAwareMemoryNodeProvider.cpp | 2 +- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/jlm/llvm/opt/alias-analyses/RegionAwareMemoryNodeProvider.hpp b/jlm/llvm/opt/alias-analyses/RegionAwareMemoryNodeProvider.hpp index f0b4a62a1..e3d5d0223 100644 --- a/jlm/llvm/opt/alias-analyses/RegionAwareMemoryNodeProvider.hpp +++ b/jlm/llvm/opt/alias-analyses/RegionAwareMemoryNodeProvider.hpp @@ -202,7 +202,7 @@ class RegionAwareMemoryNodeProvider::Statistics final : public jlm::util::Statis const util::StatisticsCollector & statisticsCollector, const RvsdgModule & rvsdgModule, const PointsToGraph & pointsToGraph) - : jlm::util::Statistics(Statistics::Id::MemoryNodeProvisioning), + : jlm::util::Statistics(Statistics::Id::RegionAwareMemoryNodeProvisioning), NumRvsdgNodes_(0), NumRvsdgRegions_(0), NumPointsToGraphMemoryNodes_(0), diff --git a/jlm/tooling/CommandLine.cpp b/jlm/tooling/CommandLine.cpp index 9dff5daa2..d017616e3 100644 --- a/jlm/tooling/CommandLine.cpp +++ b/jlm/tooling/CommandLine.cpp @@ -200,13 +200,13 @@ JlmOptCommandLineOptions::FromCommandLineArgumentToStatisticsId( { StatisticsCommandLineArgument::JlmToRvsdgConversion_, util::Statistics::Id::JlmToRvsdgConversion }, { StatisticsCommandLineArgument::LoopUnrolling_, util::Statistics::Id::LoopUnrolling }, - { StatisticsCommandLineArgument::MemoryNodeProvisioning_, - util::Statistics::Id::MemoryNodeProvisioning }, { StatisticsCommandLineArgument::MemoryStateEncoder_, util::Statistics::Id::MemoryStateEncoder }, { StatisticsCommandLineArgument::PullNodes_, util::Statistics::Id::PullNodes }, { StatisticsCommandLineArgument::PushNodes_, util::Statistics::Id::PushNodes }, { StatisticsCommandLineArgument::ReduceNodes_, util::Statistics::Id::ReduceNodes }, + { StatisticsCommandLineArgument::RegionAwareMemoryNodeProvisioning_, + util::Statistics::Id::RegionAwareMemoryNodeProvisioning }, { StatisticsCommandLineArgument::RvsdgConstruction_, util::Statistics::Id::RvsdgConstruction }, { StatisticsCommandLineArgument::RvsdgDestruction_, @@ -248,13 +248,13 @@ JlmOptCommandLineOptions::ToCommandLineArgument(jlm::util::Statistics::Id statis { util::Statistics::Id::JlmToRvsdgConversion, StatisticsCommandLineArgument::JlmToRvsdgConversion_ }, { util::Statistics::Id::LoopUnrolling, StatisticsCommandLineArgument::LoopUnrolling_ }, - { util::Statistics::Id::MemoryNodeProvisioning, - StatisticsCommandLineArgument::MemoryNodeProvisioning_ }, { util::Statistics::Id::MemoryStateEncoder, StatisticsCommandLineArgument::MemoryStateEncoder_ }, { util::Statistics::Id::PullNodes, StatisticsCommandLineArgument::PullNodes_ }, { util::Statistics::Id::PushNodes, StatisticsCommandLineArgument::PushNodes_ }, { util::Statistics::Id::ReduceNodes, StatisticsCommandLineArgument::ReduceNodes_ }, + { util::Statistics::Id::RegionAwareMemoryNodeProvisioning, + StatisticsCommandLineArgument::RegionAwareMemoryNodeProvisioning_ }, { util::Statistics::Id::RvsdgConstruction, StatisticsCommandLineArgument::RvsdgConstruction_ }, { util::Statistics::Id::RvsdgDestruction, @@ -526,11 +526,12 @@ JlcCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) auto invariantValueRedirectionStatisticsId = util::Statistics::Id::InvariantValueRedirection; auto jlmToRvsdgConversionStatisticsId = util::Statistics::Id::JlmToRvsdgConversion; auto loopUnrollingStatisticsId = util::Statistics::Id::LoopUnrolling; - auto memoryNodeProvisioningStatisticsId = util::Statistics::Id::MemoryNodeProvisioning; auto memoryStateEncoderStatisticsId = util::Statistics::Id::MemoryStateEncoder; auto pullNodesStatisticsId = util::Statistics::Id::PullNodes; auto pushNodesStatisticsId = util::Statistics::Id::PushNodes; auto reduceNodesStatisticsId = util::Statistics::Id::ReduceNodes; + auto regionAwareMemoryNodeProvisioningStatisticsId = + util::Statistics::Id::RegionAwareMemoryNodeProvisioning; auto rvsdgConstructionStatisticsId = util::Statistics::Id::RvsdgConstruction; auto rvsdgDestructionStatisticsId = util::Statistics::Id::RvsdgDestruction; auto rvsdgOptimizationStatisticsId = util::Statistics::Id::RvsdgOptimization; @@ -594,10 +595,6 @@ JlcCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) loopUnrollingStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(loopUnrollingStatisticsId), "Collect loop unrolling pass statistics."), - ::clEnumValN( - memoryNodeProvisioningStatisticsId, - JlmOptCommandLineOptions::ToCommandLineArgument(memoryNodeProvisioningStatisticsId), - "Collect memory node provisioning pass statistics."), ::clEnumValN( pullNodesStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(pullNodesStatisticsId), @@ -610,6 +607,11 @@ JlcCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) reduceNodesStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(reduceNodesStatisticsId), "Collect node reduction pass statistics."), + ::clEnumValN( + regionAwareMemoryNodeProvisioningStatisticsId, + JlmOptCommandLineOptions::ToCommandLineArgument( + regionAwareMemoryNodeProvisioningStatisticsId), + "Collect memory node provisioning pass statistics."), ::clEnumValN( rvsdgConstructionStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(rvsdgConstructionStatisticsId), @@ -792,11 +794,12 @@ JlmOptCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) auto invariantValueRedirectionStatisticsId = util::Statistics::Id::InvariantValueRedirection; auto jlmToRvsdgConversionStatisticsId = util::Statistics::Id::JlmToRvsdgConversion; auto loopUnrollingStatisticsId = util::Statistics::Id::LoopUnrolling; - auto memoryNodeProvisioningStatisticsId = util::Statistics::Id::MemoryNodeProvisioning; auto memoryStateEncoderStatisticsId = util::Statistics::Id::MemoryStateEncoder; auto pullNodesStatisticsId = util::Statistics::Id::PullNodes; auto pushNodesStatisticsId = util::Statistics::Id::PushNodes; auto reduceNodesStatisticsId = util::Statistics::Id::ReduceNodes; + auto regionAwareMemoryNodeProvisioningStatisticsId = + util::Statistics::Id::RegionAwareMemoryNodeProvisioning; auto rvsdgConstructionStatisticsId = util::Statistics::Id::RvsdgConstruction; auto rvsdgDestructionStatisticsId = util::Statistics::Id::RvsdgDestruction; auto rvsdgOptimizationStatisticsId = util::Statistics::Id::RvsdgOptimization; @@ -859,10 +862,6 @@ JlmOptCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) loopUnrollingStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(loopUnrollingStatisticsId), "Write loop unrolling statistics to file."), - ::clEnumValN( - memoryNodeProvisioningStatisticsId, - JlmOptCommandLineOptions::ToCommandLineArgument(memoryNodeProvisioningStatisticsId), - "Write memory node provisioning statistics to file."), ::clEnumValN( pullNodesStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(pullNodesStatisticsId), @@ -875,6 +874,11 @@ JlmOptCommandLineParser::ParseCommandLineArguments(int argc, char ** argv) reduceNodesStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(reduceNodesStatisticsId), "Write node reduction statistics to file."), + ::clEnumValN( + regionAwareMemoryNodeProvisioningStatisticsId, + JlmOptCommandLineOptions::ToCommandLineArgument( + regionAwareMemoryNodeProvisioningStatisticsId), + "Write memory node provisioning statistics to file."), ::clEnumValN( rvsdgConstructionStatisticsId, JlmOptCommandLineOptions::ToCommandLineArgument(rvsdgConstructionStatisticsId), diff --git a/jlm/tooling/CommandLine.hpp b/jlm/tooling/CommandLine.hpp index 4e228aef7..71b10fc41 100644 --- a/jlm/tooling/CommandLine.hpp +++ b/jlm/tooling/CommandLine.hpp @@ -189,11 +189,12 @@ class JlmOptCommandLineOptions final : public CommandLineOptions inline static const char * InvariantValueRedirection_ = "printInvariantValueRedirection"; inline static const char * JlmToRvsdgConversion_ = "print-jlm-rvsdg-conversion"; inline static const char * LoopUnrolling_ = "print-unroll-stat"; - inline static const char * MemoryNodeProvisioning_ = "print-memory-node-provisioning"; inline static const char * MemoryStateEncoder_ = "print-basicencoder-encoding"; inline static const char * PullNodes_ = "print-pull-stat"; inline static const char * PushNodes_ = "print-push-stat"; inline static const char * ReduceNodes_ = "print-reduction-stat"; + inline static const char * RegionAwareMemoryNodeProvisioning_ = + "print-memory-node-provisioning"; inline static const char * RvsdgConstruction_ = "print-rvsdg-construction"; inline static const char * RvsdgDestruction_ = "print-rvsdg-destruction"; inline static const char * RvsdgOptimization_ = "print-rvsdg-optimization"; diff --git a/jlm/util/Statistics.hpp b/jlm/util/Statistics.hpp index d36b3ed10..15e4b3aa5 100644 --- a/jlm/util/Statistics.hpp +++ b/jlm/util/Statistics.hpp @@ -35,11 +35,11 @@ class Statistics InvariantValueRedirection, JlmToRvsdgConversion, LoopUnrolling, - MemoryNodeProvisioning, MemoryStateEncoder, PullNodes, PushNodes, ReduceNodes, + RegionAwareMemoryNodeProvisioning, RvsdgConstruction, RvsdgDestruction, RvsdgOptimization, diff --git a/tests/jlm/llvm/opt/alias-analyses/TestRegionAwareMemoryNodeProvider.cpp b/tests/jlm/llvm/opt/alias-analyses/TestRegionAwareMemoryNodeProvider.cpp index 8b648d25d..5133039ad 100644 --- a/tests/jlm/llvm/opt/alias-analyses/TestRegionAwareMemoryNodeProvider.cpp +++ b/tests/jlm/llvm/opt/alias-analyses/TestRegionAwareMemoryNodeProvider.cpp @@ -1435,7 +1435,7 @@ TestStatistics() jlm::util::StatisticsCollectorSettings statisticsCollectorSettings( filePath, - { jlm::util::Statistics::Id::MemoryNodeProvisioning }); + { jlm::util::Statistics::Id::RegionAwareMemoryNodeProvisioning }); jlm::util::StatisticsCollector statisticsCollector(statisticsCollectorSettings); /*