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 | 0d9874b48d747298dcea7e4e6385b511c04a7842 (patch) | |
tree | e5d696c6f70ae9779e4a913d0b36de4356c7c0bb | |
parent | 6b32e7e213ca14d5d898c84053d6f38a4c360763 (diff) | |
download | external_llvm-0d9874b48d747298dcea7e4e6385b511c04a7842.zip external_llvm-0d9874b48d747298dcea7e4e6385b511c04a7842.tar.gz external_llvm-0d9874b48d747298dcea7e4e6385b511c04a7842.tar.bz2 |
Add the alias analysis to the C api.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129447 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm-c/Transforms/Scalar.h | 7 | ||||
-rw-r--r-- | lib/Transforms/Scalar/Scalar.cpp | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm-c/Transforms/Scalar.h b/include/llvm-c/Transforms/Scalar.h index da05a7d..cf8d71f 100644 --- a/include/llvm-c/Transforms/Scalar.h +++ b/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/lib/Transforms/Scalar/Scalar.cpp b/lib/Transforms/Scalar/Scalar.cpp index 5428a5a..32a0506 100644 --- a/lib/Transforms/Scalar/Scalar.cpp +++ b/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()); +} |