aboutsummaryrefslogtreecommitdiff
path: root/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
commitf6f263ce8cf7963561295dea1add17f68063cd26 (patch)
tree4ddc3c7cc03eef365510d508a74ac31696e4a85b /lib/Target/X86/X86TargetMachine.cpp
parent499487742ec4299852f7ae8962acebf7bc2a22a4 (diff)
Add a new (hidden) option that is useful for profiling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86TargetMachine.cpp')
-rw-r--r--lib/Target/X86/X86TargetMachine.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/X86/X86TargetMachine.cpp b/lib/Target/X86/X86TargetMachine.cpp
index 466ef2f85d..83a390edaf 100644
--- a/lib/Target/X86/X86TargetMachine.cpp
+++ b/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());