summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-02-09 01:47:10 +0000
committerChris Lattner <sabre@nondot.org>2004-02-09 01:47:10 +0000
commit56f9b190e19085252210a48a38b68a31a37762f5 (patch)
tree0cfa93a4cd7f3db6721ed29c05f12b7b424b70b3 /llvm/lib/Target/X86/X86TargetMachine.cpp
parentbbd9a43d206d12a04562ecd676c5cd55b9964bc0 (diff)
downloadbcm5719-llvm-56f9b190e19085252210a48a38b68a31a37762f5.tar.gz
bcm5719-llvm-56f9b190e19085252210a48a38b68a31a37762f5.zip
Add a new (hidden) option that is useful for profiling.
llvm-svn: 11218
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--llvm/lib/Target/X86/X86TargetMachine.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index 466ef2f85d4..83a390edaf8 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -32,6 +32,9 @@ namespace {
cl::opt<bool> NoSSAPeephole("disable-ssa-peephole", cl::init(true),
cl::desc("Disable the ssa-based peephole optimizer "
"(defaults to disabled)"));
+ cl::opt<bool> 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());
OpenPOWER on IntegriCloud