diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 466ef2f85d4..83a390edaf8 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -32,6 +32,9 @@ namespace { cl::opt NoSSAPeephole("disable-ssa-peephole", cl::init(true), cl::desc("Disable the ssa-based peephole optimizer " "(defaults to disabled)")); + cl::opt DisableOutput("disable-x86-llc-output", cl::Hidden, + cl::desc("Disable the X86 asm printer, for use " + "when profiling the code generator.")); } // allocateX86TargetMachine - Allocate and return a subclass of TargetMachine @@ -98,7 +101,8 @@ bool X86TargetMachine::addPassesToEmitAssembly(PassManager &PM, if (PrintCode) // Print the register-allocated code PM.add(createX86CodePrinterPass(std::cerr, *this)); - PM.add(createX86CodePrinterPass(Out, *this)); + if (!DisableOutput) + PM.add(createX86CodePrinterPass(Out, *this)); // Delete machine code for this function PM.add(createMachineCodeDeleter());