summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAge
...
* Reverted 134901 because of 134959. Did not use svn merge -r but rather:Garrison Venn2011-07-12
| | | | | | | | | | | | | | | 1,$s/llvm::Type::getInt\(..\)Ty(builder.getContext())/builder.getInt\1Ty()/g 1,$s/builder.getInt\(..*\)Ty()->getPointerTo()/builder.getInt\1PtrTy()/g vi sub commands (second one was not a reversion but requested by Tobias Grosser. Mod was tested, but other examples have failed to build as they are currently being thrashed with the const qualifier removal change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134985 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the BrainF build.Francois Pichet2011-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134975 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some examplesJohn Wiegley2011-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134933 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified demo to work with non const Type parameters as is required by newGarrison Venn2011-07-11
| | | | | | | | | | | | | type system. However most of these modifications were due to IRBuilder (IRBuilderBase), not having been modified to NOT return such const qualified free types. If IRBuilder does not change, as can also be seen in its instruction creation methods, to use const free types, it may be useful to have ExceptionDemo drop IRBuilder usage. Modifying builder.getInt32Ty() to llvm::Type::getInt32Ty(builder.getContext()) is pretty ugly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134901 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify comment.Johnny Chen2011-06-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132800 91177308-0d34-0410-b5e6-96231b3b80d8
* Have the JIT tutorial use IRBuilder for the IR.Eric Christopher2011-06-09
| | | | | | | Patch by Jake Waskett! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132770 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-15
| | | | | | | | Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
* Added new FIXME noteGarrison Venn2011-04-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129360 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of useless comment; if a file uses functions from a given header,Eli Friedman2011-04-11
| | | | | | | | it is obvious that it should be included. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129295 91177308-0d34-0410-b5e6-96231b3b80d8
* Because some systems have reported that this example would not build theGarrison Venn2011-04-11
| | | | | | | | header file cstdio was added as an include. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129291 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed more best practices, and explicit/implicit style guide issues.Garrison Venn2011-04-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129245 91177308-0d34-0410-b5e6-96231b3b80d8
* reindent this whole file and do a variety of stylistic cleanups.Chris Lattner2011-04-08
| | | | | | | This code is still a long way from following best practices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129140 91177308-0d34-0410-b5e6-96231b3b80d8
* fix this to build with the recent StructType changes.Chris Lattner2011-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129139 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-30
| | | | | | PHINode::Create() giving the (known or expected) number of operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128537 91177308-0d34-0410-b5e6-96231b3b80d8
* (Almost) always call reserveOperandSpace() on newly created PHINodes.Jay Foad2011-03-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128535 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix compiling the ocaml kaleidoscope tutorialsErick Tryzelaar2011-02-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125202 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not re-test for the existence of pthread.h.Oscar Fuentes2010-12-23
| | | | | | It was causing problems on the MinGW build. See PR8849. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122518 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix missing includes of "llvm/Analysis/Passes.h" in the tutorials. ThanksDan Gohman2010-11-16
| | | | | | | for Arnaud Allard de Grandmaison for preparing a patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119351 91177308-0d34-0410-b5e6-96231b3b80d8
* Update examples and documentation to explicitly add basicaa, now that it'sDan Gohman2010-11-15
| | | | | | | no longer included by default. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119169 91177308-0d34-0410-b5e6-96231b3b80d8
* Build with RTTI and exceptions disabled. Only in GCC for now.Oscar Fuentes2010-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116682 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert a bunch of uses of 'bytecode' into 'bitcode'. ThisDuncan Sands2010-09-29
| | | | | | | is not everything, but the remaining cases are less trivial. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115080 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed TracingBrainF from examples Makefile.Garrison Venn2010-09-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113970 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-13
| | | | | | | | | | This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8
* fit in 80 columns and don't crash on exit, fixes PR8080Chris Lattner2010-09-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113123 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove this from the main tree. I'll host it out of tree.Owen Anderson2010-08-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112529 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new example to the LLVM distribution: a trace-based Brainfuck compiler ↵Owen Anderson2010-08-30
| | | | | | that uses LLVM as its code generator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112465 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Mikhail Glushenkov2010-08-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111552 91177308-0d34-0410-b5e6-96231b3b80d8
* upgrade to use new intrinsics, patch by Dan Hipschman!Chris Lattner2010-08-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110735 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some tab stops into spaces.Duncan Sands2010-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108130 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up the ocaml kaleidoscope example as well.Eric Christopher2010-07-12
| | | | | | | Note that the example currently doesn't appear to work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108121 91177308-0d34-0410-b5e6-96231b3b80d8
* fix several bugs in the tutorial, patch by Kevin Kelley!Chris Lattner2010-06-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106498 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove stray semi-colon.Daniel Dunbar2010-06-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106009 91177308-0d34-0410-b5e6-96231b3b80d8
* Make kaleidoscope use fp add/sub/mul.Eric Christopher2010-06-14
| | | | | | | Patch by Patrick Flannery! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105932 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the -enable-sjlj-eh option, which doesn't do anything.Duncan Sands2010-05-02
| | | | | | | | Remove the -enable-eh option which is only used by the JIT, and replace it with -jit-enable-eh. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102865 91177308-0d34-0410-b5e6-96231b3b80d8
* Use provided llvm-defined variables instead of twisting user-controlled knobs.Nick Lewycky2010-04-24
| | | | | | | No visible change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102240 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix -Wcast-qual warning.Benjamin Kramer2010-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101894 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the ocaml kaleidoscope tutorial to fix linking external libraries.Erick Tryzelaar2010-03-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99151 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't always run the ocaml kaleidoscope tutorials.Erick Tryzelaar2010-03-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97973 91177308-0d34-0410-b5e6-96231b3b80d8
* Add OCaml tutorial to the examples.Erick Tryzelaar2010-03-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97966 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll back r96959 again.Jeffrey Yasskin2010-02-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96981 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 ofJeffrey Yasskin2010-02-23
| | | | | | | the examples shared to make sure the shared library keeps working. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96959 91177308-0d34-0410-b5e6-96231b3b80d8
* Modified examples Makefile to only build the ExceptionDemo example for Garrison Venn2010-02-23
| | | | | | | | | | | | | | x86 and x86_64 on UNIX systems. Only OS X 10.6.2 (x86_64) and 32bit CentOS 5.2 with gcc 4.1.2 were tested. ARM UNIX build triggered failure motivating this modification, as it seems that the ARM ABI does not support _Unwind_GetIP(...), _Unwind_SetGR(...), and _Unwind_SetIP(...). From doing a quick browse of: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0038a/IHI0038A_ehabi.pdf, it seems as if all other exception related apis are supported. Looks like the port can be done to ARM. Thanks to Xerxes Rånby <xerxes@zafena.se> for pointing out this error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96949 91177308-0d34-0410-b5e6-96231b3b80d8
* Make Kaleidoscope not link against the interpreter, since that didn'tJeffrey Yasskin2010-02-11
| | | | | | | | | | work anyway (Interpreter::getPointerToFunction doesn't return a callable pointer), and improve the error message when an ExecutionEngine can't be created. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95896 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevented build on WINDOWS using default make system. Stopped WINDOWS buildGarrison Venn2010-02-10
| | | | | | | at eh llvm/examples level using if check on LLVM_ON_UNIX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95763 91177308-0d34-0410-b5e6-96231b3b80d8
* Prevented ExceptionDemo example being built on WINDOWS via if( NOT WIN32 )Garrison Venn2010-02-10
| | | | | | | | check in examples cmake list file. This has NOT been tested. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95761 91177308-0d34-0410-b5e6-96231b3b80d8
* Adds a JIT based exception handling example to the examples directory. Garrison Venn2010-02-09
| | | | | | | | | | | | | | | | | | | | | | | | | Both zero cost example domain specific, and C++ foreign exception handling are shown. The example's documentation fully explains how to run the example. Notes: 1) The code uses an extremely simple type info model. 2) Only a single landing pad is used per unwind edge (one call to llvm.eh.selector) 3) llvm.eh.selector support for filter arguments is not given. 4) llvm.eh.typeid.for is not used. 5) Forced unwind behavior is not supported. 6) Very little if any error handling is given. 7) __attribute__((__aligned__)) is used. 8) The code uses parts from the llvm compiler-rt project and the llvm Kaleidoscope example. 9) The code has not been ported or tested on WINDOWS. 10) The code was not tested with a cmake build. 11) The code was tested for a debug build on 32bit X86 CentOS LINUX, and both a debug and release build on OS X 10.6.2 (64bit). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95723 91177308-0d34-0410-b5e6-96231b3b80d8
* Repository access test commitGarrison Venn2010-02-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95221 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-27
| | | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
* This example requires RTTI.Daniel Dunbar2010-01-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94398 91177308-0d34-0410-b5e6-96231b3b80d8