summaryrefslogtreecommitdiff
path: root/examples/BrainF/BrainF.cpp
Commit message (Collapse)AuthorAge
* Update the examples for the new header file locations.Chandler Carruth2013-01-02
| | | | | | | Sorry for the fallout here, I forgot the examples aren't built by default any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171371 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines of the examples/... tree.Chandler Carruth2012-12-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169249 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix BrainF compilation.Francois Pichet2012-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149375 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert ConstantExpr::getGetElementPtr andJay Foad2011-07-21
| | | | | | | ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135673 91177308-0d34-0410-b5e6-96231b3b80d8
* update for recent api changes. I have a hard time believing that this is ↵Chris Lattner2011-07-18
| | | | | | actually a useful example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135374 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert CallInst and InvokeInst APIs to use ArrayRef. For the LLVM examples.Francois Pichet2011-07-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135266 91177308-0d34-0410-b5e6-96231b3b80d8
* Change Intrinsic::getDeclaration and friends to take an ArrayRef.Benjamin Kramer2011-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135154 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the const from Type after of Jay deconstify work.Francois Pichet2011-07-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135000 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
* 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
* 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
* Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.Victor Hernandez2009-11-07
| | | | | | | | | | | | | | | | | | | | | | | | | Here is the original commit message: This commit updates malloc optimizations to operate on malloc calls that have constant int size arguments. Update CreateMalloc so that its callers specify the size to allocate: MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size. Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses. Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly. Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use. Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use. Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86311 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r86077 because it caused crashes in 179.art and 175.vpr on ARMVictor Hernandez2009-11-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86213 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CreateMalloc so that its callers specify the size to allocate:Victor Hernandez2009-11-05
| | | | | | | | | | | | | | | | | | | MallocInst-autoupgrade users use non-TargetData-computed allocation sizes. Optimization uses use TargetData to compute the allocation size. Now that malloc calls can have constant sizes, update isArrayMallocHelper() to use TargetData to determine the size of the malloced type and the size of malloced arrays. Extend getMallocType() to support malloc calls that have non-bitcast uses. Update OptimizeGlobalAddressOfMalloc() to optimize malloc calls that have non-bitcast uses. The bitcast use of a malloc call has to be treated specially here because the uses of the bitcast need to be replaced and the bitcast needs to be erased (just like the malloc call) for OptimizeGlobalAddressOfMalloc() to work correctly. Update PerformHeapAllocSRoA() to optimize malloc calls that have non-bitcast uses. The bitcast use of the malloc is not handled specially here because ReplaceUsesOfMallocWithGlobal replaces through the bitcast use. Update OptimizeOnceStoredGlobal() to not care about the malloc calls' bitcast use. Update all globalopt malloc tests to not rely on autoupgraded-MallocInsts, but instead use explicit malloc calls with correct allocation sizes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86077 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove FreeInst.Victor Hernandez2009-10-26
| | | | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85176 91177308-0d34-0410-b5e6-96231b3b80d8
* Autoupgrade malloc insts to malloc calls.Victor Hernandez2009-10-17
| | | | | | | | | | Update testcases that rely on malloc insts being present. Also prematurely remove MallocInst handling from IndMemRemoval and RaiseAllocations to help pass tests in this incremental step. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84292 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it ↵Victor Hernandez2009-09-25
| | | | | | causes regressions in the nightly tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82784 91177308-0d34-0410-b5e6-96231b3b80d8
* Auto-upgrade malloc instructions to malloc calls.Victor Hernandez2009-09-24
| | | | | | | | Reviewed by Devang Patel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82694 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-31
| | | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
* Move types back to the 2.5 API.Owen Anderson2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ConstantArray to 2.5 API.Owen Anderson2009-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-24
| | | | | | thanks to contexts-on-types. More to come. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
* Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson2009-07-13
| | | | | | | | | | Constants.cpp and ConstantFold.cpp. This involves temporarily hard wiring some parts to use the global context. This isn't ideal, but it's the only way I could figure out to make this process vaguely incremental. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-09
| | | | | | the [I|F]CmpInst constructors. Who knew!? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-08
| | | | | | module is required. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson2009-07-01
| | | | | | | | | the last time, for the moment, that I will need to make far-reaching changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74655 91177308-0d34-0410-b5e6-96231b3b80d8
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-01
| | | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
* 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
* use proper namespace qualificationsChris Lattner2008-08-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55259 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
* 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
* 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
* 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
* 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