|
MLIR
22.0.0git
|
#include "mlir/Dialect/Transform/IR/Utils.h"#include "mlir/Dialect/Transform/IR/TransformDialect.h"#include "mlir/IR/Verifier.h"#include "mlir/Interfaces/FunctionInterfaces.h"#include "llvm/Support/Debug.h"#include "llvm/Support/DebugLog.h"Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "transform-dialect-utils" |
| #define | DBGS() (llvm::dbgs() << "[" DEBUG_TYPE << "]: ") |
Functions | |
| static bool | canMergeInto (FunctionOpInterface func1, FunctionOpInterface func2) |
Return whether func1 can be merged into func2. More... | |
| static InFlightDiagnostic | mergeInto (FunctionOpInterface func1, FunctionOpInterface func2) |
Merge func1 into func2. More... | |
| #define DBGS | ( | ) | (llvm::dbgs() << "[" DEBUG_TYPE << "]: ") |
|
static |
Return whether func1 can be merged into func2.
For that to work func1 has to be a declaration (aka has to be external) and func2 either has to be a declaration as well, or it has to be public (otherwise, it wouldn't be visible by func1).
Definition at line 25 of file Utils.cpp.
Referenced by mergeInto(), and mlir::transform::detail::mergeSymbolsInto().
|
static |
Merge func1 into func2.
The two ops must be inside the same parent op and mergable according to canMergeInto. The function erases func1 such that only func2 exists when the function returns.
Definition at line 32 of file Utils.cpp.
References canMergeInto(), mlir::get(), and mlir::MLIRContext::getLoadedDialect().
Referenced by mlir::transform::detail::mergeSymbolsInto().