MLIR  16.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"
+ Include dependency graph for PassStatistics.cpp:

Go to the source code of this file.

Functions

static void printPassEntry (raw_ostream &os, unsigned indent, StringRef pass, MutableArrayRef< Statistic > stats=llvm::None)
 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(), mlir::detail::OpToOpPassAdaptor::getPassManagers(), and printStatistics().

◆ printPassEntry()

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

Utility to print a pass entry in the statistics output.

Definition at line 29 of file PassStatistics.cpp.

Referenced by 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 mlir::Pass::getStatistics().

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
Initial value:
=
"... Pass statistics report ..."

Definition at line 17 of file PassStatistics.cpp.

Referenced by printStatistics().