[llvm-commits] [llvm] r56345 - /llvm/trunk/tools/opt/opt.cpp
Duncan Sands
baldrick at free.fr
Fri Sep 19 07:34:37 PDT 2008
Author: baldrick
Date: Fri Sep 19 09:34:36 2008
New Revision: 56345
URL: http://llvm.org/viewvc/llvm-project?rev=56345&view=rev
Log:
Turn on the AddReadAttrs pass.
Modified:
llvm/trunk/tools/opt/opt.cpp
Modified: llvm/trunk/tools/opt/opt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/opt/opt.cpp?rev=56345&r1=56344&r2=56345&view=diff
==============================================================================
--- llvm/trunk/tools/opt/opt.cpp (original)
+++ llvm/trunk/tools/opt/opt.cpp Fri Sep 19 09:34:36 2008
@@ -288,8 +288,10 @@
}
MPM.add(createInstructionCombiningPass()); // Clean up after IPCP & DAE
MPM.add(createCFGSimplificationPass()); // Clean up after IPCP & DAE
- if (UnitAtATime)
+ if (UnitAtATime) {
MPM.add(createPruneEHPass()); // Remove dead EH info
+ MPM.add(createAddReadAttrsPass()); // Set readonly/readnone attrs
+ }
if (OptLevel > 1)
MPM.add(createFunctionInliningPass()); // Inline small functions
if (OptLevel > 2)
@@ -360,6 +362,7 @@
addPass(PM, createCFGSimplificationPass()); // Clean up after IPCP & DAE
addPass(PM, createPruneEHPass()); // Remove dead EH info
+ addPass(PM, createAddReadAttrsPass()); // Set readonly/readnone attrs
if (!DisableInline)
addPass(PM, createFunctionInliningPass()); // Inline small functions
More information about the llvm-commits
mailing list