Add attributes and affine expr/map to the Builder, switch the parser over to
use it.
This also removes "operand" from the affine expr classes: it is unnecessary
verbosity and "operand" will mean something very specific for SSA stuff (we
will have an Operand type).
PiperOrigin-RevId: 203976504
diff --git a/lib/IR/AsmPrinter.cpp b/lib/IR/AsmPrinter.cpp
index 715459f..d284d0f 100644
--- a/lib/IR/AsmPrinter.cpp
+++ b/lib/IR/AsmPrinter.cpp
@@ -313,27 +313,27 @@
}
void AffineAddExpr::print(raw_ostream &os) const {
- os << "(" << *getLeftOperand() << " + " << *getRightOperand() << ")";
+ os << "(" << *getLHS() << " + " << *getRHS() << ")";
}
void AffineSubExpr::print(raw_ostream &os) const {
- os << "(" << *getLeftOperand() << " - " << *getRightOperand() << ")";
+ os << "(" << *getLHS() << " - " << *getRHS() << ")";
}
void AffineMulExpr::print(raw_ostream &os) const {
- os << "(" << *getLeftOperand() << " * " << *getRightOperand() << ")";
+ os << "(" << *getLHS() << " * " << *getRHS() << ")";
}
void AffineModExpr::print(raw_ostream &os) const {
- os << "(" << *getLeftOperand() << " mod " << *getRightOperand() << ")";
+ os << "(" << *getLHS() << " mod " << *getRHS() << ")";
}
void AffineFloorDivExpr::print(raw_ostream &os) const {
- os << "(" << *getLeftOperand() << " floordiv " << *getRightOperand() << ")";
+ os << "(" << *getLHS() << " floordiv " << *getRHS() << ")";
}
void AffineCeilDivExpr::print(raw_ostream &os) const {
- os << "(" << *getLeftOperand() << " ceildiv " << *getRightOperand() << ")";
+ os << "(" << *getLHS() << " ceildiv " << *getRHS() << ")";
}
void AffineSymbolExpr::print(raw_ostream &os) const {