[PATCH] D134073: [TableGen] Add useDeprecatedPositionallyEncodedOperands option.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 09:36:37 PDT 2022
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
Looks great!
================
Comment at: llvm/utils/TableGen/DecoderEmitter.cpp:2134
for (const auto &Op : InOutOperands) {
- if (!NumberedInsnOperands[std::string(Op.second)].empty()) {
- llvm::append_range(InsnOperands,
- NumberedInsnOperands[std::string(Op.second)]);
- continue;
- }
- if (!NumberedInsnOperands[TiedNames[std::string(Op.second)]].empty()) {
- if (!NumberedInsnOperandsNoTie.count(
- TiedNames[std::string(Op.second)])) {
- // Figure out to which (sub)operand we're tied.
- unsigned i =
- CGI.Operands.getOperandNamed(TiedNames[std::string(Op.second)]);
- int tiedTo = CGI.Operands[i].getTiedRegister();
- if (tiedTo == -1) {
- i = CGI.Operands.getOperandNamed(Op.second);
- tiedTo = CGI.Operands[i].getTiedRegister();
- }
-
- if (tiedTo != -1) {
- std::pair<unsigned, unsigned> SO =
- CGI.Operands.getSubOperandNumber(tiedTo);
-
- InsnOperands.push_back(
- NumberedInsnOperands[TiedNames[std::string(Op.second)]]
- [SO.second]);
+ if (SupportPositionalDecoding) {
+ if (!NumberedInsnOperands[std::string(Op.second)].empty()) {
----------------
Does early return pattern apply?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134073/new/
https://reviews.llvm.org/D134073
More information about the llvm-commits
mailing list