[PATCH] D143471: [X86][MC][NFC] Refine code in X86MCCodeEmitter.cpp about opcode prefix

Kan Shengchen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 7 00:30:47 PST 2023


skan created this revision.
Herald added subscribers: pengfei, hiraditya.
Herald added a project: All.
skan requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

1. Make code clearer by separating the logic of setting bits from the logic of how a prefix is encoded
2. Extract common code into functions to avoid code duplication
3. Return a enum rather a boolean to ehance scalability and uniform the behavior of functions


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D143471

Files:
  llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D143471.495401.patch
Type: text/x-patch
Size: 41371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230207/18cd8a06/attachment.bin>


More information about the llvm-commits mailing list