[PATCH] D54433: [PowerPC][NFC] Macro for register set defs for the Asm Parser

Jinsong Ji via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 09:15:28 PST 2018


jsji added inline comments.


================
Comment at: lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h:136
+
+static const MCPhysReg RRegs[32] = PPC_REGS0_31(llvm::PPC::R);
+static const MCPhysReg XRegs[32] = PPC_REGS0_31(llvm::PPC::X);
----------------
PPCMCTargetDesc.h is included in several files, eg: `llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp`, `llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp`, `llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp`.. 

Declaring static in this header will introduce unnecessary and useless copies o those modules. Maybe we should put these in a new file that included only in necessary modules?


Repository:
  rL LLVM

https://reviews.llvm.org/D54433





More information about the llvm-commits mailing list