mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-01 01:30:36 +00:00
* move the dead-type-eliminate passes to the end, where they are more useful
* add prune-eh and inlining passes * other minor pass reorganizations git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8277 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3186d275f7
commit
cf37c23a47
@ -62,17 +62,20 @@ static inline void addPass(PassManager &PM, Pass *P) {
|
|||||||
void AddConfiguredTransformationPasses(PassManager &PM) {
|
void AddConfiguredTransformationPasses(PassManager &PM) {
|
||||||
PM.add(createVerifierPass()); // Verify that input is correct
|
PM.add(createVerifierPass()); // Verify that input is correct
|
||||||
addPass(PM, createFunctionResolvingPass()); // Resolve (...) functions
|
addPass(PM, createFunctionResolvingPass()); // Resolve (...) functions
|
||||||
addPass(PM, createGlobalDCEPass()); // Kill unused uinit g-vars
|
|
||||||
addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types
|
|
||||||
addPass(PM, createConstantMergePass()); // Merge dup global constants
|
|
||||||
addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst
|
addPass(PM, createRaiseAllocationsPass()); // call %malloc -> malloc inst
|
||||||
|
addPass(PM, createGlobalDCEPass()); // Remove unused globals
|
||||||
|
addPass(PM, createPruneEHPass()); // Remove dead EH info
|
||||||
|
addPass(PM, createFunctionInliningPass()); // Inline small functions
|
||||||
|
|
||||||
addPass(PM, createInstructionCombiningPass()); // Cleanup code for raise
|
addPass(PM, createInstructionCombiningPass()); // Cleanup code for raise
|
||||||
addPass(PM, createRaisePointerReferencesPass());// Recover type information
|
addPass(PM, createRaisePointerReferencesPass());// Recover type information
|
||||||
addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code
|
addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code
|
||||||
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
|
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
|
||||||
addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
|
|
||||||
addPass(PM, createScalarReplAggregatesPass()); // Break up aggregate allocas
|
addPass(PM, createScalarReplAggregatesPass()); // Break up aggregate allocas
|
||||||
addPass(PM, createPromoteMemoryToRegister()); // Promote alloca's to regs
|
addPass(PM, createPromoteMemoryToRegister()); // Promote alloca's to regs
|
||||||
|
addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
|
||||||
|
|
||||||
|
|
||||||
addPass(PM, createIndVarSimplifyPass()); // Simplify indvars
|
addPass(PM, createIndVarSimplifyPass()); // Simplify indvars
|
||||||
addPass(PM, createReassociatePass()); // Reassociate expressions
|
addPass(PM, createReassociatePass()); // Reassociate expressions
|
||||||
addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
|
addPass(PM, createInstructionCombiningPass()); // Combine silly seq's
|
||||||
@ -87,6 +90,8 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
|
|||||||
addPass(PM, createInstructionCombiningPass());
|
addPass(PM, createInstructionCombiningPass());
|
||||||
addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
|
addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE'
|
||||||
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
|
addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs
|
||||||
|
addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types
|
||||||
|
addPass(PM, createConstantMergePass()); // Merge dup global constants
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user