Index: lib/CodeGen/MachineInstr.cpp =================================================================== --- lib/CodeGen/MachineInstr.cpp +++ lib/CodeGen/MachineInstr.cpp @@ -73,10 +73,12 @@ using namespace llvm; -static cl::opt PrintWholeRegMask( - "print-whole-regmask", - cl::desc("Print the full contents of regmask operands in IR dumps"), - cl::init(true), cl::Hidden); +static cl::opt PrintRegMaskNumRegs( + "print-regmask-num-regs", + cl::desc("Number of registers to limit to when " + "printing regmask operands in IR dumps. " + "unlimited = -1"), + cl::init(32), cl::Hidden); //===----------------------------------------------------------------------===// // MachineOperand Implementation @@ -495,7 +497,8 @@ unsigned MaskWord = i / 32; unsigned MaskBit = i % 32; if (getRegMask()[MaskWord] & (1 << MaskBit)) { - if (PrintWholeRegMask || NumRegsEmitted <= 10) { + if (PrintRegMaskNumRegs < 0 || + NumRegsEmitted <= static_cast(PrintRegMaskNumRegs)) { OS << " " << PrintReg(i, TRI); NumRegsEmitted++; }