aboutsummaryrefslogtreecommitdiff
path: root/llvm/examples/BrainF
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 Zelenko3-12/+40
Differential revision: http://reviews.llvm.org/D20607 llvm-svn: 270645
2016-04-14Remove every uses of getGlobalContext() in LLVM (but the C API)Mehdi Amini1-1/+1
At the same time, fixes InstructionsTest::CastInst unittest: yes you can leave the IR in an invalid state and exit when you don't destroy the context (like the global one), no longer now. This is the first part of http://reviews.llvm.org/D19094 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 266379
2016-01-26Remove autoconf supportChris Bieneman1-15/+0
Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 llvm-svn: 258861
2015-11-07examples: Remove implicit ilist iterator conversions, NFCDuncan P. N. Exon Smith1-2/+2
llvm-svn: 252379
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
2014-09-03Fix configure and make build of llvm examples.Iain Sandoe1-1/+1
Replaced link component 'jit' with 'mcjit'. llvm-svn: 217032
2014-09-02Reinstate "Nuke the old JIT."Eric Christopher2-2/+1
Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
2014-08-25Modernize raw_fd_ostream's constructor a bit.Rafael Espindola1-3/+2
Take a StringRef instead of a "const char *". Take a "std::error_code &" instead of a "std::string &" for error. A create static method would be even better, but this patch is already a bit too big. llvm-svn: 216393
2014-08-19Make it explicit that ExecutionEngine takes ownership of the modules.Rafael Espindola1-7/+7
llvm-svn: 215967
2014-08-07Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2-1/+2
be deleted. This will be reapplied as soon as possible and before the 3.6 branch date at any rate. Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reverts commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 215154
2014-08-07Nuke the old JIT.Rafael Espindola2-2/+1
I am sure we will be finding bits and pieces of dead code for years to come, but this is a good start. Thanks to Lang Hames for making MCJIT a good replacement! llvm-svn: 215111
2014-07-14[CMake] Update libdeps.NAKAMURA Takumi1-0/+1
llvm-svn: 212920
2014-04-29Try to fix the msvc build.Benjamin Kramer1-0/+1
llvm-svn: 207594
2014-02-24Replace the F_Binary flag with a F_Text one.Rafael Espindola1-1/+1
After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
2014-01-13[cleanup] Re-sort the examples #include lines with my sort_includesChandler Carruth1-1/+1
script. llvm-svn: 199089
2014-01-13[cleanup] Fix the includes in the examples for r199082.Chandler Carruth1-1/+1
llvm-svn: 199087
2013-12-10[CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi1-1/+8
llvm-svn: 196908
2013-07-16Update the examples for an API change.Rafael Espindola1-1/+1
llvm-svn: 186453
2013-01-02Update the examples for the new header file locations.Chandler Carruth3-7/+7
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 Carruth2-3/+3
llvm-svn: 169249
2012-06-29Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth1-1/+1
This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. llvm-svn: 159421
2012-04-19Remove llvm-ld and llvm-stub (which is only used by llvm-ld).Michael J. Spencer1-1/+0
llvm-ld is no longer useful and causes confusion and so it is being removed. * Does not work very well on Windows because it must call a gcc like driver to assemble and link. * Has lots of hard coded paths which are wrong on many systems. * Does not understand most of ld's options. * Can be partially replaced by llvm-link | opt | {llc | as, llc -filetype=obj} | ld, or fully replaced by Clang. I know of no production use of llvm-ld, and hacking use should be replaced by Clang's driver. llvm-svn: 155147
2012-01-31Fix BrainF compilation.Francois Pichet1-1/+2
llvm-svn: 149375
2011-08-24Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng1-1/+1
These are strictly utilities for registering targets and components. llvm-svn: 138450
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-09-13Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer1-3/+2
This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake llvm-svn: 113819
2010-09-10CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer1-2/+3
llvm-svn: 113632
2010-08-10upgrade to use new intrinsics, patch by Dan Hipschman!Chris Lattner1-5/+6
llvm-svn: 110735
2010-02-23Roll back r96959 again.Jeffrey Yasskin1-3/+0
llvm-svn: 96981
2010-02-23Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 ofJeffrey Yasskin1-0/+3
the examples shared to make sure the shared library keeps working. llvm-svn: 96959
2010-01-27Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin1-1/+0
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. llvm-svn: 94686
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-25Make LLVM command-line tools overwrite their output files without -f.Dan Gohman1-1/+0
This is conventional command-line tool behavior. -f now just means "enable binary output on terminals". Add a -f option to llvm-extract and llvm-link, for consistency. Remove F_Force from raw_fd_ostream and enable overwriting and truncating by default. Introduce an F_Excl flag to permit users to enable a failure when the file already exists. This flag is currently unused. Update Makefiles and documentation accordingly. llvm-svn: 79990
2009-08-23eliminate the std::ostream forms of the bitcode writing APIs.Chris Lattner1-19/+20
llvm-svn: 79840