aboutsummaryrefslogtreecommitdiff
path: root/llvm/examples/BrainF/BrainF.cpp
AgeCommit message (Collapse)AuthorFilesLines
2016-08-17Replace a few more "fall through" comments with LLVM_FALLTHROUGHJustin Bogner1-2/+2
Follow up to r278902. I had missed "fall through", with a space. llvm-svn: 278970
2016-05-25Fix some Include What You Use warnings in examples; other minor fixes.Eugene Zelenko1-4/+16
Differential revision: http://reviews.llvm.org/D20607 llvm-svn: 270645
2015-09-29Fix Clang-tidy modernize-use-nullptr warnings in examples and include ↵Hans Wennborg1-7/+3
directories; other minor cleanups. Patch by Eugene Zelenko! Differential Revision: http://reviews.llvm.org/D13172 llvm-svn: 248811
2015-05-19BrainF.cpp: Update CreateCall() according to r237624.NAKAMURA Takumi1-1/+2
llvm-svn: 237669
2015-04-02llvm/examples/BrainF: Give an explicit pointee type to ↵NAKAMURA Takumi1-1/+1
ConstantExpr::getGetElementPtr(ty...), according to r233938. llvm-svn: 233983
2013-01-02Update the examples for the new header file locations.Chandler Carruth1-3/+3
Sorry for the fallout here, I forgot the examples aren't built by default any more. llvm-svn: 171371
2012-12-04Sort the #include lines of the examples/... tree.Chandler Carruth1-1/+1
llvm-svn: 169249
2012-01-31Fix BrainF compilation.Francois Pichet1-1/+2
llvm-svn: 149375
2011-07-21Convert ConstantExpr::getGetElementPtr andJay Foad1-2/+1
ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
2011-07-18update for recent api changes. I have a hard time believing that this is ↵Chris Lattner1-2/+2
actually a useful example. llvm-svn: 135374
2011-07-15Convert CallInst and InvokeInst APIs to use ArrayRef. For the LLVM examples.Francois Pichet1-3/+3
llvm-svn: 135266
2011-07-14Change Intrinsic::getDeclaration and friends to take an ArrayRef.Benjamin Kramer1-1/+1
llvm-svn: 135154
2011-07-12Remove the const from Type after of Jay deconstify work.Francois Pichet1-1/+1
llvm-svn: 135000
2011-07-12Fix the BrainF build.Francois Pichet1-1/+1
llvm-svn: 134975
2011-07-11fix some examplesJohn Wiegley1-1/+1
llvm-svn: 134933
2011-03-30Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad1-4/+3
PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
2010-08-10upgrade to use new intrinsics, patch by Dan Hipschman!Chris Lattner1-5/+6
llvm-svn: 110735
2009-11-07Re-commit r86077 now that r86290 fixes the 179.art and 175.vpr ARM regressions.Victor Hernandez1-2/+5
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. llvm-svn: 86311
2009-11-06Revert r86077 because it caused crashes in 179.art and 175.vpr on ARMVictor Hernandez1-5/+2
llvm-svn: 86213
2009-11-05Update CreateMalloc so that its callers specify the size to allocate:Victor Hernandez1-2/+5
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. llvm-svn: 86077
2009-10-26Remove FreeInst.Victor Hernandez1-2/+2
Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
2009-10-17Autoupgrade malloc insts to malloc calls.Victor Hernandez1-1/+6
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. llvm-svn: 84292
2009-09-25Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it ↵Victor Hernandez1-6/+1
causes regressions in the nightly tests. llvm-svn: 82784
2009-09-24Auto-upgrade malloc instructions to malloc calls.Victor Hernandez1-1/+6
Reviewed by Devang Patel. llvm-svn: 82694
2009-08-13Push LLVMContexts through the IntegerType APIs.Owen Anderson1-22/+22
llvm-svn: 78948
2009-07-31Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson1-1/+1
change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
2009-07-29Move types back to the 2.5 API.Owen Anderson1-3/+3
llvm-svn: 77516
2009-07-28Change ConstantArray to 2.5 API.Owen Anderson1-1/+1
llvm-svn: 77347
2009-07-24Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson1-8/+8
thanks to contexts-on-types. More to come. llvm-svn: 77011
2009-07-14Move EVER MORE stuff over to LLVMContext.Owen Anderson1-16/+17
llvm-svn: 75703
2009-07-13Begin the painful process of tearing apart the rat'ss nest that is ↵Owen Anderson1-1/+1
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. llvm-svn: 75445
2009-07-09This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson1-3/+2
the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
2009-07-08Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson1-3/+2
module is required. llvm-svn: 75025
2009-07-08Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson1-0/+1
llvm-svn: 74985
2009-07-01Make the use of const with respect to LLVMContext sane. Hopefully this is ↵Owen Anderson1-2/+2
the last time, for the moment, that I will need to make far-reaching changes. llvm-svn: 74655
2009-07-01Hold the LLVMContext by reference rather than by pointer.Owen Anderson1-2/+2
llvm-svn: 74640
2009-07-01Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson1-4/+5
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. llvm-svn: 74614
2008-11-21reapply Sanjiv's patch to genericize memcpy/memset/memmove to take anChris Lattner1-1/+3
arbitrary integer width for the count. llvm-svn: 59823
2008-11-21Revert r59802. It was breaking the build of llvm-gcc:Bill Wendling1-3/+1
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 llvm-svn: 59809
2008-11-21Make mem[cpy,move,set] intrinsics overloaded.Sanjiv Gupta1-1/+3
llvm-svn: 59802
2008-08-23use proper namespace qualificationsChris Lattner1-4/+4
llvm-svn: 55259
2008-08-08Have IRBuilder take a template argument on whether or not to preserveEric Christopher1-1/+1
names. This can save a lot of allocations if you aren't going to be looking at the output. llvm-svn: 54546
2008-05-15Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵Gabor Greif1-3/+4
makefile targets to find these better. llvm-svn: 51143
2008-04-13Merge LLVMBuilder and FoldingBuilder, callingDuncan Sands1-7/+7
the result IRBuilder. Patch by Dominic Hamon. llvm-svn: 49604
2008-04-07Use Intrinsic::getDeclaration in more places.Duncan Sands1-5/+2
llvm-svn: 49338
2008-04-06API changes for class Use size reduction, wave 1.Gabor Greif1-14/+14
Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. llvm-svn: 49277
2007-12-29remove attributions from examples.Chris Lattner1-2/+2
llvm-svn: 45420
2007-12-17Change the PointerType api for creating pointer types. The old functionality ↵Christopher Lamb1-4/+4
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. llvm-svn: 45082
2007-09-12add a new BF->LLVM translator, contributed by Sterling Stein.Chris Lattner1-0/+458
llvm-svn: 41881