diff options
author | Dan Gohman <gohman@apple.com> | 2010-11-15 18:41:10 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-11-15 18:41:10 +0000 |
commit | 56f3a4c761f736f4cb792b0012071c213992c8a0 (patch) | |
tree | 67b4a43343f02a25c1b15bb44106aaf333a14f88 /llvm/examples | |
parent | 913af510c7059276205049166e7bf69175573da1 (diff) | |
download | bcm5719-llvm-56f3a4c761f736f4cb792b0012071c213992c8a0.tar.gz bcm5719-llvm-56f3a4c761f736f4cb792b0012071c213992c8a0.zip |
Update examples and documentation to explicitly add basicaa, now that it's
no longer included by default.
llvm-svn: 119169
Diffstat (limited to 'llvm/examples')
-rw-r--r-- | llvm/examples/ExceptionDemo/ExceptionDemo.cpp | 3 | ||||
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter4/toy.cpp | 2 | ||||
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter5/toy.cpp | 2 | ||||
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter6/toy.cpp | 2 | ||||
-rw-r--r-- | llvm/examples/Kaleidoscope/Chapter7/toy.cpp | 2 |
5 files changed, 11 insertions, 0 deletions
diff --git a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp index e09c990f8a9..95ccd24a689 100644 --- a/llvm/examples/ExceptionDemo/ExceptionDemo.cpp +++ b/llvm/examples/ExceptionDemo/ExceptionDemo.cpp @@ -1974,6 +1974,9 @@ int main(int argc, char* argv[]) { // Optimizations turned on #ifdef ADD_OPT_PASSES + // Basic AliasAnslysis support for GVN. + fpm.add(llvm::createBasicAliasAnalysisPass()); + // Promote allocas to registers. fpm.add(llvm::createPromoteMemoryToRegisterPass()); diff --git a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp index 327c5c0591c..bbac033149d 100644 --- a/llvm/examples/Kaleidoscope/Chapter4/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter4/toy.cpp @@ -584,6 +584,8 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); + // Provide basic AliasAnalysis support for GVN. + OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. OurFPM.add(createInstructionCombiningPass()); // Reassociate expressions. diff --git a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp index c98ee88c394..9405373f891 100644 --- a/llvm/examples/Kaleidoscope/Chapter5/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter5/toy.cpp @@ -829,6 +829,8 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); + // Provide basic AliasAnalysis support for GVN. + OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. OurFPM.add(createInstructionCombiningPass()); // Reassociate expressions. diff --git a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp index b7b8738f587..bcc9d9e297a 100644 --- a/llvm/examples/Kaleidoscope/Chapter6/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter6/toy.cpp @@ -947,6 +947,8 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); + // Provide basic AliasAnalysis support for GVN. + OurFPM.add(createBasicAliasAnalysisPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. OurFPM.add(createInstructionCombiningPass()); // Reassociate expressions. diff --git a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp index 0cf7869d02f..214ee43a07e 100644 --- a/llvm/examples/Kaleidoscope/Chapter7/toy.cpp +++ b/llvm/examples/Kaleidoscope/Chapter7/toy.cpp @@ -1111,6 +1111,8 @@ int main() { // Set up the optimizer pipeline. Start with registering info about how the // target lays out data structures. OurFPM.add(new TargetData(*TheExecutionEngine->getTargetData())); + // Provide basic AliasAnalysis support for GVN. + OurFPM.add(createBasicAliasAnalysisPass()); // Promote allocas to registers. OurFPM.add(createPromoteMemoryToRegisterPass()); // Do simple "peephole" optimizations and bit-twiddling optzns. |