[PATCH] D75357: [X86] Add a private member function determinePaddingPrefix for X86AsmBackend
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 08:53:02 PST 2020
MaskRay added inline comments.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:343
+ "Prefixes can be added only in 32-bit or 64-bit mode.");
+ unsigned Opcode = Inst.getOpcode();
+ const MCInstrDesc &Desc = MCII->get(Opcode);
----------------
The variable `Opcode` can be omitted.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:345
+ const MCInstrDesc &Desc = MCII->get(Opcode);
+ uint64_t TSFlags = Desc.TSFlags;
+
----------------
Consider omitting `TSFlags`. It is used just twice.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:347
+
+ unsigned CurOp = X86II::getOperandBias(Desc);
+
----------------
The variable `CurOp` can be omitted.
================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp:361
+ uint64_t Form = TSFlags & X86II::FormMask;
+ switch (Form) {
+ default:
----------------
The variable `Form` can be omitted.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75357/new/
https://reviews.llvm.org/D75357
More information about the llvm-commits
mailing list