mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-05 13:09:10 +00:00
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
This commit is contained in:
parent
599ca72f5f
commit
081c409e27
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user