MLIR 22.0.0git
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={})
 Utility to print a pass entry in the statistics output.
static void printResultsAsList (raw_ostream &os, OpPassManager &pm)
 Print the statistics results in a list form, where each pass is sorted by name.
static void printResultsAsPipeline (raw_ostream &os, OpPassManager &pm)
 Print the results in pipeline mode that mirrors the internal pass manager structure.
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.

Variables

constexpr StringLiteral kPassStatsDescription

Function Documentation

◆ prepareStatistics()

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 prepareStatistics().

Referenced by prepareStatistics().

◆ printPassEntry()

void printPassEntry ( raw_ostream & os,
unsigned indent,
StringRef pass,
MutableArrayRef< Statistic > stats = {} )
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()

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::OpPassManager::getPasses(), lhs, printPassEntry(), and rhs.

Referenced by printStatistics().

◆ printResultsAsPipeline()

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()

void printStatistics ( OpPassManager & pm,
PassDisplayMode displayMode )
static

Variable Documentation

◆ kPassStatsDescription

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

Definition at line 17 of file PassStatistics.cpp.

Referenced by printStatistics().