[mlir] NFC - Add AffineMinMaxOpBase getDim/SymbolOperands

This commit is contained in:
Nicolas Vasilache 2020-06-02 18:04:10 -04:00
parent 16437992ca
commit 7de4587805
1 changed files with 8 additions and 0 deletions

View File

@ -460,6 +460,14 @@ class AffineMinMaxOpBase<string mnemonic, list<OpTrait> traits = []> :
static StringRef getMapAttrName() { return "map"; }
AffineMap getAffineMap() { return map(); }
ValueRange getMapOperands() { return operands(); }
ValueRange getDimOperands() {
return OperandRange{operands().begin(),
operands().begin() + map().getNumDims()};
}
ValueRange getSymbolOperands() {
return OperandRange{operands().begin() + map().getNumDims(),
operands().end()};
}
}];
let verifier = [{ return ::verifyAffineMinMaxOp(*this); }];
let printer = [{ return ::printAffineMinMaxOp(p, *this); }];