Add a -disable-opt flag to gccas, so that we can use -Wa,-disable-opt just

like -Wl,-disable-opt

llvm-svn: 10647
This commit is contained in:
Chris Lattner 2003-12-30 03:24:27 +00:00
parent 6b668f228f
commit cf1755a6f3
1 changed files with 7 additions and 0 deletions

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