MLIR
15.0.0git
|
#include "mlir/Transforms/LocationSnapshot.h"
#include "PassDetail.h"
#include "mlir/IR/AsmState.h"
#include "mlir/IR/Builders.h"
#include "mlir/Support/FileUtilities.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/ToolOutputFile.h"
Go to the source code of this file.
Functions | |
static void | generateLocationsFromIR (raw_ostream &os, StringRef fileName, Operation *op, const OpPrintingFlags &flags, StringRef tag) |
This function generates new locations from the given IR by snapshotting the IR to the given stream, and using the printed locations within that stream. More... | |
static LogicalResult | generateLocationsFromIR (StringRef fileName, Operation *op, OpPrintingFlags flags, StringRef tag) |
This function generates new locations from the given IR by snapshotting the IR to the given file, and using the printed locations within that file. More... | |
|
static |
This function generates new locations from the given IR by snapshotting the IR to the given stream, and using the printed locations within that stream.
If a 'tag' is non-empty, the generated locations are represented as a NameLoc with the given tag as the name, and then fused with the existing locations. Otherwise, the existing locations are replaced.
Definition at line 24 of file LocationSnapshot.cpp.
References mlir::Operation::getContext(), mlir::Operation::print(), mlir::Operation::setLoc(), and mlir::Operation::walk().
Referenced by mlir::generateLocationsFromIR().
|
static |
This function generates new locations from the given IR by snapshotting the IR to the given file, and using the printed locations within that file.
If filename
is empty, a temporary file is generated instead.
Definition at line 64 of file LocationSnapshot.cpp.
References mlir::Operation::emitError(), mlir::generateLocationsFromIR(), mlir::openOutputFile(), and mlir::success().