Commit Graph

44 Commits

Author SHA1 Message Date
Chandler Carruth 005f27a0d3 Update the examples for the new header file locations.
Sorry for the fallout here, I forgot the examples aren't built by
default any more.

llvm-svn: 171371
2013-01-02 11:56:33 +00:00
Chandler Carruth 605e30e93c Sort the #include lines of the examples/... tree.
llvm-svn: 169249
2012-12-04 10:16:57 +00:00
Micah Villmow 6bf5825b3d Move TargetData to DataLayout.
llvm-svn: 165401
2012-10-08 16:37:04 +00:00
Chandler Carruth aafe0918bc Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.h
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-06-29 12:38:19 +00:00
Evan Cheng 2bb4035707 Move TargetRegistry and TargetSelect from Target to Support where they belong.
These are strictly utilities for registering targets and components.

llvm-svn: 138450
2011-08-24 18:08:43 +00:00
Francois Pichet c5d10504d5 Convert CallInst and InvokeInst APIs to use ArrayRef. For the LLVM examples.
llvm-svn: 135266
2011-07-15 10:59:52 +00:00
John Wiegley 2a0177ba4c fix some examples
llvm-svn: 134933
2011-07-11 22:39:46 +00:00
Jay Foad 52131344a2 Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

llvm-svn: 128537
2011-03-30 11:28:46 +00:00
Jay Foad e0938d8a87 (Almost) always call reserveOperandSpace() on newly created PHINodes.
llvm-svn: 128535
2011-03-30 11:19:20 +00:00
Dan Gohman a230754385 Fix missing includes of "llvm/Analysis/Passes.h" in the tutorials. Thanks
for Arnaud Allard de Grandmaison for preparing a patch.

llvm-svn: 119351
2010-11-16 17:28:22 +00:00
Dan Gohman 56f3a4c761 Update examples and documentation to explicitly add basicaa, now that it's
no longer included by default.

llvm-svn: 119169
2010-11-15 18:41:10 +00:00
Oscar Fuentes 889c1e7d80 Build with RTTI and exceptions disabled. Only in GCC for now.
llvm-svn: 116682
2010-10-17 02:26:16 +00:00
Michael J. Spencer 93c9b2ea93 Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."
This reverts commit r113632

Conflicts:

	cmake/modules/AddLLVM.cmake

llvm-svn: 113819
2010-09-13 23:59:48 +00:00
Michael J. Spencer dc38d36ccb CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.
llvm-svn: 113632
2010-09-10 21:14:25 +00:00
Duncan Sands 41b4a6b36a Convert some tab stops into spaces.
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Chris Lattner 26d7950f8f fix several bugs in the tutorial, patch by Kevin Kelley!
llvm-svn: 106498
2010-06-21 22:51:14 +00:00
Eric Christopher 95f5652e2d Make kaleidoscope use fp add/sub/mul.
Patch by Patrick Flannery!

llvm-svn: 105932
2010-06-14 06:03:16 +00:00
Jeffrey Yasskin 8a30324e51 Make Kaleidoscope not link against the interpreter, since that didn't
work anyway (Interpreter::getPointerToFunction doesn't return a
callable pointer), and improve the error message when an
ExecutionEngine can't be created.

llvm-svn: 95896
2010-02-11 19:15:20 +00:00
Jeffrey Yasskin 091217be6f Kill ModuleProvider and ghost linkage by inverting the relationship between
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
2010-01-27 20:34:15 +00:00
Daniel Dunbar 19c46329dd This example requires RTTI.
llvm-svn: 94398
2010-01-25 00:45:01 +00:00
Erick Tryzelaar 21e83eab3f Add examples for Kaleidoscope chapters 2 through 6.
Conflicts:

	examples/Makefile

llvm-svn: 82574
2009-09-22 21:15:19 +00:00
Erick Tryzelaar 2d8813cfb0 Rename Kaleidoscope to show that it's for Chapter 7 of the tutorial.
llvm-svn: 82573
2009-09-22 21:15:00 +00:00
Erick Tryzelaar 6e2b34bc14 Sync c++ kaleidoscope tutorial with test.
llvm-svn: 82572
2009-09-22 21:14:49 +00:00
Reid Kleckner ab7700479f Allocate the module provider in the Kaleidoscope code on the heap, not the stack, so that it can be properly deleted. Also update the tutorial with the new code. This fixes PR4762, hopefully better than the last time.
llvm-svn: 80138
2009-08-26 20:58:25 +00:00
Reid Kleckner e56676a3cc Fixed double free in Kaleidoscope. Fixes PR4762.
llvm-svn: 79896
2009-08-24 05:42:21 +00:00
Oscar Fuentes 349df2c976 CMake: LLVMConfig assigns LLVMX86 to the `native' component
name. Updated LLVM_LINK_COMPONENTS of Kaleidoscope.

llvm-svn: 79219
2009-08-17 01:41:46 +00:00
Owen Anderson 55f1c09e31 Push LLVMContexts through the IntegerType APIs.
llvm-svn: 78948
2009-08-13 21:58:54 +00:00
Owen Anderson 5a1acd9912 Move a few more APIs back to 2.5 forms. The only remaining ones left to change back are
metadata related, which I'm waiting on to avoid conflicting with Devang.

llvm-svn: 77721
2009-07-31 20:28:14 +00:00
Owen Anderson 4056ca9568 Move types back to the 2.5 API.
llvm-svn: 77516
2009-07-29 22:17:13 +00:00
Owen Anderson 69c464dec4 Move ConstantFP construction back to the 2.5-ish API.
llvm-svn: 77247
2009-07-27 20:59:43 +00:00
Owen Anderson 47db941fd3 Get rid of the Pass+Context magic.
llvm-svn: 76702
2009-07-22 00:24:57 +00:00
Eli Friedman e04169cc21 PR4591: Make sure to initialize the pass manager before using it.
llvm-svn: 76422
2009-07-20 14:50:07 +00:00
Daniel Dunbar c8fb7c61a9 Fix build
llvm-svn: 76366
2009-07-19 08:27:16 +00:00
Xerxes Ranby 68602758e4 Fix: Kaleidoscope link in JIT and Interpreter by including JIT.h and Interpreter.h
llvm-svn: 76363
2009-07-19 08:10:01 +00:00
Reid Kleckner fc8a2d5a83 Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
Also a test commit.

llvm-svn: 76276
2009-07-18 00:42:18 +00:00
Owen Anderson c277dc408b Privatize the ConstantFP table. I'm on a roll!
llvm-svn: 76097
2009-07-16 19:05:41 +00:00
Owen Anderson 53a52215b5 Begin the painful process of tearing apart the rat'ss nest that is 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-13 04:09:18 +00:00
Owen Anderson a771459bb1 Push LLVMContext _back_ through IRBuilder.
llvm-svn: 75040
2009-07-08 20:50:47 +00:00
Owen Anderson 1cf085d558 Hold the LLVMContext by reference rather than by pointer.
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Owen Anderson 6773d388aa Add a pointer to the owning LLVMContext to Module. This requires threading 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
2009-07-01 16:58:40 +00:00
Chris Lattner d24df24527 make sure that JIT examples link in their appropriate target.
llvm-svn: 73613
2009-06-17 16:48:44 +00:00
Chris Lattner 0813c0c34c silence a warning.
llvm-svn: 69117
2009-04-15 00:16:05 +00:00
Bill Wendling 7aba8e30c4 Get rid of some compile warnings.
llvm-svn: 68978
2009-04-13 19:45:05 +00:00
Nick Lewycky 109af6232b Add Kaleidoscope to examples/ so that it gets built regularly and we'll notice
if an API change causes it to be out of date. The code is copied out of
LangImpl7.html.

llvm-svn: 68912
2009-04-12 20:47:23 +00:00