[PATCH] D150068: [X86][AsmParser] Refactor code in AsmParser
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 7 20:20:26 PDT 2023
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3661
return false;
-
- MCInst TmpInst;
- TmpInst.setOpcode(X86::INT3);
- Inst = TmpInst;
+ Inst.erase(&Inst.getOperand(Inst.getNumOperands() - 1));
+ Inst.setOpcode(X86::INT3);
----------------
Can we use Inst.clear()?
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86EncodingOptimization.cpp:69
+ unsigned NewOpc;
+#define FROM_TO(FROM, TO) \
+ case X86::FROM: \
----------------
Why not make this part of the TO_IMM1 macro?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150068/new/
https://reviews.llvm.org/D150068
More information about the llvm-commits
mailing list