diff options
author | Duncan Sands <baldrick@free.fr> | 2008-04-17 12:03:38 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-04-17 12:03:38 +0000 |
commit | fa191e4cd47f0c518c9a148701df6d4aea6dc97c (patch) | |
tree | 8d4a4715cdd451609980de87307a14d906e59591 /tools/opt/opt.cpp | |
parent | 02819257a625d0d9a186845354baadd6e8f1890b (diff) | |
download | external_llvm-fa191e4cd47f0c518c9a148701df6d4aea6dc97c.zip external_llvm-fa191e4cd47f0c518c9a148701df6d4aea6dc97c.tar.gz external_llvm-fa191e4cd47f0c518c9a148701df6d4aea6dc97c.tar.bz2 |
Run SimplifyLibCalls near the beginning, not at
the end. It is now run at the same moment as in
llvm-gcc. Also, run StripDeadPrototypes at the
end, just before running DeadTypeElimination.
This may be useful when doing LTO. Note that
llvm-gcc runs StripDeadPrototypes but not
DeadTypeElimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49848 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/opt/opt.cpp')
-rw-r--r-- | tools/opt/opt.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/opt/opt.cpp b/tools/opt/opt.cpp index 80deb75..ca206cf 100644 --- a/tools/opt/opt.cpp +++ b/tools/opt/opt.cpp @@ -262,6 +262,7 @@ void AddStandardCompilePasses(PassManager &PM) { if (!DisableInline) addPass(PM, createFunctionInliningPass()); // Inline small functions + addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations addPass(PM, createArgumentPromotionPass()); // Scalarize uninlined fn args addPass(PM, createTailDuplicationPass()); // Simplify cfg by copying code @@ -294,7 +295,7 @@ void AddStandardCompilePasses(PassManager &PM) { addPass(PM, createDeadStoreEliminationPass()); // Delete dead stores addPass(PM, createAggressiveDCEPass()); // SSA based 'Aggressive DCE' addPass(PM, createCFGSimplificationPass()); // Merge & remove BBs - addPass(PM, createSimplifyLibCallsPass()); // Library Call Optimizations + addPass(PM, createStripDeadPrototypesPass()); // Get rid of dead prototypes addPass(PM, createDeadTypeEliminationPass()); // Eliminate dead types addPass(PM, createConstantMergePass()); // Merge dup global constants } |