Make function code generation printing debug-only.
llvm-svn: 5023
This commit is contained in:
parent
a9b58a6e0f
commit
ca8eb8af18
|
@ -8,6 +8,7 @@
|
||||||
#include "llvm/Transforms/Scalar.h"
|
#include "llvm/Transforms/Scalar.h"
|
||||||
#include "llvm/Target/TargetMachineImpls.h"
|
#include "llvm/Target/TargetMachineImpls.h"
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
|
#include "Support/Statistic.h"
|
||||||
#include "llvm/PassManager.h"
|
#include "llvm/PassManager.h"
|
||||||
#include "X86.h"
|
#include "X86.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -39,7 +40,7 @@ bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) {
|
||||||
// TODO: optional optimizations go here
|
// TODO: optional optimizations go here
|
||||||
|
|
||||||
// Print the instruction selected machine code...
|
// Print the instruction selected machine code...
|
||||||
PM.add(createMachineFunctionPrinterPass());
|
DEBUG(PM.add(createMachineFunctionPrinterPass()));
|
||||||
|
|
||||||
// Perform register allocation to convert to a concrete x86 representation
|
// Perform register allocation to convert to a concrete x86 representation
|
||||||
PM.add(createSimpleX86RegisterAllocator(*this));
|
PM.add(createSimpleX86RegisterAllocator(*this));
|
||||||
|
@ -48,9 +49,7 @@ bool X86TargetMachine::addPassesToJITCompile(PassManager &PM) {
|
||||||
// PM.add(createMachineFunctionPrinterPass());
|
// PM.add(createMachineFunctionPrinterPass());
|
||||||
|
|
||||||
// Print the register-allocated code
|
// Print the register-allocated code
|
||||||
PM.add(createX86CodePrinterPass(*this, std::cerr));
|
DEBUG(PM.add(createX86CodePrinterPass(*this, std::cerr)));
|
||||||
|
|
||||||
//PM.add(createEmitX86CodeToMemory(*this));
|
|
||||||
|
|
||||||
return false; // success!
|
return false; // success!
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue