summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAge
* reapply Sanjiv's patch to genericize memcpy/memset/memmove to take anChris Lattner2008-11-21
| | | | | | | arbitrary integer width for the count. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59823 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r59802. It was breaking the build of llvm-gcc:Bill Wendling2008-11-21
| | | | | | | | | | | | | | | | | | | | | | | g++ -m32 -c -g -DIN_GCC -W -Wall -Wwrite-strings -Wmissing-format-attribute -fno-common -mdynamic-no-pic -DHAVE_CONFIG_H -Wno-unused -DTARGET_NAME=\"i386-apple-darwin9.5.0\" -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include -DENABLE_LLVM -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/../llvm.src/include -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I. -I. -I../../llvm-gcc.src/gcc -I../../llvm-gcc.src/gcc/. -I../../llvm-gcc.src/gcc/../include -I./../intl -I../../llvm-gcc.src/gcc/../libcpp/include -I../../llvm-gcc.src/gcc/../libdecnumber -I../libdecnumber -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.obj/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.src/include ../../llvm-gcc.src/gcc/llvm-types.cpp -o llvm-types.o ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemCpy(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1496: error: 'memcpy_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemMove(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1512: error: 'memmove_i64' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp: In member function 'void TreeToLLVM::EmitMemSet(llvm::Value*, llvm::Value*, llvm::Value*, unsigned int)': ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i32' is not a member of 'llvm::Intrinsic' ../../llvm-gcc.src/gcc/llvm-convert.cpp:1528: error: 'memset_i64' is not a member of 'llvm::Intrinsic' make[3]: *** [llvm-convert.o] Error 1 make[3]: *** Waiting for unfinished jobs.... rm fsf-funding.pod gcov.pod gfdl.pod cpp.pod gpl.pod gcc.pod make[2]: *** [all-stage1-gcc] Error 2 make[1]: *** [stage1-bubble] Error 2 make: *** [all] Error 2 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59809 91177308-0d34-0410-b5e6-96231b3b80d8
* Make mem[cpy,move,set] intrinsics overloaded.Sanjiv Gupta2008-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59802 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: use add_llvm_example for HowToUseJIT.Oscar Fuentes2008-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57944 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Builds all examples. Corrected name of CBackend target.Oscar Fuentes2008-09-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56682 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial support for the CMake build system.Oscar Fuentes2008-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the asmprinter (.ll) and all the stuff it requires over toChris Lattner2008-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | use raw_ostream instead of std::ostream. Among other goodness, this speeds up llvm-dis of kc++ with a release build from 0.85s to 0.49s (88% faster). Other interesting changes: 1) This makes Value::print be non-virtual. 2) AP[S]Int and ConstantRange can no longer print to ostream directly, use raw_ostream instead. 3) This fixes a bug in raw_os_ostream where it didn't flush itself when destroyed. 4) This adds a new SDNode::print method, instead of only allowing "dump". A lot of APIs have both std::ostream and raw_ostream versions, it would be useful to go through and systematically anihilate the std::ostream versions. This passes dejagnu, but there may be minor fallout, plz let me know if so and I'll fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55263 91177308-0d34-0410-b5e6-96231b3b80d8
* use proper namespace qualificationsChris Lattner2008-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55259 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove asmprinters from examples by default. This reduces their size by ~5%Anton Korobeynikov2008-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54890 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-17
| | | | | | | | | | | | | | | | | | | returning an std::string by value, it fills in a SmallString/SmallVector passed in. This significantly reduces string thrashing in some cases. More specifically, this: - Adds an operator<< and a print method for APInt that allows you to directly send them to an ostream. - Reimplements APInt::toString to be much simpler and more efficient algorithmically in addition to not thrashing strings quite as much. This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the asmprinter. This also fixes a bug I introduced into the asmwriter in a previous patch w.r.t. alias printing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54873 91177308-0d34-0410-b5e6-96231b3b80d8
* Have IRBuilder take a template argument on whether or not to preserveEric Christopher2008-08-08
| | | | | | | | names. This can save a lot of allocations if you aren't going to be looking at the output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54546 91177308-0d34-0410-b5e6-96231b3b80d8
* API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵Gabor Greif2008-05-16
| | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51200 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵Gabor Greif2008-05-15
| | | | | | makefile targets to find these better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge LLVMBuilder and FoldingBuilder, callingDuncan Sands2008-04-13
| | | | | | | the result IRBuilder. Patch by Dominic Hamon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49604 91177308-0d34-0410-b5e6-96231b3b80d8
* silence warning when assertions are disabled.Chris Lattner2008-04-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49371 91177308-0d34-0410-b5e6-96231b3b80d8
* Use Intrinsic::getDeclaration in more places.Duncan Sands2008-04-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49338 91177308-0d34-0410-b5e6-96231b3b80d8
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-06
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix an incorrect comment, PR2147.Chris Lattner2008-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48323 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from examples.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45420 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attributions from the rest of the llvm makefiles.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45416 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb2007-12-17
| | | | | | of PointerType::get() has become PointerType::getUnqual(), which returns a pointer in the generic address space. The new prototype of PointerType::get() requires both a type and an address space. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45082 91177308-0d34-0410-b5e6-96231b3b80d8
* add a new BF->LLVM translator, contributed by Sterling Stein.Chris Lattner2007-09-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41881 91177308-0d34-0410-b5e6-96231b3b80d8
* rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()Chris Lattner2007-08-23
| | | | | | | | Add an APSInt::toString() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41309 91177308-0d34-0410-b5e6-96231b3b80d8
* Here is the bulk of the sanitizing.Gabor Greif2007-07-05
| | | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37913 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove BFtoLLVM. It was old, and a poor example because it didn't use best ↵Owen Anderson2007-07-03
| | | | | | | | | practices for making a LLVM frontend in C++. Maybe someday it will be rewritten.. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37858 91177308-0d34-0410-b5e6-96231b3b80d8
* switch this to bitcode instead of bytecodeChris Lattner2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36867 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert last patch. The examples build now.Reid Spencer2007-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34970 91177308-0d34-0410-b5e6-96231b3b80d8
* Adjust for changes in GenericValue type.Reid Spencer2007-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34969 91177308-0d34-0410-b5e6-96231b3b80d8
* temporarily disable this until Reid has a chance to fix it.Chris Lattner2007-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34962 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate vector-related ctorsChris Lattner2007-02-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34227 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a #include to resolve IntegerType class.Reid Spencer2007-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33385 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a #include to resolve IntegerType class.Reid Spencer2007-01-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33384 91177308-0d34-0410-b5e6-96231b3b80d8
* add some casts to support a change in the getOrInsertFunction interfaceChris Lattner2007-01-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32984 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-31
| | | | | | | Convert signed integer types to signless. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32786 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-23
| | | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-07
| | | | | | | now cerr, cout, and NullStream resp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR1019:Reid Spencer2006-12-01
| | | | | | | | | Add HAVE_PTHREAD to makefiles with support from configure and use it to determine whether to build examples/ParallelJIT. Patch by Anton Korobeynikov. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32054 91177308-0d34-0410-b5e6-96231b3b80d8
* Replacing std::iostreams with llvm iostreams. Some of these changes involveBill Wendling2006-11-29
| | | | | | | | adding a temporary wrapper around the ostream to make it friendly to functions expecting an LLVM stream. This should be fixed in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31990 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-10-20
| | | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
* Use llvm-config to determine what to link inChris Lattner2006-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30092 91177308-0d34-0410-b5e6-96231b3b80d8
* WriteBytecodeToFile actually can't throw.Chris Lattner2006-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29397 91177308-0d34-0410-b5e6-96231b3b80d8
* WriteBytecodeToFile throws, so this needs EH info.Chris Lattner2006-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29392 91177308-0d34-0410-b5e6-96231b3b80d8
* Use archive libraries instead of object files for VMCore, BCReader,Reid Spencer2006-06-01
| | | | | | | | BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate these changes. This was done to speed up link times. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28610 91177308-0d34-0410-b5e6-96231b3b80d8
* Support correct build:Reid Spencer2006-06-01
| | | | | | | | | 1. Capture the ENABLE_THREADS configure variable in Makefile.config 2. Use ENABLE_THREADS to avoid building ParallelJIT if threads are not present. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28609 91177308-0d34-0410-b5e6-96231b3b80d8
* Correct some grammar and describe current reality.Reid Spencer2006-05-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28532 91177308-0d34-0410-b5e6-96231b3b80d8
* Catch a potentially thrown exception.Chris Lattner2006-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28295 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor corrections.Jeff Cohen2006-03-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27042 91177308-0d34-0410-b5e6-96231b3b80d8
* Upgrade this to use the new intrinsic namesChris Lattner2006-03-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26483 91177308-0d34-0410-b5e6-96231b3b80d8
* When a function takes a variable number of pointer arguments, with a zeroJeff Cohen2005-10-23
| | | | | | | | | | | | | | pointer marking the end of the list, the zero *must* be cast to the pointer type. An un-cast zero is a 32-bit int, and at least on x86_64, gcc will not extend the zero to 64 bits, thus allowing the upper 32 bits to be random junk. The new END_WITH_NULL macro may be used to annotate a such a function so that GCC (version 4 or newer) will detect the use of un-casted zero at compile time. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23888 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR616:Reid Spencer2005-08-24
| | | | | | | | | | | These patches make threading optional in LLVM. The configuration scripts are now modified to accept a --disable-threads switch. If this is used, the Mutex class will be implemented with all functions as no-op. Furthermore, linking against libpthread will not be done. Finally, the ParallelJIT example needs libpthread so its makefile was changed to always add -lpthread to the link line. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23003 91177308-0d34-0410-b5e6-96231b3b80d8