#include "mlir/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.h"
#include "mlir/Dialect/Bufferization/IR/BufferizableOpInterface.h"
#include "mlir/Dialect/Bufferization/IR/Bufferization.h"
#include "mlir/Dialect/Bufferization/IR/UnstructuredControlFlow.h"
#include "mlir/Dialect/Bufferization/Transforms/Bufferize.h"
#include "mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/Operation.h"
#include <optional>
namespace mlir {
namespace bufferization {
namespace func_ext {
void FuncAnalysisState::startFunctionAnalysis(FunctionOpInterface funcOp) { … }
static func::ReturnOp getAssumedUniqueReturnOp(FuncOp funcOp) { … }
static BaseMemRefType
getBufferizedFunctionArgType(FuncOp funcOp, int64_t index,
const BufferizationOptions &options) { … }
static FuncOp getCalledFunction(CallOpInterface callOp) { … }
static const FuncAnalysisState &
getFuncAnalysisState(const AnalysisState &state) { … }
static FuncOpAnalysisState getFuncOpAnalysisState(const AnalysisState &state,
FuncOp funcOp) { … }
static std::optional<int64_t>
getEquivalentFuncArgIdx(FuncOp funcOp, const FuncAnalysisState &state,
int64_t returnValIdx) { … }
struct CallOpInterface
: public BufferizableOpInterface::ExternalModel<CallOpInterface,
func::CallOp> { … };
struct ReturnOpInterface
: public BufferizableOpInterface::ExternalModel<ReturnOpInterface,
func::ReturnOp> { … };
struct FuncOpInterface
: public OpWithUnstructuredControlFlowBufferizableOpInterfaceExternalModel<
FuncOpInterface, FuncOp> { … };
}
}
}
void mlir::bufferization::func_ext::
registerBufferizableOpInterfaceExternalModels(DialectRegistry ®istry) { … }