Add a new pass AddReadAttrs which works out which functions

can get the readnone/readonly attributes, and gives them it.
The plan is to remove markmodref (which did the same thing
by querying GlobalsModRef) and delete the analogous
functionality from GlobalsModRef.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56341 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands
2008-09-19 08:17:05 +00:00
parent e763f7eec2
commit 9f07a290b9
7 changed files with 146 additions and 4 deletions

View File

@@ -188,6 +188,12 @@ ModulePass *createStripDeadPrototypesPass();
///
ModulePass* createPartialSpecializationPass();
//===----------------------------------------------------------------------===//
/// createAddReadAttrsPass - This pass discovers functions that do not access
/// memory, or only read memory, and gives them the readnone/readonly attribute.
///
Pass* createAddReadAttrsPass();
} // End llvm namespace
#endif