Update examples and documentation to explicitly add basicaa, now that it's
authorDan Gohman <gohman@apple.com>
Mon, 15 Nov 2010 18:41:10 +0000 (18:41 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 15 Nov 2010 18:41:10 +0000 (18:41 +0000)
no longer included by default.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119169 91177308-0d34-0410-b5e6-96231b3b80d8

docs/tutorial/LangImpl4.html
docs/tutorial/LangImpl5.html
docs/tutorial/LangImpl6.html
docs/tutorial/LangImpl7.html
examples/ExceptionDemo/ExceptionDemo.cpp
examples/Kaleidoscope/Chapter4/toy.cpp
examples/Kaleidoscope/Chapter5/toy.cpp
examples/Kaleidoscope/Chapter6/toy.cpp
examples/Kaleidoscope/Chapter7/toy.cpp

index 35dcdf4914e39b6cb968840415f80c0230cd5dd8..89aa38ea2e1bee937c18969452d098746979b95e 100644 (file)
@@ -176,6 +176,8 @@ add a set of optimizations to run.  The code looks like this:</p>
   // 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.
@@ -1086,6 +1088,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-&gt;getTargetData()));
+  // Provide basic AliasAnalysis support for GVN.
+  OurFPM.add(createBasicAliasAnalysisPass());
   // Do simple "peephole" optimizations and bit-twiddling optzns.
   OurFPM.add(createInstructionCombiningPass());
   // Reassociate expressions.
index 79bf5f82aa973849cef9586fa4d5dd3c7460a005..cc049aca4fbdf23acce9f12d58bcbd94e1a086a4 100644 (file)
@@ -1731,6 +1731,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-&gt;getTargetData()));
+  // Provide basic AliasAnalysis support for GVN.
+  OurFPM.add(createBasicAliasAnalysisPass());
   // Do simple "peephole" optimizations and bit-twiddling optzns.
   OurFPM.add(createInstructionCombiningPass());
   // Reassociate expressions.
index 97505f7c3497a55feac28a5428fe637ba6793b60..74529768aedb6e3e6a4ab8c8c5b22c09639f2a1c 100644 (file)
@@ -1768,6 +1768,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-&gt;getTargetData()));
+  // Provide basic AliasAnalysis support for GVN.
+  OurFPM.add(createBasicAliasAnalysisPass());
   // Do simple "peephole" optimizations and bit-twiddling optzns.
   OurFPM.add(createInstructionCombiningPass());
   // Reassociate expressions.
index fa5afeec9d2872899f22341cb93a54ec01df7f23..c9b786d377dd73fed2d77be5fa28487ebe33df55 100644 (file)
@@ -2116,6 +2116,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-&gt;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.
index e09c990f8a9f0ba33946665e283b9c9d4a90e2a3..95ccd24a689414960d2ef2b73ce50f8123ccd932 100644 (file)
@@ -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());
 
index 327c5c0591c00e169ac20009130c20d6cdc326d6..bbac033149dd9f14ede0becfeb9641c951300818 100644 (file)
@@ -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.
index c98ee88c394fa762d55b0cf143b664cbf39df1eb..9405373f891b36961f63fbe1dfc5f6162519d60f 100644 (file)
@@ -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.
index b7b8738f587ddafc205ed9a6c5e72aa3a3a39be8..bcc9d9e297a421f46df445082ec05f4656a203c7 100644 (file)
@@ -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.
index 0cf7869d02f8f3103935f56c787d91f4c77d3200..214ee43a07e2e159bf4a3fc5e8a98ad83dffc5c6 100644 (file)
@@ -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.