Use OperandAdaptor via alias inside generated class
More uniform accessing and aids in renaming. PiperOrigin-RevId: 315797601 Change-Id: I439ea96e401585a2b52719e1727e84a507164e00
This commit is contained in:
parent
725a35fce4
commit
686606eb26
|
@ -35,7 +35,7 @@ struct StaticMemRefCastOpConverter
|
|||
auto loc = op->getLoc();
|
||||
auto cast_op = cast<StaticMemRefCastOp>(op);
|
||||
|
||||
StaticMemRefCastOpOperandAdaptor operands_adaptor(operands);
|
||||
StaticMemRefCastOp::OperandAdaptor operands_adaptor(operands);
|
||||
MemRefDescriptor sourceMemRef(operands_adaptor.operand());
|
||||
|
||||
MemRefType targetMemRefType =
|
||||
|
@ -86,7 +86,7 @@ struct DynamicMemRefCastOpConverter
|
|||
auto loc = op->getLoc();
|
||||
auto cast_op = cast<DynamicMemRefCastOp>(op);
|
||||
|
||||
DynamicMemRefCastOpOperandAdaptor operands_adaptor(operands);
|
||||
DynamicMemRefCastOp::OperandAdaptor operands_adaptor(operands);
|
||||
MemRefDescriptor sourceMemRef(operands_adaptor.operand());
|
||||
|
||||
MemRefType targetMemRefType =
|
||||
|
|
|
@ -423,7 +423,7 @@ class LhloBroadcastInDimConverter
|
|||
LogicalResult matchAndRewrite(
|
||||
xla_lhlo::BroadcastInDimOp op, ArrayRef<Value> args,
|
||||
ConversionPatternRewriter& rewriter) const final {
|
||||
xla_lhlo::BroadcastInDimOpOperandAdaptor operand_adaptor(args);
|
||||
xla_lhlo::BroadcastInDimOp::OperandAdaptor operand_adaptor(args);
|
||||
auto result_type = operand_adaptor.output().getType().cast<MemRefType>();
|
||||
auto result_shape = result_type.getShape();
|
||||
|
||||
|
@ -487,7 +487,7 @@ class LhloBroadcastInDimConverter
|
|||
std::pair<Value, SmallVector<int64_t, 2>> InsertReshapeIfNecessary(
|
||||
xla_lhlo::BroadcastInDimOp op, ArrayRef<Value> args,
|
||||
ConversionPatternRewriter& rewriter) const {
|
||||
xla_lhlo::BroadcastInDimOpOperandAdaptor operand_adaptor(args);
|
||||
xla_lhlo::BroadcastInDimOp::OperandAdaptor operand_adaptor(args);
|
||||
Value operand = operand_adaptor.operand();
|
||||
auto operand_type = operand_adaptor.operand().getType().cast<MemRefType>();
|
||||
auto operand_shape = operand_type.getShape();
|
||||
|
|
Loading…
Reference in New Issue