[llvm-commits] [llvm-gcc-4.2] r56346 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-linker-hack.cpp
Duncan Sands
baldrick at free.fr
Fri Sep 19 07:37:06 PDT 2008
Author: baldrick
Date: Fri Sep 19 09:37:06 2008
New Revision: 56346
URL: http://llvm.org/viewvc/llvm-project?rev=56346&view=rev
Log:
Turn on the AddReadAttrs pass.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=56346&r1=56345&r2=56346&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Fri Sep 19 09:37:06 2008
@@ -400,8 +400,11 @@
}
PM->add(createInstructionCombiningPass()); // Clean up after IPCP & DAE
PM->add(createCFGSimplificationPass()); // Clean up after IPCP & DAE
- if (flag_unit_at_a_time && flag_exceptions)
- PM->add(createPruneEHPass()); // Remove dead EH info
+ if (flag_unit_at_a_time) {
+ if (flag_exceptions)
+ PM->add(createPruneEHPass()); // Remove dead EH info
+ PM->add(createAddReadAttrsPass()); // Set readonly/readnone attrs
+ }
if (flag_inline_trees > 1) // respect -fno-inline-functions
PM->add(createFunctionInliningPass()); // Inline small functions
else if (NeedAlwaysInliner)
Modified: llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp?rev=56346&r1=56345&r2=56346&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp Fri Sep 19 09:37:06 2008
@@ -85,6 +85,7 @@
llvm::createMemCpyOptPass();
llvm::createDeadTypeEliminationPass();
llvm::createLoopDeletionPass();
+ llvm::createAddReadAttrsPass();
std::string Err;
llvm::TargetMachineRegistry::getClosestStaticTargetForModule(*MP->getModule(),
More information about the llvm-commits
mailing list