forked from OSchip/llvm-project
Rename hasCanonicalizationPatterns to hasCanonicalizer
The latter is shorter but still conveys the idea clearly. It is also more consistent with hasConstantFolder. PiperOrigin-RevId: 229561774
This commit is contained in:
parent
b5b7e61f7a
commit
254821d1db
|
@ -193,10 +193,10 @@ Operation definitions consists of:
|
|||
Additional verification to perform in addition to those generated due to
|
||||
operands, attributes, properties and traits.
|
||||
|
||||
1. hasCanonicalizationPatterns and hasConstantFolder.
|
||||
1. hasCanonicalizer and hasConstantFolder.
|
||||
|
||||
These boolean fields indicate whether constant folding or canonicalization
|
||||
patterns have been defined for this operation.
|
||||
These boolean fields indicate whether canonicalization patterns or
|
||||
constant folding have been defined for this operation.
|
||||
|
||||
### For custom parsing and printing
|
||||
|
||||
|
|
|
@ -338,7 +338,7 @@ class Op<string mnemonic, list<OpProperty> props = []> {
|
|||
// TODO(b/120163349): figure out a better way to write canonicalization
|
||||
// patterns in TableGen rules directly instead of using this marker
|
||||
// and C++ implementations.
|
||||
bit hasCanonicalizationPatterns = 0b0;
|
||||
bit hasCanonicalizer = 0b0;
|
||||
|
||||
// Whether this op has a constant folder.
|
||||
bit hasConstantFolder = 0b0;
|
||||
|
|
|
@ -89,7 +89,7 @@ def AddFOp : FloatArithmeticOp<"addf"> {
|
|||
|
||||
def AddIOp : IntArithmeticOp<"addi", [Commutative]> {
|
||||
let summary = "integer addition operation";
|
||||
let hasCanonicalizationPatterns = 0b1;
|
||||
let hasCanonicalizer = 0b1;
|
||||
let hasConstantFolder = 0b1;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ def MulFOp : FloatArithmeticOp<"mulf"> {
|
|||
|
||||
def MulIOp : IntArithmeticOp<"muli", [Commutative]> {
|
||||
let summary = "integer multiplication operation";
|
||||
let hasCanonicalizationPatterns = 0b1;
|
||||
let hasCanonicalizer = 0b1;
|
||||
let hasConstantFolder = 0b1;
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,7 @@ def SubFOp : FloatArithmeticOp<"subf"> {
|
|||
def SubIOp : IntArithmeticOp<"subi"> {
|
||||
let summary = "integer subtraction operation";
|
||||
let hasConstantFolder = 0b1;
|
||||
let hasCanonicalizationPatterns = 0b1;
|
||||
let hasCanonicalizer = 0b1;
|
||||
}
|
||||
|
||||
#endif // STANDARD_OPS
|
||||
|
|
|
@ -306,7 +306,7 @@ void OpEmitter::emitBuilder() {
|
|||
}
|
||||
|
||||
void OpEmitter::emitCanonicalizationPatterns() {
|
||||
if (!def.getValueAsBit("hasCanonicalizationPatterns"))
|
||||
if (!def.getValueAsBit("hasCanonicalizer"))
|
||||
return;
|
||||
OUT(2) << "static void getCanonicalizationPatterns("
|
||||
<< "OwningRewritePatternList &results, MLIRContext* context);\n";
|
||||
|
|
Loading…
Reference in New Issue