Rename 'dump-asm' to 'dump-input' and really print it just before code-gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7394 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Vikram S. Adve
2003-07-29 19:58:00 +00:00
parent 00477cf26d
commit deb9634f0e

View File

@@ -52,7 +52,7 @@ DisableStrip("disable-strip",
cl::desc("Do not strip the LLVM bytecode included in the executable")); cl::desc("Do not strip the LLVM bytecode included in the executable"));
static cl::opt<bool> static cl::opt<bool>
DumpAsm("dump-asm", cl::desc("Print bytecode before native code generation"), DumpInput("dump-input",cl::desc("Print bytecode before native code generation"),
cl::Hidden); cl::Hidden);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -154,10 +154,6 @@ bool UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
// Replace malloc and free instructions with library calls. // Replace malloc and free instructions with library calls.
PM.add(createLowerAllocationsPass()); PM.add(createLowerAllocationsPass());
// If LLVM dumping after transformations is requested, add it to the pipeline
if (DumpAsm)
PM.add(new PrintFunctionPass("Code after xformations: \n", &std::cerr));
// Strip all of the symbols from the bytecode so that it will be smaller... // Strip all of the symbols from the bytecode so that it will be smaller...
if (!DisableStrip) if (!DisableStrip)
PM.add(createSymbolStrippingPass()); PM.add(createSymbolStrippingPass());
@@ -181,6 +177,10 @@ bool UltraSparc::addPassesToEmitAssembly(PassManager &PM, std::ostream &Out)
PM.add(createGCSEPass()); PM.add(createGCSEPass());
} }
// If LLVM dumping after transformations is requested, add it to the pipeline
if (DumpInput)
PM.add(new PrintFunctionPass("Input code to instr. selection: \n", &std::cerr));
PM.add(createInstructionSelectionPass(*this)); PM.add(createInstructionSelectionPass(*this));
if (!DisableSched) if (!DisableSched)