mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
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:
parent
9899ae3ae8
commit
74295c0164
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user