forked from OSchip/llvm-project
Delete dead code
AffineIfOp::build is not tested or exercised anywhere. It also perpetuates a questionable choice of encoding an optional region as an empty region which we would like to change in the future. PiperOrigin-RevId: 257439832
This commit is contained in:
parent
fec20e590f
commit
68edb3ba75
|
@ -592,9 +592,6 @@ public:
|
|||
using Op::Op;
|
||||
|
||||
// Hooks to customize behavior of this op.
|
||||
static void build(Builder *builder, OperationState *result,
|
||||
IntegerSet condition, ArrayRef<Value *> conditionOperands);
|
||||
|
||||
static StringRef getOperationName() { return "affine.if"; }
|
||||
static StringRef getConditionAttrName() { return "condition"; }
|
||||
|
||||
|
|
|
@ -1465,18 +1465,6 @@ void mlir::extractForInductionVars(ArrayRef<AffineForOp> forInsts,
|
|||
// AffineIfOp
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
void AffineIfOp::build(Builder *builder, OperationState *result,
|
||||
IntegerSet condition,
|
||||
ArrayRef<Value *> conditionOperands) {
|
||||
result->addAttribute(getConditionAttrName(), IntegerSetAttr::get(condition));
|
||||
result->addOperands(conditionOperands);
|
||||
|
||||
// Reserve 2 regions, one for the 'then' and one for the 'else' regions.
|
||||
result->regions.reserve(2);
|
||||
result->addRegion(nullptr);
|
||||
result->addRegion(nullptr);
|
||||
}
|
||||
|
||||
LogicalResult AffineIfOp::verify() {
|
||||
// Verify that we have a condition attribute.
|
||||
auto conditionAttr = getAttrOfType<IntegerSetAttr>(getConditionAttrName());
|
||||
|
|
Loading…
Reference in New Issue