diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-04-13 15:44:58 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-04-13 15:44:58 +0000 |
| commit | 6aafb64daf40f0d798eae6fe3542a6ad0afcdb5f (patch) | |
| tree | 3ee298ead41b2ba0673e7e7dbf6d4a02457b2b2c /llvm | |
| parent | d35159a17759932ec454215d2267cca11495d409 (diff) | |
| download | bcm5719-llvm-6aafb64daf40f0d798eae6fe3542a6ad0afcdb5f.tar.gz bcm5719-llvm-6aafb64daf40f0d798eae6fe3542a6ad0afcdb5f.zip | |
Add the alias analysis to the C api.
llvm-svn: 129447
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm-c/Transforms/Scalar.h | 7 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/Scalar.cpp | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Transforms/Scalar.h b/llvm/include/llvm-c/Transforms/Scalar.h index da05a7dc16a..cf8d71f5d00 100644 --- a/llvm/include/llvm-c/Transforms/Scalar.h +++ b/llvm/include/llvm-c/Transforms/Scalar.h @@ -107,6 +107,13 @@ void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM); /** See llvm::createEarlyCSEPass function */ void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM); +/** See llvm::createTypeBasedAliasAnalysisPass function */ +void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM); + +/** See llvm::createBasicAliasAnalysisPass function */ +void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM); + + #ifdef __cplusplus } #endif /* defined(__cplusplus) */ diff --git a/llvm/lib/Transforms/Scalar/Scalar.cpp b/llvm/lib/Transforms/Scalar/Scalar.cpp index 5428a5afec0..32a05061743 100644 --- a/llvm/lib/Transforms/Scalar/Scalar.cpp +++ b/llvm/lib/Transforms/Scalar/Scalar.cpp @@ -17,6 +17,7 @@ #include "llvm-c/Initialization.h" #include "llvm/InitializePasses.h" #include "llvm/PassManager.h" +#include "llvm/Analysis/Passes.h" #include "llvm/Analysis/Verifier.h" #include "llvm/Target/TargetData.h" #include "llvm/Transforms/Scalar.h" @@ -173,3 +174,11 @@ void LLVMAddCorrelatedValuePropagationPass(LLVMPassManagerRef PM) { void LLVMAddEarlyCSEPass(LLVMPassManagerRef PM) { unwrap(PM)->add(createEarlyCSEPass()); } + +void LLVMAddTypeBasedAliasAnalysisPass(LLVMPassManagerRef PM) { + unwrap(PM)->add(createTypeBasedAliasAnalysisPass()); +} + +void LLVMAddBasicAliasAnalysisPass(LLVMPassManagerRef PM) { + unwrap(PM)->add(createBasicAliasAnalysisPass()); +} |

