diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-30 03:24:27 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-30 03:24:27 +0000 |
commit | 74295c01641f10bd229929acd4a465f2860aa644 (patch) | |
tree | 07ded1eed059f2835fb47ee86fc44fe7a84a2bdf /tools/gccas/gccas.cpp | |
parent | 9899ae3ae85e0d5cdb1a2fad0f527e5145da7f8c (diff) |
Add a -disable-opt flag to gccas, so that we can use -Wa,-disable-opt just
like -Wl,-disable-opt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10647 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccas/gccas.cpp')
-rw-r--r-- | tools/gccas/gccas.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp index 40abcca5d6..356bc8216a 100644 --- a/tools/gccas/gccas.cpp +++ b/tools/gccas/gccas.cpp @@ -42,6 +42,10 @@ namespace { cl::opt<bool> DisableInline("disable-inlining", cl::desc("Do not run the inliner pass")); + + cl::opt<bool> + DisableOptimizations("disable-opt", + cl::desc("Do not run any optimization passes")); } @@ -58,6 +62,9 @@ void AddConfiguredTransformationPasses(PassManager &PM) { PM.add(createVerifierPass()); // Verify that input is correct addPass(PM, createLowerSetJmpPass()); // Lower llvm.setjmp/.longjmp addPass(PM, createFunctionResolvingPass()); // Resolve (...) functions + + if (DisableOptimizations) return; + addPass(PM, createCFGSimplificationPass()); // Clean up disgusting code addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst addPass(PM, createGlobalDCEPass()); // Remove unused globals |