[llvm] [llvm][TableGen] Allow physical registers in patterns for GlobalISel emitter (PR #113127)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 23:55:32 PDT 2024
================
@@ -2022,11 +2024,9 @@ Expected<RuleMatcher> GlobalISelEmitter::runOnPattern(const PatternToMatch &P) {
auto &DstI = Target.getInstruction(DstOp);
StringRef DstIName = DstI.TheDef->getName();
-
- // Count both implicit and explicit defs in the dst instruction.
- // This avoids errors importing patterns that have inherent implicit defs.
- unsigned DstExpDefs = DstI.Operands.NumDefs,
- DstNumDefs = DstI.ImplicitDefs.size() + DstExpDefs,
+ const auto &DstPhysDefs = P.getDstRegs();
----------------
s-barannikov wrote:
Don't use auto.
https://github.com/llvm/llvm-project/pull/113127
More information about the llvm-commits
mailing list