[PATCH] D156315: [RFC][GlobalISel] Overhauled MIR Patterns Support for Combiners
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 16:34:36 PDT 2023
arsenm added inline comments.
================
Comment at: llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp:1119
+ for (auto &Pat : A.Pats) {
+ if (auto *IP = dyn_cast<InstructionPattern>(Pat.get())) {
+ if (!A.OpTable.addPattern(Def.getLoc(), IP,
----------------
continue on null and reduce indent?
================
Comment at: llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp:1161
+
+ OS << Indent << ")";
+}
----------------
single quotes
================
Comment at: llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp:1165
+void PatFrag::printParamsList(raw_ostream &OS, iterator_range<ParamIt> Params) {
+ OS << "["
+ << join(map_range(Params,
----------------
single quotes
================
Comment at: llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp:1171
+ ", ")
+ << "]";
+}
----------------
single quotes
================
Comment at: llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp:1994
+ RM.addRequiredSimplePredicate(getIsEnabledPredicateEnumName(RuleID));
+ const std::string AdditionalCommentStr = AdditionalComment.str();
+
----------------
don't need this string copy, can directly check and write out the twine
================
Comment at: llvm/utils/TableGen/GlobalISelCombinerMatchTableEmitter.cpp:2491
+ ParsedPatFrags[Def] = std::move(NewPatFrag);
+ SeenPatFrags.insert(Res);
+ return Res;
----------------
Move the insert before the move?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156315/new/
https://reviews.llvm.org/D156315
More information about the llvm-commits
mailing list