[llvm] [SelectionDAG] use HandleSDNode instead of SDValue during SelectInlineAsmMemoryOperands (PR #85081)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 22:29:35 PDT 2024
================
@@ -2158,15 +2161,19 @@ void SelectionDAGISel::SelectInlineAsmMemoryOperands(std::vector<SDValue> &Ops,
: InlineAsm::Kind::Func,
SelOps.size());
Flags.setMemConstraint(ConstraintID);
- Ops.push_back(CurDAG->getTargetConstant(Flags, DL, MVT::i32));
- llvm::append_range(Ops, SelOps);
+ handles.emplace_back(CurDAG->getTargetConstant(Flags, DL, MVT::i32));
+ handles.insert(handles.end(), SelOps.begin(), SelOps.end());
i += 2;
}
}
// Add the glue input back if present.
- if (e != InOps.size())
- Ops.push_back(InOps.back());
+ if (e != Ops.size())
+ handles.emplace_back(Ops.back());
+
+ Ops.clear();
+ for (auto &i : handles)
----------------
topperc wrote:
`i` isn't a good variable number. `i` is usually used for counters or iterators. We have neither of those here.
https://github.com/llvm/llvm-project/pull/85081
More information about the llvm-commits
mailing list