Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 1 | //===- DAGISelMatcher.cpp - Representation of DAG pattern matcher ---------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "DAGISelMatcher.h" |
| 11 | #include "CodeGenDAGPatterns.h" |
| 12 | #include "CodeGenTarget.h" |
Chris Lattner | 845c042 | 2010-02-18 22:03:03 +0000 | [diff] [blame] | 13 | #include "Record.h" |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 14 | #include "llvm/Support/raw_ostream.h" |
Chris Lattner | 58aa834 | 2010-02-25 06:49:58 +0000 | [diff] [blame^] | 15 | #include "llvm/ADT/StringExtras.h" |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 16 | using namespace llvm; |
| 17 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 18 | void Matcher::dump() const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 19 | print(errs()); |
| 20 | } |
| 21 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 22 | void Matcher::printNext(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 23 | if (Next) |
| 24 | return Next->print(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 25 | } |
| 26 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 27 | void ScopeMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 60df53e | 2010-02-25 01:56:48 +0000 | [diff] [blame] | 28 | OS.indent(indent) << "Scope\n"; |
| 29 | Check->print(OS, indent+2); |
| 30 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 31 | } |
| 32 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 33 | void RecordMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 34 | OS.indent(indent) << "Record\n"; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 35 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 36 | } |
| 37 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 38 | void RecordChildMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 19b5a75 | 2010-02-24 07:31:45 +0000 | [diff] [blame] | 39 | OS.indent(indent) << "RecordChild: " << ChildNo << '\n'; |
| 40 | printNext(OS, indent); |
| 41 | } |
| 42 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 43 | void RecordMemRefMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 44 | OS.indent(indent) << "RecordMemRef\n"; |
| 45 | printNext(OS, indent); |
| 46 | } |
| 47 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 48 | void CaptureFlagInputMatcher::print(raw_ostream &OS, unsigned indent) const{ |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 49 | OS.indent(indent) << "CaptureFlagInput\n"; |
| 50 | printNext(OS, indent); |
| 51 | } |
| 52 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 53 | void MoveChildMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 54 | OS.indent(indent) << "MoveChild " << ChildNo << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 55 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 56 | } |
| 57 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 58 | void MoveParentMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 59 | OS.indent(indent) << "MoveParent\n"; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 60 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 61 | } |
| 62 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 63 | void CheckSameMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 64 | OS.indent(indent) << "CheckSame " << MatchNumber << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 65 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 66 | } |
| 67 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 68 | void CheckPatternPredicateMatcher:: |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 69 | print(raw_ostream &OS, unsigned indent) const { |
| 70 | OS.indent(indent) << "CheckPatternPredicate " << Predicate << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 71 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 72 | } |
| 73 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 74 | void CheckPredicateMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 75 | OS.indent(indent) << "CheckPredicate " << PredName << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 76 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 77 | } |
| 78 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 79 | void CheckOpcodeMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 80 | OS.indent(indent) << "CheckOpcode " << OpcodeName << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 81 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 82 | } |
| 83 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 84 | void CheckMultiOpcodeMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 12a667c | 2010-02-22 22:30:37 +0000 | [diff] [blame] | 85 | OS.indent(indent) << "CheckMultiOpcode <todo args>\n"; |
| 86 | printNext(OS, indent); |
| 87 | } |
| 88 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 89 | void CheckTypeMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 90 | OS.indent(indent) << "CheckType " << getEnumName(Type) << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 91 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 92 | } |
| 93 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 94 | void CheckChildTypeMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 23cfda7 | 2010-02-24 20:15:25 +0000 | [diff] [blame] | 95 | OS.indent(indent) << "CheckChildType " << ChildNo << " " |
| 96 | << getEnumName(Type) << '\n'; |
| 97 | printNext(OS, indent); |
| 98 | } |
| 99 | |
| 100 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 101 | void CheckIntegerMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 102 | OS.indent(indent) << "CheckInteger " << Value << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 103 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 104 | } |
| 105 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 106 | void CheckCondCodeMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 107 | OS.indent(indent) << "CheckCondCode ISD::" << CondCodeName << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 108 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 109 | } |
| 110 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 111 | void CheckValueTypeMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 112 | OS.indent(indent) << "CheckValueType MVT::" << TypeName << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 113 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 114 | } |
| 115 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 116 | void CheckComplexPatMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 117 | OS.indent(indent) << "CheckComplexPat " << Pattern.getSelectFunc() << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 118 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 119 | } |
| 120 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 121 | void CheckAndImmMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 122 | OS.indent(indent) << "CheckAndImm " << Value << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 123 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 124 | } |
| 125 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 126 | void CheckOrImmMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 127 | OS.indent(indent) << "CheckOrImm " << Value << '\n'; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 128 | printNext(OS, indent); |
Chris Lattner | da272d1 | 2010-02-15 08:04:42 +0000 | [diff] [blame] | 129 | } |
| 130 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 131 | void CheckFoldableChainNodeMatcher::print(raw_ostream &OS, |
Chris Lattner | 21390d7 | 2010-02-16 19:15:55 +0000 | [diff] [blame] | 132 | unsigned indent) const { |
| 133 | OS.indent(indent) << "CheckFoldableChainNode\n"; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 134 | printNext(OS, indent); |
Chris Lattner | e39650a | 2010-02-16 06:10:58 +0000 | [diff] [blame] | 135 | } |
Chris Lattner | 9a747f1 | 2010-02-17 06:23:39 +0000 | [diff] [blame] | 136 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 137 | void CheckChainCompatibleMatcher::print(raw_ostream &OS, |
Chris Lattner | 9a747f1 | 2010-02-17 06:23:39 +0000 | [diff] [blame] | 138 | unsigned indent) const { |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 139 | OS.indent(indent) << "CheckChainCompatible " << PreviousOp << "\n"; |
Chris Lattner | bd8227f | 2010-02-18 02:53:41 +0000 | [diff] [blame] | 140 | printNext(OS, indent); |
Chris Lattner | 9a747f1 | 2010-02-17 06:23:39 +0000 | [diff] [blame] | 141 | } |
Chris Lattner | 845c042 | 2010-02-18 22:03:03 +0000 | [diff] [blame] | 142 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 143 | void EmitIntegerMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 144 | OS.indent(indent) << "EmitInteger " << Val << " VT=" << VT << '\n'; |
| 145 | printNext(OS, indent); |
| 146 | } |
| 147 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 148 | void EmitStringIntegerMatcher:: |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 149 | print(raw_ostream &OS, unsigned indent) const { |
| 150 | OS.indent(indent) << "EmitStringInteger " << Val << " VT=" << VT << '\n'; |
Chris Lattner | 845c042 | 2010-02-18 22:03:03 +0000 | [diff] [blame] | 151 | printNext(OS, indent); |
| 152 | } |
| 153 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 154 | void EmitRegisterMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 155 | OS.indent(indent) << "EmitRegister "; |
Chris Lattner | 845c042 | 2010-02-18 22:03:03 +0000 | [diff] [blame] | 156 | if (Reg) |
| 157 | OS << Reg->getName(); |
| 158 | else |
| 159 | OS << "zero_reg"; |
| 160 | OS << " VT=" << VT << '\n'; |
| 161 | printNext(OS, indent); |
| 162 | } |
| 163 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 164 | void EmitConvertToTargetMatcher:: |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 165 | print(raw_ostream &OS, unsigned indent) const { |
| 166 | OS.indent(indent) << "EmitConvertToTarget " << Slot << '\n'; |
| 167 | printNext(OS, indent); |
| 168 | } |
| 169 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 170 | void EmitMergeInputChainsMatcher:: |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 171 | print(raw_ostream &OS, unsigned indent) const { |
| 172 | OS.indent(indent) << "EmitMergeInputChains <todo: args>\n"; |
| 173 | printNext(OS, indent); |
| 174 | } |
| 175 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 176 | void EmitCopyToRegMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 177 | OS.indent(indent) << "EmitCopyToReg <todo: args>\n"; |
| 178 | printNext(OS, indent); |
| 179 | } |
| 180 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 181 | void EmitNodeXFormMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 182 | OS.indent(indent) << "EmitNodeXForm " << NodeXForm->getName() |
| 183 | << " Slot=" << Slot << '\n'; |
| 184 | printNext(OS, indent); |
| 185 | } |
| 186 | |
| 187 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 188 | void EmitNodeMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 189 | OS.indent(indent) << "EmitNode: " << OpcodeName << ": <todo flags> "; |
| 190 | |
| 191 | for (unsigned i = 0, e = VTs.size(); i != e; ++i) |
| 192 | OS << ' ' << getEnumName(VTs[i]); |
| 193 | OS << '('; |
| 194 | for (unsigned i = 0, e = Operands.size(); i != e; ++i) |
| 195 | OS << Operands[i] << ' '; |
| 196 | OS << ")\n"; |
| 197 | printNext(OS, indent); |
| 198 | } |
| 199 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 200 | void MarkFlagResultsMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 02f7358 | 2010-02-24 05:33:42 +0000 | [diff] [blame] | 201 | OS.indent(indent) << "MarkFlagResults <todo: args>\n"; |
| 202 | printNext(OS, indent); |
| 203 | } |
| 204 | |
Chris Lattner | b21ba71 | 2010-02-25 02:04:40 +0000 | [diff] [blame] | 205 | void CompleteMatchMatcher::print(raw_ostream &OS, unsigned indent) const { |
Chris Lattner | 77f2e27 | 2010-02-21 06:03:07 +0000 | [diff] [blame] | 206 | OS.indent(indent) << "CompleteMatch <todo args>\n"; |
Chris Lattner | 8e946be | 2010-02-21 03:22:59 +0000 | [diff] [blame] | 207 | OS.indent(indent) << "Src = " << *Pattern.getSrcPattern() << "\n"; |
| 208 | OS.indent(indent) << "Dst = " << *Pattern.getDstPattern() << "\n"; |
| 209 | printNext(OS, indent); |
| 210 | } |
| 211 | |
Chris Lattner | 58aa834 | 2010-02-25 06:49:58 +0000 | [diff] [blame^] | 212 | // getHashImpl Implementation. |
| 213 | |
| 214 | unsigned CheckPatternPredicateMatcher::getHashImpl() const { |
| 215 | return HashString(Predicate); |
| 216 | } |
| 217 | |
| 218 | unsigned CheckPredicateMatcher::getHashImpl() const { |
| 219 | return HashString(PredName); |
| 220 | } |
| 221 | |
| 222 | unsigned CheckOpcodeMatcher::getHashImpl() const { |
| 223 | return HashString(OpcodeName); |
| 224 | } |
| 225 | |
| 226 | unsigned CheckMultiOpcodeMatcher::getHashImpl() const { |
| 227 | unsigned Result = 0; |
| 228 | for (unsigned i = 0, e = OpcodeNames.size(); i != e; ++i) |
| 229 | Result |= HashString(OpcodeNames[i]); |
| 230 | return Result; |
| 231 | } |
| 232 | |
| 233 | unsigned CheckCondCodeMatcher::getHashImpl() const { |
| 234 | return HashString(CondCodeName); |
| 235 | } |
| 236 | |
| 237 | unsigned CheckValueTypeMatcher::getHashImpl() const { |
| 238 | return HashString(TypeName); |
| 239 | } |
| 240 | |
| 241 | unsigned EmitStringIntegerMatcher::getHashImpl() const { |
| 242 | return HashString(Val) ^ VT; |
| 243 | } |
| 244 | |
| 245 | template<typename It> |
| 246 | static unsigned HashUnsigneds(It I, It E) { |
| 247 | unsigned Result = 0; |
| 248 | for (; I != E; ++I) |
| 249 | Result = (Result<<3) ^ *I; |
| 250 | return Result; |
| 251 | } |
| 252 | |
| 253 | unsigned EmitMergeInputChainsMatcher::getHashImpl() const { |
| 254 | return HashUnsigneds(ChainNodes.begin(), ChainNodes.end()); |
| 255 | } |
| 256 | |
| 257 | bool EmitNodeMatcher::isEqualImpl(const Matcher *m) const { |
| 258 | const EmitNodeMatcher *M = cast<EmitNodeMatcher>(m); |
| 259 | return M->OpcodeName == OpcodeName && M->VTs == VTs && |
| 260 | M->Operands == Operands && M->HasChain == HasChain && |
| 261 | M->HasFlag == HasFlag && M->HasMemRefs == HasMemRefs && |
| 262 | M->NumFixedArityOperands == NumFixedArityOperands; |
| 263 | } |
| 264 | |
| 265 | unsigned EmitNodeMatcher::getHashImpl() const { |
| 266 | return (HashString(OpcodeName) << 4) | Operands.size(); |
| 267 | } |
| 268 | |
| 269 | |
| 270 | unsigned MarkFlagResultsMatcher::getHashImpl() const { |
| 271 | return HashUnsigneds(FlagResultNodes.begin(), FlagResultNodes.end()); |
| 272 | } |
| 273 | |
| 274 | unsigned CompleteMatchMatcher::getHashImpl() const { |
| 275 | return HashUnsigneds(Results.begin(), Results.end()) ^ |
| 276 | ((unsigned)(intptr_t)&Pattern << 8); |
| 277 | } |