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:
Nicolas Vasilache 2019-07-10 11:02:56 -07:00 committed by jpienaar
parent fec20e590f
commit 68edb3ba75
2 changed files with 0 additions and 15 deletions

View File

@ -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"; }

View File

@ -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());