diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:01:22 +0000 |
commit | 71d5a2540a98c81f5bcaeb48805e0e2881f530ef (patch) | |
tree | 5343938942df402b49ec7300a1c25a2d4ccd5821 /include/llvm/Transforms/IPO/FunctionAttrs.h | |
parent | 31bbf64f3a4974a2d6c8b3b27ad2f519caf74057 (diff) |
Diffstat (limited to 'include/llvm/Transforms/IPO/FunctionAttrs.h')
-rw-r--r-- | include/llvm/Transforms/IPO/FunctionAttrs.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/include/llvm/Transforms/IPO/FunctionAttrs.h b/include/llvm/Transforms/IPO/FunctionAttrs.h index ee45f35bf11b..85d6364c8bbc 100644 --- a/include/llvm/Transforms/IPO/FunctionAttrs.h +++ b/include/llvm/Transforms/IPO/FunctionAttrs.h @@ -20,6 +20,19 @@ namespace llvm { +class AAResults; + +/// The three kinds of memory access relevant to 'readonly' and +/// 'readnone' attributes. +enum MemoryAccessKind { + MAK_ReadNone = 0, + MAK_ReadOnly = 1, + MAK_MayWrite = 2 +}; + +/// Returns the memory access properties of this copy of the function. +MemoryAccessKind computeFunctionBodyMemoryAccess(Function &F, AAResults &AAR); + /// Computes function attributes in post-order over the call graph. /// /// By operating in post-order, this pass computes precise attributes for @@ -43,7 +56,7 @@ Pass *createPostOrderFunctionAttrsLegacyPass(); /// This pass provides a general RPO or "top down" propagation of /// function attributes. For a few (rare) cases, we can deduce significantly /// more about function attributes by working in RPO, so this pass -/// provides the compliment to the post-order pass above where the majority of +/// provides the complement to the post-order pass above where the majority of /// deduction is performed. // FIXME: Currently there is no RPO CGSCC pass structure to slide into and so // this is a boring module pass, but eventually it should be an RPO CGSCC pass |