Update ::OperandAdaptor to ::Adaptor
The Adaptor can refer to attributes too, so update naming. Follow up from https://reviews.llvm.org/D81741 PiperOrigin-RevId: 316451631 Change-Id: If2882e8ef2e75f70ae2c9193b4e8286ab3b0326f
This commit is contained in:
parent
f926d8c10e
commit
af52bd27dc
@ -35,7 +35,7 @@ struct StaticMemRefCastOpConverter
|
|||||||
auto loc = op->getLoc();
|
auto loc = op->getLoc();
|
||||||
auto cast_op = cast<StaticMemRefCastOp>(op);
|
auto cast_op = cast<StaticMemRefCastOp>(op);
|
||||||
|
|
||||||
StaticMemRefCastOp::OperandAdaptor operands_adaptor(operands);
|
StaticMemRefCastOp::Adaptor operands_adaptor(operands);
|
||||||
MemRefDescriptor sourceMemRef(operands_adaptor.operand());
|
MemRefDescriptor sourceMemRef(operands_adaptor.operand());
|
||||||
|
|
||||||
MemRefType targetMemRefType =
|
MemRefType targetMemRefType =
|
||||||
@ -86,7 +86,7 @@ struct DynamicMemRefCastOpConverter
|
|||||||
auto loc = op->getLoc();
|
auto loc = op->getLoc();
|
||||||
auto cast_op = cast<DynamicMemRefCastOp>(op);
|
auto cast_op = cast<DynamicMemRefCastOp>(op);
|
||||||
|
|
||||||
DynamicMemRefCastOp::OperandAdaptor operands_adaptor(operands);
|
DynamicMemRefCastOp::Adaptor operands_adaptor(operands);
|
||||||
MemRefDescriptor sourceMemRef(operands_adaptor.operand());
|
MemRefDescriptor sourceMemRef(operands_adaptor.operand());
|
||||||
|
|
||||||
MemRefType targetMemRefType =
|
MemRefType targetMemRefType =
|
||||||
|
@ -415,7 +415,7 @@ class LhloBroadcastInDimConverter
|
|||||||
LogicalResult matchAndRewrite(
|
LogicalResult matchAndRewrite(
|
||||||
xla_lhlo::BroadcastInDimOp op, ArrayRef<Value> args,
|
xla_lhlo::BroadcastInDimOp op, ArrayRef<Value> args,
|
||||||
ConversionPatternRewriter& rewriter) const final {
|
ConversionPatternRewriter& rewriter) const final {
|
||||||
xla_lhlo::BroadcastInDimOp::OperandAdaptor operand_adaptor(args);
|
xla_lhlo::BroadcastInDimOp::Adaptor operand_adaptor(args);
|
||||||
auto result_type = operand_adaptor.output().getType().cast<MemRefType>();
|
auto result_type = operand_adaptor.output().getType().cast<MemRefType>();
|
||||||
auto result_shape = result_type.getShape();
|
auto result_shape = result_type.getShape();
|
||||||
|
|
||||||
@ -476,7 +476,7 @@ class LhloBroadcastInDimConverter
|
|||||||
std::pair<Value, SmallVector<int64_t, 2>> InsertReshapeIfNecessary(
|
std::pair<Value, SmallVector<int64_t, 2>> InsertReshapeIfNecessary(
|
||||||
xla_lhlo::BroadcastInDimOp op, ArrayRef<Value> args,
|
xla_lhlo::BroadcastInDimOp op, ArrayRef<Value> args,
|
||||||
ConversionPatternRewriter& rewriter) const {
|
ConversionPatternRewriter& rewriter) const {
|
||||||
xla_lhlo::BroadcastInDimOp::OperandAdaptor operand_adaptor(args);
|
xla_lhlo::BroadcastInDimOp::Adaptor operand_adaptor(args);
|
||||||
Value operand = operand_adaptor.operand();
|
Value operand = operand_adaptor.operand();
|
||||||
auto operand_type = operand_adaptor.operand().getType().cast<MemRefType>();
|
auto operand_type = operand_adaptor.operand().getType().cast<MemRefType>();
|
||||||
auto operand_shape = operand_type.getShape();
|
auto operand_shape = operand_type.getShape();
|
||||||
|
Loading…
Reference in New Issue
Block a user