diff options
author | Duncan Sands <baldrick@free.fr> | 2008-12-31 16:14:43 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2008-12-31 16:14:43 +0000 |
commit | 9e89ba31f16a960239a750a26a982b4c9dfe8949 (patch) | |
tree | 4b985f2525e7c6470e7a9d345b5c7eb7ffa889fe /include | |
parent | 0c913735c7f66d6bcf0807fac4018a867c3a77e0 (diff) | |
download | external_llvm-9e89ba31f16a960239a750a26a982b4c9dfe8949.zip external_llvm-9e89ba31f16a960239a750a26a982b4c9dfe8949.tar.gz external_llvm-9e89ba31f16a960239a750a26a982b4c9dfe8949.tar.bz2 |
Rename AddReadAttrs to FunctionAttrs, and teach it how
to work out (in a very simplistic way) which function
arguments (pointer arguments only) are only dereferenced
and so do not escape. Mark such arguments 'nocapture'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/LinkAllPasses.h | 2 | ||||
-rw-r--r-- | include/llvm/Transforms/IPO.h | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/LinkAllPasses.h b/include/llvm/LinkAllPasses.h index bc77c08..4113b16 100644 --- a/include/llvm/LinkAllPasses.h +++ b/include/llvm/LinkAllPasses.h @@ -122,7 +122,7 @@ namespace { (void) llvm::createPostDomFrontier(); (void) llvm::createInstructionNamerPass(); (void) llvm::createPartialSpecializationPass(); - (void) llvm::createAddReadAttrsPass(); + (void) llvm::createFunctionAttrsPass(); (void) llvm::createMergeFunctionsPass(); (void) llvm::createPrintModulePass(0); (void) llvm::createPrintFunctionPass("", 0); diff --git a/include/llvm/Transforms/IPO.h b/include/llvm/Transforms/IPO.h index 0d4e33a..eeb2aa2 100644 --- a/include/llvm/Transforms/IPO.h +++ b/include/llvm/Transforms/IPO.h @@ -196,10 +196,12 @@ ModulePass *createStripDeadPrototypesPass(); ModulePass *createPartialSpecializationPass(); //===----------------------------------------------------------------------===// -/// createAddReadAttrsPass - This pass discovers functions that do not access +/// createFunctionAttrsPass - This pass discovers functions that do not access /// memory, or only read memory, and gives them the readnone/readonly attribute. +/// It also discovers function arguments that are not captured by the function +/// and marks them with the nocapture attribute. /// -Pass *createAddReadAttrsPass(); +Pass *createFunctionAttrsPass(); //===----------------------------------------------------------------------===// /// createMergeFunctionsPass - This pass discovers identical functions and |