#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Transforms/DialectConversion.h"
usingnamespacemlir;
usingnamespacemlir::func;
namespace {
struct CallOpSignatureConversion : public OpConversionPattern<CallOp> { … };
}
void mlir::populateCallOpTypeConversionPattern(RewritePatternSet &patterns,
const TypeConverter &converter) { … }
namespace {
class BranchOpInterfaceTypeConversion
: public OpInterfaceConversionPattern<BranchOpInterface> { … };
}
namespace {
class ReturnOpTypeConversion : public OpConversionPattern<ReturnOp> { … };
}
void mlir::populateBranchOpInterfaceTypeConversionPattern(
RewritePatternSet &patterns, const TypeConverter &typeConverter,
function_ref<bool(BranchOpInterface, int)> shouldConvertBranchOperand) { … }
bool mlir::isLegalForBranchOpInterfaceTypeConversionPattern(
Operation *op, const TypeConverter &converter) { … }
void mlir::populateReturnOpTypeConversionPattern(
RewritePatternSet &patterns, const TypeConverter &typeConverter) { … }
bool mlir::isLegalForReturnOpTypeConversionPattern(
Operation *op, const TypeConverter &converter, bool returnOpAlwaysLegal) { … }
bool mlir::isNotBranchOpInterfaceOrReturnLikeOp(Operation *op) { … }