@@ -515,9 +515,6 @@ class DecoderTableBuilder {
515
515
516
516
unsigned getPredicateIndex (StringRef P) const ;
517
517
518
- bool emitPredicateMatchAux (const Init &Val, bool ParenIfBinOp,
519
- raw_ostream &OS) const ;
520
-
521
518
bool emitPredicateMatch (raw_ostream &OS, unsigned EncodingID) const ;
522
519
523
520
void emitPredicateTableEntry (unsigned EncodingID) const ;
@@ -1099,40 +1096,6 @@ unsigned DecoderTableBuilder::getDecoderIndex(unsigned EncodingID) const {
1099
1096
return std::distance (Decoders.begin (), P);
1100
1097
}
1101
1098
1102
- // If ParenIfBinOp is true, print a surrounding () if Val uses && or ||.
1103
- bool DecoderTableBuilder::emitPredicateMatchAux (const Init &Val,
1104
- bool ParenIfBinOp,
1105
- raw_ostream &OS) const {
1106
- if (const auto *D = dyn_cast<DefInit>(&Val)) {
1107
- if (!D->getDef ()->isSubClassOf (" SubtargetFeature" ))
1108
- return true ;
1109
- OS << " Bits[" << Target.getName () << " ::" << D->getAsString () << " ]" ;
1110
- return false ;
1111
- }
1112
- if (const auto *D = dyn_cast<DagInit>(&Val)) {
1113
- std::string Op = D->getOperator ()->getAsString ();
1114
- if (Op == " not" && D->getNumArgs () == 1 ) {
1115
- OS << ' !' ;
1116
- return emitPredicateMatchAux (*D->getArg (0 ), true , OS);
1117
- }
1118
- if ((Op == " any_of" || Op == " all_of" ) && D->getNumArgs () > 0 ) {
1119
- bool Paren = D->getNumArgs () > 1 && std::exchange (ParenIfBinOp, true );
1120
- if (Paren)
1121
- OS << ' (' ;
1122
- ListSeparator LS (Op == " any_of" ? " || " : " && " );
1123
- for (auto *Arg : D->getArgs ()) {
1124
- OS << LS;
1125
- if (emitPredicateMatchAux (*Arg, ParenIfBinOp, OS))
1126
- return true ;
1127
- }
1128
- if (Paren)
1129
- OS << ' )' ;
1130
- return false ;
1131
- }
1132
- }
1133
- return true ;
1134
- }
1135
-
1136
1099
// Returns true if there was any predicate emitted.
1137
1100
bool DecoderTableBuilder::emitPredicateMatch (raw_ostream &OS,
1138
1101
unsigned EncodingID) const {
0 commit comments