Skip to content

Commit 909a083

Browse files
committed
fixup! Cleanup comments a little.
1 parent 91ac2de commit 909a083

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

llvm/utils/TableGen/DAGISelMatcherOpt.cpp

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,18 @@ static Matcher *FindNodeWithKind(Matcher *M, Matcher::KindTy Kind) {
193193

194194
static void FactorNodes(std::unique_ptr<Matcher> &InputMatcherPtr);
195195

196+
/// Turn matches like this:
197+
/// Scope
198+
/// OPC_CheckType i32
199+
/// ABC
200+
/// OPC_CheckType i32
201+
/// XYZ
202+
/// into:
203+
/// OPC_CheckType i32
204+
/// Scope
205+
/// ABC
206+
/// XYZ
207+
///
196208
static void FactorScope(std::unique_ptr<Matcher> &MatcherPtr) {
197209
ScopeMatcher *Scope = cast<ScopeMatcher>(MatcherPtr.get());
198210

@@ -468,18 +480,7 @@ static void FactorScope(std::unique_ptr<Matcher> &MatcherPtr) {
468480
Scope->resetChild(i, OptionsToMatch[i]);
469481
}
470482

471-
/// FactorNodes - Turn matches like this:
472-
/// Scope
473-
/// OPC_CheckType i32
474-
/// ABC
475-
/// OPC_CheckType i32
476-
/// XYZ
477-
/// into:
478-
/// OPC_CheckType i32
479-
/// Scope
480-
/// ABC
481-
/// XYZ
482-
///
483+
/// Search a ScopeMatcher to factor with FactorScope.
483484
static void FactorNodes(std::unique_ptr<Matcher> &InputMatcherPtr) {
484485
// Look for a scope matcher. Iterates instead of recurses to reduce stack
485486
// usage.

0 commit comments

Comments
 (0)