[all-commits] [llvm/llvm-project] a22e8c: [X86][MC][NFC] Refine code in X86MCCodeEmitter.cpp...

KanRobert via All-commits all-commits at lists.llvm.org
Thu Feb 9 19:11:35 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a22e8c9dadea290b4b2d675f60b27428e420b16f
      https://github.com/llvm/llvm-project/commit/a22e8c9dadea290b4b2d675f60b27428e420b16f
  Author: Shengchen Kan <shengchen.kan at intel.com>
  Date:   2023-02-10 (Fri, 10 Feb 2023)

  Changed paths:
    M llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp

  Log Message:
  -----------
  [X86][MC][NFC] Refine code in X86MCCodeEmitter.cpp about opcode prefix

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

Reviewed By: pengfei, craig.topper

Differential Revision: https://reviews.llvm.org/D143471




More information about the All-commits mailing list