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
This commit is contained in:
Chris Lattner 2003-12-30 03:24:27 +00:00
parent 9899ae3ae8
commit 74295c0164

View File

@ -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