From: Misha Brukman Date: Fri, 13 Dec 2002 13:16:14 +0000 (+0000) Subject: Make function code generation printing debug-only. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8ead9dc222861be7999a421e86e8aa846255d6e;p=llvm Make function code generation printing debug-only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5023 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp index 7d5e5ce4e96..b3c84fb821a 100644 --- a/lib/Target/X86/X86TargetMachine.cpp +++ b/lib/Target/X86/X86TargetMachine.cpp @@ -8,6 +8,7 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/Target/TargetMachineImpls.h" #include "llvm/CodeGen/MachineFunction.h" +#include "Support/Statistic.h" #include "llvm/PassManager.h" #include "X86.h" #include @@ -39,7 +40,7 @@ bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) { // TODO: optional optimizations go here // Print the instruction selected machine code... - PM.add(createMachineFunctionPrinterPass()); + DEBUG(PM.add(createMachineFunctionPrinterPass())); // Perform register allocation to convert to a concrete x86 representation PM.add(createSimpleX86RegisterAllocator(*this)); @@ -48,9 +49,7 @@ bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) { // PM.add(createMachineFunctionPrinterPass()); // Print the register-allocated code - PM.add(createX86CodePrinterPass(*this, std::cerr)); - - //PM.add(createEmitX86CodeToMemory(*this)); + DEBUG(PM.add(createX86CodePrinterPass(*this, std::cerr))); return false; // success! }