Updates LLVM usage to match
[220de1f32add](https://github.com/llvm/llvm-project/commit/220de1f32add)

PiperOrigin-RevId: 337270545
This commit is contained in:
Adrian Kuegel 2020-10-15 02:53:17 -07:00 committed by TensorFlow MLIR Team
parent e8eb3f80d1
commit 0f36979e2c
3 changed files with 14 additions and 14 deletions

View File

@ -1,2 +1,2 @@
89657b3a3b5772558ac084dc03591de5dab3f1f1 220de1f32add09848009ae2286a1e6fd271abe9e

View File

@ -56,8 +56,8 @@ void PopulateMhloToStdPatterns(OwningRewritePatternList *patterns,
MLIRContext *ctx); MLIRContext *ctx);
// Collection of rewrite patterns for lowering of HLO to LHLO dialect. // Collection of rewrite patterns for lowering of HLO to LHLO dialect.
void populateHLOToLHLOConversionPattern( void populateHLOToLHLOConversionPattern(MLIRContext *context,
MLIRContext *context, BufferAssignmentTypeConverter *converter, BufferizeTypeConverter *converter,
OwningRewritePatternList *patterns); OwningRewritePatternList *patterns);
// Collection of rewrite patterns for lowering of HLO to Linalg dialect. // Collection of rewrite patterns for lowering of HLO to Linalg dialect.

View File

@ -42,7 +42,7 @@ namespace mhlo {
namespace { namespace {
template <typename T> template <typename T>
using BaseOpConversion = BufferAssignmentOpConversionPattern<T>; using BaseOpConversion = BufferizeOpConversionPattern<T>;
Value InsertDynamicAllocAndDealloc(Location loc, Value result, Value InsertDynamicAllocAndDealloc(Location loc, Value result,
Value shape_operand, Value shape_operand,
@ -433,7 +433,7 @@ struct HloLegalizeToLhlo
target.addLegalOp<TensorFromElementsOp>(); target.addLegalOp<TensorFromElementsOp>();
target.addIllegalDialect<mhlo::MhloDialect>(); target.addIllegalDialect<mhlo::MhloDialect>();
BufferAssignmentTypeConverter converter; BufferizeTypeConverter converter;
auto isMemRefType = [](Type type) { return type.isa<BaseMemRefType>(); }; auto isMemRefType = [](Type type) { return type.isa<BaseMemRefType>(); };
target.addDynamicallyLegalOp<FuncOp>([&](FuncOp op) { target.addDynamicallyLegalOp<FuncOp>([&](FuncOp op) {
auto inputs = op.getType().getInputs(); auto inputs = op.getType().getInputs();
@ -456,16 +456,16 @@ struct HloLegalizeToLhlo
}); });
auto kind = results_escape_function auto kind = results_escape_function
? BufferAssignmentTypeConverter::KeepAsFunctionResult ? BufferizeTypeConverter::KeepAsFunctionResult
: BufferAssignmentTypeConverter::AppendToArgumentsList; : BufferizeTypeConverter::AppendToArgumentsList;
converter.setResultConversionKind<UnrankedTensorType, UnrankedMemRefType>( converter.setResultConversionKind<UnrankedTensorType, UnrankedMemRefType>(
kind); kind);
converter.setResultConversionKind<RankedTensorType, MemRefType>(kind); converter.setResultConversionKind<RankedTensorType, MemRefType>(kind);
populateHLOToLHLOConversionPattern(&context, &converter, &patterns); populateHLOToLHLOConversionPattern(&context, &converter, &patterns);
populateWithBufferAssignmentOpConversionPatterns< populateWithBufferizeOpConversionPatterns<mlir::ReturnOp, mlir::ReturnOp,
mlir::ReturnOp, mlir::ReturnOp, lmhlo::CopyOp>(&context, converter, lmhlo::CopyOp>(
patterns); &context, converter, patterns);
populateShapeTypeConversionPatterns(&context, converter, patterns); populateShapeTypeConversionPatterns(&context, converter, patterns);
if (failed(applyPartialConversion(getOperation(), target, patterns))) if (failed(applyPartialConversion(getOperation(), target, patterns)))
signalPassFailure(); signalPassFailure();
@ -480,8 +480,8 @@ struct HloLegalizeToLhlo
}; };
} // namespace } // namespace
void populateHLOToLHLOConversionPattern( void populateHLOToLHLOConversionPattern(MLIRContext* context,
MLIRContext* context, BufferAssignmentTypeConverter* converter, BufferizeTypeConverter* converter,
OwningRewritePatternList* patterns) { OwningRewritePatternList* patterns) {
// clang-format off // clang-format off
patterns->insert< patterns->insert<