MLIR  19.0.0git
Functions | Variables
PassStatistics.cpp File Reference
#include "PassDetail.h"
#include "mlir/Pass/PassManager.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Support/Format.h"

Go to the source code of this file.

Functions

static void printPassEntry (raw_ostream &os, unsigned indent, StringRef pass, MutableArrayRef< Statistic > stats=std::nullopt)
 Utility to print a pass entry in the statistics output. More...
 
static void printResultsAsList (raw_ostream &os, OpPassManager &pm)
 Print the statistics results in a list form, where each pass is sorted by name. More...
 
static void printResultsAsPipeline (raw_ostream &os, OpPassManager &pm)
 Print the results in pipeline mode that mirrors the internal pass manager structure. More...
 
static void printStatistics (OpPassManager &pm, PassDisplayMode displayMode)
 
static void prepareStatistics (OpPassManager &pm)
 Prepare the statistics of passes within the given pass manager for consumption(e.g. More...
 

Variables

constexpr StringLiteral kPassStatsDescription
 

Function Documentation

◆ prepareStatistics()

static void prepareStatistics ( OpPassManager pm)
static

Prepare the statistics of passes within the given pass manager for consumption(e.g.

dumping).

Definition at line 221 of file PassStatistics.cpp.

References mlir::detail::OpToOpPassAdaptor::getParallelPassManagers(), mlir::OpPassManager::getPasses(), and mlir::detail::OpToOpPassAdaptor::getPassManagers().

◆ printPassEntry()

static void printPassEntry ( raw_ostream &  os,
unsigned  indent,
StringRef  pass,
MutableArrayRef< Statistic >  stats = std::nullopt 
)
static

Utility to print a pass entry in the statistics output.

Definition at line 29 of file PassStatistics.cpp.

Referenced by printResultsAsList(), and printResultsAsPipeline().

◆ printResultsAsList()

static void printResultsAsList ( raw_ostream &  os,
OpPassManager pm 
)
static

Print the statistics results in a list form, where each pass is sorted by name.

Definition at line 59 of file PassStatistics.cpp.

References mlir::detail::enumerate(), mlir::OpPassManager::getPasses(), and printPassEntry().

Referenced by printStatistics().

◆ printResultsAsPipeline()

static void printResultsAsPipeline ( raw_ostream &  os,
OpPassManager pm 
)
static

Print the results in pipeline mode that mirrors the internal pass manager structure.

Definition at line 107 of file PassStatistics.cpp.

References mlir::OpPassManager::getPasses(), and printPassEntry().

Referenced by printStatistics().

◆ printStatistics()

static void printStatistics ( OpPassManager pm,
PassDisplayMode  displayMode 
)
static

Variable Documentation

◆ kPassStatsDescription

constexpr StringLiteral kPassStatsDescription
constexpr
Initial value:
=
"... Pass statistics report ..."

Definition at line 17 of file PassStatistics.cpp.

Referenced by printStatistics().