#include "mlir/Dialect/Arith/Transforms/Passes.h"
#include "mlir/Dialect/Arith/IR/Arith.h"
#include "mlir/Dialect/Arith/Transforms/NarrowTypeEmulationConverter.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/Func/Transforms/FuncConversions.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/TypeUtilities.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/APInt.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/MathExtras.h"
#include <cassert>
usingnamespacemlir;
arith::NarrowTypeEmulationConverter::NarrowTypeEmulationConverter(
unsigned targetBitwidth)
: … { … }
void arith::populateArithNarrowTypeEmulationPatterns(
NarrowTypeEmulationConverter &typeConverter, RewritePatternSet &patterns) { … }