diff options
author | Chris Lattner <sabre@nondot.org> | 2002-03-21 21:21:50 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-03-21 21:21:50 +0000 |
commit | 081c409e27ab48b0f41f8dfa8dad696b7ece880a (patch) | |
tree | 232580f30538a1a68e4c445025d3285a99e9143c | |
parent | 599ca72f5f86a422ffe1d26460ed50092f2f3aa1 (diff) | |
download | external_llvm-081c409e27ab48b0f41f8dfa8dad696b7ece880a.zip external_llvm-081c409e27ab48b0f41f8dfa8dad696b7ece880a.tar.gz external_llvm-081c409e27ab48b0f41f8dfa8dad696b7ece880a.tar.bz2 |
Add a debugging option to gccas to cause it to not do level raise or anything
after it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1934 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | tools/gccas/gccas.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index 4573ea9..3b5342d 100644 --- a/tools/gccas/gccas.cpp +++ b/tools/gccas/gccas.cpp @@ -26,6 +26,8 @@ cl::String InputFilename ("", "Parse <arg> file, compile to bytecode", cl::Required, ""); cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); +cl::Flag StopAtLevelRaise("stopraise", "Stop optimization before level raise", + cl::Hidden); int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm .s -> .o assembler for GCC\n"); @@ -69,10 +71,12 @@ int main(int argc, char **argv) { Passes.add(createRaiseAllocationsPass()); // call %malloc -> malloc inst Passes.add(createCleanupGCCOutputPass()); // Fix gccisms Passes.add(createIndVarSimplifyPass()); // Simplify indvars - Passes.add(createRaisePointerReferencesPass()); // Eliminate casts - Passes.add(createConstantMergePass()); // Merge dup global consts - Passes.add(createInstructionCombiningPass()); // Combine silly seq's - Passes.add(createDeadCodeEliminationPass()); // Remove Dead code/vars + if (!StopAtLevelRaise) { + Passes.add(createRaisePointerReferencesPass()); // Eliminate casts + Passes.add(createConstantMergePass()); // Merge dup global consts + Passes.add(createInstructionCombiningPass()); // Combine silly seq's + Passes.add(createDeadCodeEliminationPass()); // Remove Dead code/vars + } Passes.add(new WriteBytecodePass(&Out)); // Write bytecode to file... // Run our queue of passes all at once now, efficiently. |