llvm-project
c766d0c7 - [NFC][AsmPrinter] Refactor AsmPrinter and AArch64AsmPrinter to prepare for jump table partitions on aarch64 (#125993)

Commit
1 year ago
[NFC][AsmPrinter] Refactor AsmPrinter and AArch64AsmPrinter to prepare for jump table partitions on aarch64 (#125993) With https://github.com/llvm/llvm-project/commit/3feb724496238ce10d32e8c2bd84b4ea50f9977e, AsmPrinter can place jump table entries into `.hot` or `.unlikely` prefixed data sections. This change refactors AsmPrinter and AArch64AsmPrinter to prepare for the aarch64 port. * Before this patch, the AsmPrinter class exposes `emitJumpTableInfo` as a virtual method, and AArch64AsmPrinter overrides `emitJumpTableInfo` for jump table emission. * After this patch, both AsmPrinter and AArch64AsmPrinter shares `AsmPrinter::emitJumpTableInfo`, and class-specific code are moved inside each class's `emitJumpTableImpl` respectively. This is a follow-up of https://github.com/llvm/llvm-project/pull/125987, and https://github.com/llvm/llvm-project/pull/126018 implements the port for aarch64.
Parents
Loading