[llvm] r242416 - Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref

Lang Hames lhames at gmail.com
Thu Jul 16 13:51:55 PDT 2015


Thanks for fixing this Mehdi!

- Lang.

On Thu, Jul 16, 2015 at 9:47 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:

> Author: mehdi_amini
> Date: Thu Jul 16 11:47:18 2015
> New Revision: 242416
>
> URL: http://llvm.org/viewvc/llvm-project?rev=242416&view=rev
> Log:
> Fix Kaleidoscope tuto: ExecutionEngine->getDataLayout() returns a ref
>
> From: Mehdi Amini <mehdi.amini at apple.com>
>
> Modified:
>     llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp
>     llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp
>     llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp
>     llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp
>     llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp
>
> Modified: llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
>
> ==============================================================================
> --- llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp (original)
> +++ llvm/trunk/examples/Kaleidoscope/Chapter4/toy.cpp Thu Jul 16 11:47:18
> 2015
> @@ -560,7 +560,7 @@ void *MCJITHelper::getPointerToFunction(
>
>      // Set up the optimizer pipeline.  Start with registering info about
> how the
>      // target lays out data structures.
> -    OpenModule->setDataLayout(*NewEngine->getDataLayout());
> +    OpenModule->setDataLayout(NewEngine->getDataLayout());
>      // Provide basic AliasAnalysis support for GVN.
>      FPM->add(createBasicAliasAnalysisPass());
>      // Promote allocas to registers.
>
> Modified: llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
>
> ==============================================================================
> --- llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp (original)
> +++ llvm/trunk/examples/Kaleidoscope/Chapter5/toy.cpp Thu Jul 16 11:47:18
> 2015
> @@ -913,7 +913,7 @@ int main() {
>
>    // Set up the optimizer pipeline.  Start with registering info about
> how the
>    // target lays out data structures.
> -  TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
> +  TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
>    // Provide basic AliasAnalysis support for GVN.
>    OurFPM.add(createBasicAliasAnalysisPass());
>    // Do simple "peephole" optimizations and bit-twiddling optzns.
>
> Modified: llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
>
> ==============================================================================
> --- llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp (original)
> +++ llvm/trunk/examples/Kaleidoscope/Chapter6/toy.cpp Thu Jul 16 11:47:18
> 2015
> @@ -1034,7 +1034,7 @@ int main() {
>
>    // Set up the optimizer pipeline.  Start with registering info about
> how the
>    // target lays out data structures.
> -  TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
> +  TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
>    // Provide basic AliasAnalysis support for GVN.
>    OurFPM.add(createBasicAliasAnalysisPass());
>    // Do simple "peephole" optimizations and bit-twiddling optzns.
>
> Modified: llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
>
> ==============================================================================
> --- llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp (original)
> +++ llvm/trunk/examples/Kaleidoscope/Chapter7/toy.cpp Thu Jul 16 11:47:18
> 2015
> @@ -1211,7 +1211,7 @@ int main() {
>
>    // Set up the optimizer pipeline.  Start with registering info about
> how the
>    // target lays out data structures.
> -  TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
> +  TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
>    // Provide basic AliasAnalysis support for GVN.
>    OurFPM.add(createBasicAliasAnalysisPass());
>    // Promote allocas to registers.
>
> Modified: llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp?rev=242416&r1=242415&r2=242416&view=diff
>
> ==============================================================================
> --- llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp (original)
> +++ llvm/trunk/examples/Kaleidoscope/Chapter8/toy.cpp Thu Jul 16 11:47:18
> 2015
> @@ -1462,7 +1462,7 @@ int main() {
>
>    // Set up the optimizer pipeline.  Start with registering info about
> how the
>    // target lays out data structures.
> -  TheModule->setDataLayout(*TheExecutionEngine->getDataLayout());
> +  TheModule->setDataLayout(TheExecutionEngine->getDataLayout());
>  #if 0
>    // Provide basic AliasAnalysis support for GVN.
>    OurFPM.add(createBasicAliasAnalysisPass());
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150716/317a316c/attachment.html>


More information about the llvm-commits mailing list