@@ -87,8 +87,8 @@ struct ArgumentMatcher {
87
87
// This matcher checks if an operation is used by another operation that matches
88
88
// the given inner matcher. It allows specifying the number of hops to follow in
89
89
// the use-def chain, and whether the chain should be inclusive or not.
90
- struct UsedByMatcher {
91
- UsedByMatcher (matcher::DynMatcher innerMatcher, unsigned hops, bool inclusive)
90
+ struct UsesMatcher {
91
+ UsesMatcher (matcher::DynMatcher innerMatcher, unsigned hops, bool inclusive)
92
92
: innerMatcher(innerMatcher), hops(hops), inclusive(inclusive) {}
93
93
94
94
bool recursiveMatch (Operation *op, unsigned tempHops) {
@@ -124,8 +124,8 @@ struct UsedByMatcher {
124
124
// matches the given inner matcher. It allows specifying the number of hops to
125
125
// follow in the def-use chain, and whether the chain should be inclusive or
126
126
// not.
127
- struct DefinedByMatcher {
128
- DefinedByMatcher (matcher::DynMatcher innerMatcher, unsigned hops,
127
+ struct DefinitionsMatcher {
128
+ DefinitionsMatcher (matcher::DynMatcher innerMatcher, unsigned hops,
129
129
bool inclusive)
130
130
: innerMatcher(innerMatcher), hops(hops), inclusive(inclusive) {}
131
131
@@ -170,32 +170,32 @@ inline detail::ArgumentMatcher hasArgument(matcher::DynMatcher innerMatcher,
170
170
return detail::ArgumentMatcher (innerMatcher, argIndex);
171
171
}
172
172
173
- inline detail::UsedByMatcher usedBy (matcher::DynMatcher innerMatcher) {
174
- return detail::UsedByMatcher (innerMatcher, 1 , false );
173
+ inline detail::UsesMatcher uses (matcher::DynMatcher innerMatcher) {
174
+ return detail::UsesMatcher (innerMatcher, 1 , false );
175
175
}
176
176
177
- inline detail::UsedByMatcher getUses (matcher::DynMatcher innerMatcher,
177
+ inline detail::UsesMatcher getUses (matcher::DynMatcher innerMatcher,
178
178
unsigned hops) {
179
- return detail::UsedByMatcher (innerMatcher, hops, false );
179
+ return detail::UsesMatcher (innerMatcher, hops, false );
180
180
}
181
181
182
- inline detail::UsedByMatcher getAllUses (matcher::DynMatcher innerMatcher,
182
+ inline detail::UsesMatcher getAllUses (matcher::DynMatcher innerMatcher,
183
183
unsigned hops) {
184
- return detail::UsedByMatcher (innerMatcher, hops, true );
184
+ return detail::UsesMatcher (innerMatcher, hops, true );
185
185
}
186
186
187
- inline detail::DefinedByMatcher definedBy (matcher::DynMatcher innerMatcher) {
188
- return detail::DefinedByMatcher (innerMatcher, 1 , false );
187
+ inline detail::DefinitionsMatcher definedBy (matcher::DynMatcher innerMatcher) {
188
+ return detail::DefinitionsMatcher (innerMatcher, 1 , false );
189
189
}
190
190
191
- inline detail::DefinedByMatcher getDefinitions (matcher::DynMatcher innerMatcher,
191
+ inline detail::DefinitionsMatcher getDefinitions (matcher::DynMatcher innerMatcher,
192
192
unsigned hops) {
193
- return detail::DefinedByMatcher (innerMatcher, hops, false );
193
+ return detail::DefinitionsMatcher (innerMatcher, hops, false );
194
194
}
195
195
196
- inline detail::DefinedByMatcher
196
+ inline detail::DefinitionsMatcher
197
197
getAllDefinitions (matcher::DynMatcher innerMatcher, unsigned hops) {
198
- return detail::DefinedByMatcher (innerMatcher, hops, true );
198
+ return detail::DefinitionsMatcher (innerMatcher, hops, true );
199
199
}
200
200
201
201
} // namespace extramatcher
0 commit comments