[PATCH] Fix flags for compiling examples/Kaleidoscope/MCJIT

j medley mjllvmbugzilla at gmail.com
Fri Jul 25 16:14:53 PDT 2014


Added fixes for compiling all Kaleidoscope/MCJIT examples (patch made against r213970). Compiled these on x86-64 & ARMv7a and ran as described in the test plan. Summary of changes:
* Fixed compile flags to use llvm-config --cxxflags instead of llvm-config --cppflags
* Added -pthread -ldl -lcurses -lz linking flags (zlib is apparently a dependency of libLLVMSupport, should -lz be added to llvm-config?)
* API update: raw_fd_ostream constructor needs sys::fs::F_None as flags param (prev. value removed)
* API update: usage of MemoryBuffer::getFile changed
* API update: RTDyldMemoryManager::getPointerToNamedFunction deprecated; use getSymbolAddress
* API update: use DataLayoutPass(Module*) instead of DataLayout for FPM (now using the preferred signature which passes the module)

Additionally, the code that enabled object caching wasn't being triggered. I prefixed "IR:" to the module ID to cause the caching to happen. Additionally, -use-object-cache needs to be specified on the command line, which I added to the python scripts generating the timing in MCJIT/cached/genk-timing.py.

http://reviews.llvm.org/D4607

Files:
  examples/Kaleidoscope/MCJIT/cached/Makefile
  examples/Kaleidoscope/MCJIT/cached/genk-timing.py
  examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp
  examples/Kaleidoscope/MCJIT/cached/toy.cpp
  examples/Kaleidoscope/MCJIT/complete/Makefile
  examples/Kaleidoscope/MCJIT/complete/toy.cpp
  examples/Kaleidoscope/MCJIT/initial/Makefile
  examples/Kaleidoscope/MCJIT/initial/toy.cpp
  examples/Kaleidoscope/MCJIT/lazy/Makefile
  examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp
  examples/Kaleidoscope/MCJIT/lazy/toy.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4607.11899.patch
Type: text/x-patch
Size: 17312 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140725/33549000/attachment.bin>


More information about the llvm-commits mailing list