Commit Graph

273 Commits

Author SHA1 Message Date
Chris Lattner
b515d75856 eliminate the std::ostream forms of the bitcode writing APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79840 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-23 07:49:08 +00:00
Oscar Fuentes
22624b1d8e CMake: LLVMConfig assigns LLVMX86 to the `native' component
name. Updated LLVM_LINK_COMPONENTS of Kaleidoscope.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79219 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 01:41:46 +00:00
Owen Anderson
1d0be15f89 Push LLVMContexts through the IntegerType APIs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-13 21:58:54 +00:00
Owen Anderson
a7235ea724 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-31 20:28:14 +00:00
Owen Anderson
debcb01b0f Move types back to the 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-29 22:17:13 +00:00
Owen Anderson
1fd7096407 Change ConstantArray to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-28 18:32:17 +00:00
Owen Anderson
6f83c9c6ef Move ConstantFP construction back to the 2.5-ish API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-27 20:59:43 +00:00
Owen Anderson
eed707b1e6 Revert the ConstantInt constructors back to their 2.5 forms where possible, 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
2009-07-24 23:12:02 +00:00
Owen Anderson
e922c02019 Get rid of the Pass+Context magic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-22 00:24:57 +00:00
Eli Friedman
8e9b17198a PR4591: Make sure to initialize the pass manager before using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76422 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-20 14:50:07 +00:00
Daniel Dunbar
e687151e03 Fix build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76366 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 08:27:16 +00:00
Xerxes Ranby
6ce6daae38 Fix: Kaleidoscope link in JIT and Interpreter by including JIT.h and Interpreter.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76363 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-19 08:10:01 +00:00
Reid Kleckner
4b1511b027 Add EngineBuilder to ExecutionEngine in favor of the five optional argument EE::create().
Also a test commit.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-18 00:42:18 +00:00
Owen Anderson
914e50c841 Privatize the ConstantFP table. I'm on a roll!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76097 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 19:05:41 +00:00
Owen Anderson
001dbfebcb Move the ConstantInt uniquing table into LLVMContextImpl. This exposed a number of issues in
our current context-passing stuff, which is also fixed here


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76089 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-16 18:04:31 +00:00
Owen Anderson
9adc0abad3 Move EVER MORE stuff over to LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-14 23:09:55 +00:00
Owen Anderson
0a5372ed3e 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75445 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-13 04:09:18 +00:00
Owen Anderson
333c400965 This started as a small change, I swear. Unfortunately, lots of things call the [I|F]CmpInst constructors. Who knew!?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75200 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-09 23:48:35 +00:00
Owen Anderson
d1fbd14294 Push LLVMContext _back_ through IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75040 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 20:50:47 +00:00
Owen Anderson
e9b11b4313 Switch GlobalVariable ctors to a sane API, where *either* a context or a module is required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75025 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 19:03:57 +00:00
Owen Anderson
3d29df3e8a Push LLVMContext through GlobalVariables and IRBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74985 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-08 01:26:06 +00:00
Owen Anderson
4434ed44c4 Make the use of const with respect to LLVMContext sane. Hopefully this is 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
2009-07-01 23:13:44 +00:00
Owen Anderson
31895e7359 Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 21:22:36 +00:00
Owen Anderson
8b477ed579 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74614 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 16:58:40 +00:00
Chris Lattner
0fd38069cb improve the APIs for creating struct and function types with no arguments/elements
to not have to create a temporary vector (in the API at least).  Patch by Jay Foad!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74584 91177308-0d34-0410-b5e6-96231b3b80d8
2009-07-01 04:13:31 +00:00
Chris Lattner
da06288aeb make sure that JIT examples link in their appropriate target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73613 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-17 16:48:44 +00:00
Chris Lattner
d25bff6d52 silence a warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@69117 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-15 00:16:05 +00:00
Bill Wendling
7126702edf Get rid of some compile warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68978 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-13 19:45:05 +00:00
Nick Lewycky
9f85634bd2 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68912 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-12 20:47:23 +00:00
Torok Edwin
eb55f3ea3c Another attempt at fixing PR2975.
Types can have references to eachother, so we can't just call destroy on them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68523 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-07 17:23:02 +00:00
Torok Edwin
5ce1b11412 revert r68457, its crashing in make check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68459 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-06 20:57:34 +00:00
Torok Edwin
59d5f83b32 fix (part of) memory leak on shutdown. See PR2975.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@68457 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-06 20:49:21 +00:00
Chris Lattner
824b958e6f reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an
arbitrary integer width for the count.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59823 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 16:42:48 +00:00
Bill Wendling
dc770929cb Revert r59802. It was breaking the build of llvm-gcc:
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
2008-11-21 09:09:41 +00:00
Sanjiv Gupta
219ab405e6 Make mem[cpy,move,set] intrinsics overloaded.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59802 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-21 07:49:09 +00:00
Oscar Fuentes
57bd83be19 CMake: use add_llvm_example for HowToUseJIT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57944 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-22 02:52:59 +00:00
Oscar Fuentes
dbc2e856fc CMake: Builds all examples. Corrected name of CBackend target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56682 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-26 19:48:03 +00:00
Oscar Fuentes
3d01fc7de8 Initial support for the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56419 91177308-0d34-0410-b5e6-96231b3b80d8
2008-09-22 01:08:49 +00:00
Chris Lattner
944fac71e0 Switch the asmprinter (.ll) and all the stuff it requires over to
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
2008-08-23 22:23:09 +00:00
Chris Lattner
ef5dc366e7 use proper namespace qualifications
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55259 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-23 22:00:15 +00:00
Anton Korobeynikov
c40c8b333d Remove asmprinters from examples by default. This reduces their size by ~5%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54890 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-17 13:55:33 +00:00
Chris Lattner
fad86b003a Rework the routines that convert AP[S]Int into a string. Now, instead of
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
2008-08-17 07:19:36 +00:00
Eric Christopher
7a61d701c0 Have IRBuilder take a template argument on whether or not to preserve
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
2008-08-08 19:39:37 +00:00
Gabor Greif
7cbd8a3e92 API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. 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
2008-05-16 19:29:10 +00:00
Gabor Greif
b1dbcd886a Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-15 10:04:30 +00:00
Duncan Sands
89f6d88db3 Merge LLVMBuilder and FoldingBuilder, calling
the result IRBuilder.  Patch by Dominic Hamon.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49604 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-13 06:22:09 +00:00
Chris Lattner
7098772436 silence warning when assertions are disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49371 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-08 05:49:09 +00:00
Duncan Sands
e2c4304654 Use Intrinsic::getDeclaration in more places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49338 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-07 13:45:04 +00:00
Gabor Greif
051a950000 API changes for class Use size reduction, wave 1.
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
2008-04-06 20:25:17 +00:00
Chris Lattner
7520fcd7a5 Fix an incorrect comment, PR2147.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48323 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-13 03:29:42 +00:00
Chris Lattner
fc001bbfc3 remove attributions from examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45420 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:37:57 +00:00
Chris Lattner
57360d1f1c remove attributions from the rest of the llvm makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45416 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29 20:11:13 +00:00
Christopher Lamb
43ad6b3e0d Change the PointerType api for creating pointer types. The old functionality 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
2007-12-17 01:12:55 +00:00
Chris Lattner
bef8e0b0a7 add a new BF->LLVM translator, contributed by Sterling Stein.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41881 91177308-0d34-0410-b5e6-96231b3b80d8
2007-09-12 18:24:00 +00:00
Chris Lattner
9132a2b818 rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()
Add an APSInt::toString() method.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41309 91177308-0d34-0410-b5e6-96231b3b80d8
2007-08-23 05:15:32 +00:00
Gabor Greif
a99be51bf5 Here is the bulk of the sanitizing.
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
2007-07-05 17:07:56 +00:00
Owen Anderson
241c3dac3f Remove BFtoLLVM. It was old, and a poor example because it didn't use best 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
2007-07-03 21:36:47 +00:00
Chris Lattner
4bcca0f2ac switch this to bitcode instead of bytecode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36867 91177308-0d34-0410-b5e6-96231b3b80d8
2007-05-06 09:29:13 +00:00
Reid Spencer
c20c6c346c Revert last patch. The examples build now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34970 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 17:26:14 +00:00
Reid Spencer
34bd70de3c Adjust for changes in GenericValue type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34969 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 17:24:31 +00:00
Chris Lattner
3c2319e245 temporarily disable this until Reid has a chance to fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34962 91177308-0d34-0410-b5e6-96231b3b80d8
2007-03-06 07:30:03 +00:00
Chris Lattner
680f2f016e eliminate vector-related ctors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34227 91177308-0d34-0410-b5e6-96231b3b80d8
2007-02-13 06:06:26 +00:00
Reid Spencer
56427031f6 Fix a #include to resolve IntegerType class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33385 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 22:45:50 +00:00
Reid Spencer
bc0895a596 Add a #include to resolve IntegerType class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33384 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-19 22:45:05 +00:00
Chris Lattner
6a98754ebb add some casts to support a change in the getOrInsertFunction interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32984 91177308-0d34-0410-b5e6-96231b3b80d8
2007-01-07 07:40:09 +00:00
Reid Spencer
db8d2bed6a For PR950:
Convert signed integer types to signless.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32786 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-31 05:50:28 +00:00
Reid Spencer
e4d87aa2de For PR950:
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
2006-12-23 06:05:41 +00:00
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Reid Spencer
1000b73397 For PR1019:
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
2006-12-01 00:37:14 +00:00
Bill Wendling
68fe61d6a1 Replacing std::iostreams with llvm iostreams. Some of these changes involve
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
2006-11-29 00:19:40 +00:00
Reid Spencer
b83eb6447b For PR950:
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
2006-10-20 07:07:24 +00:00
Chris Lattner
885e3cb7f3 Use llvm-config to determine what to link in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30092 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-04 06:04:03 +00:00
Chris Lattner
4645cdca8a WriteBytecodeToFile actually can't throw.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29397 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 22:08:23 +00:00
Chris Lattner
e197821e1c WriteBytecodeToFile throws, so this needs EH info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29392 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 21:55:54 +00:00
Reid Spencer
18c8b49e7d Use archive libraries instead of object files for VMCore, BCReader,
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
2006-06-01 01:30:27 +00:00
Reid Spencer
b756c79d12 Support correct build:
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
2006-06-01 01:09:43 +00:00
Reid Spencer
7dbb2d6f16 Correct some grammar and describe current reality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28532 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:31:47 +00:00
Chris Lattner
b461131c99 Catch a potentially thrown exception.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28295 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-14 19:08:39 +00:00
Jeff Cohen
afebb44928 Minor corrections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27042 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-24 03:11:31 +00:00
Chris Lattner
fb882ce243 Upgrade this to use the new intrinsic names
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26483 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 01:31:12 +00:00
Jeff Cohen
66c5fd6c53 When a function takes a variable number of pointer arguments, with a zero
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
2005-10-23 04:37:20 +00:00
Reid Spencer
0a262ba7c3 For PR616:
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
2005-08-24 10:07:20 +00:00
Jeff Cohen
00b16889ab Eliminate all remaining tabs and trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22523 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-27 06:12:32 +00:00
Reid Spencer
6fb0d735f0 Get rid of warnings on Alpha
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22428 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-13 23:20:24 +00:00
Reid Spencer
6a60d18018 Correct the file title.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22414 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 22:00:29 +00:00
Reid Spencer
e8cdc8b3a3 For PR418:
Add an example program that utilizes multiple threads in the JIT to process
work. This was used by Evan Jones as the original test case for ensuring
that the ExecutionEngine was thread safe.

Original source by Evan Jones (adapted from other LLVM JIT examples) and
made LLVM style compliant by Reid Spencer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22411 91177308-0d34-0410-b5e6-96231b3b80d8
2005-07-12 21:51:33 +00:00
Chris Lattner
f6b5c1abce Don't forget these are calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21730 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 06:21:59 +00:00
Chris Lattner
47968e4dfd These are legal for tail calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21723 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-06 05:59:50 +00:00
Misha Brukman
59f6449cff Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21433 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 03:18:56 +00:00
Misha Brukman
237cef4b0b Remove trailing whitespace at the end of lines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21380 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-20 16:42:34 +00:00
Chris Lattner
7db7fa0828 add missing copyright header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20614 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 15:46:23 +00:00
Alkis Evlogimenos
1d9f262b9d Stop using abegin and aend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20610 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 07:20:55 +00:00
Alkis Evlogimenos
dadf88123f Stop using abegin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20609 91177308-0d34-0410-b5e6-96231b3b80d8
2005-03-15 07:12:30 +00:00
Reid Spencer
8f631784f7 Use LLVMLIBS=JIT to get JIT libraries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18333 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-29 07:17:18 +00:00
Reid Spencer
bf714df962 Add LLVMbzip2 library, now required.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18255 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-25 20:22:06 +00:00
Reid Spencer
815cbcf0f1 Fix PR456:\
Tools and libraries will be built into $(BUILD_OBJ_ROOT)/$(BuildMode)/bin and \
$(BUILD_OBJ_ROOT)/$(BuildMode)/lib, respectively. Furthermore, the example \
programs will go in $(BUILD_OBJ_ROOT)/$(BuildMode)/examples to keep them \
separate from the tools and hopefully out of the PATH. Install targets \
have not changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17953 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-18 10:03:46 +00:00
Misha Brukman
7cf540bba0 Clean up code layout, delete extra blank line, say fibonacci' instead of foo'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17478 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-05 04:11:40 +00:00
Chris Lattner
3c7d7ee761 Fix typeo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17466 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-04 05:00:18 +00:00
Chris Lattner
38f024daea Cleanup this example, simplifying it and making it conform to LLVM coding
standards


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17459 91177308-0d34-0410-b5e6-96231b3b80d8
2004-11-03 21:43:03 +00:00
Reid Spencer
6cb21d443e Change Library Names Not To Conflict With Others When Installed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17286 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-27 23:18:45 +00:00
Misha Brukman
a9504af512 Use the shared Makefile.JIT for JIT-enablement, which also enables the examples
to have the JIT functioning on more platforms than just x86


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16993 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 19:02:13 +00:00
Brian Gaeke
0c50bc4cc2 Build BFtoLLVM example front-end by default
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16719 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-05 18:05:53 +00:00
Brian Gaeke
ddc1aaad5c Add BFtoLLVM example front end
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16714 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-05 18:05:25 +00:00
Reid Spencer
66e7cd0eea Correct the file header to reflect the new "examples" home for the file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16295 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-11 20:30:11 +00:00
Reid Spencer
86e5aef1ce Add library LLVMsystem.a because the JIT now needs it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16285 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-11 04:29:44 +00:00
Reid Spencer
3a168a7d68 Moved small examples from /projects/SmallExamples to /examples.
Made the "ModuleMaker" into an example since its just one source file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16003 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-23 19:29:54 +00:00
Reid Spencer
c21214ac59 Fix Title line
Make the "DIRS" option descend any directory with a Makefile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16001 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-23 18:06:31 +00:00
Chris Lattner
1c54afa431 Make people explicitly add dirs to this. Remove ModuleMaker as it currently
does not build (it must be configured before it will work)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15936 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-20 01:11:16 +00:00
Reid Spencer
e784fa40c5 Add the fibonacci example provided by Valery Khamenya.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15924 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-19 20:10:04 +00:00
Reid Spencer
f3b4755aa0 Make the SmallExamples programs compile in their new home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15923 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-19 20:09:14 +00:00
Chris Lattner
95f114c5a9 Switch to using the JIT now that it can directly call zeroarg functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15795 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 23:31:57 +00:00
Chris Lattner
e8bf58c170 Simplify code, make it print the constructed module before it is run.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15792 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-15 23:21:54 +00:00
Reid Spencer
54706d6801 Fix a copy & paste error .. correct the description of the program.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15623 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 19:18:51 +00:00
Reid Spencer
26a4ba73d3 Adding a simple example of how to use the JIT.
Contributed by Valery A. Khamenya. THANKS, Valery!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15622 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 19:14:36 +00:00
Reid Spencer
321f8319da Add #include <iostream> since Value.h doesn't include it any more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14624 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 12:22:14 +00:00
John Criswell
bf6b5d0dbd Configure script for ModuleMaker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10216 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 20:02:07 +00:00
John Criswell
02af846a91 Auto-confed ModuleMaker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10215 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 19:59:59 +00:00
John Criswell
27bf6376da Auto-conf'ed the ModuleMaker code.
Moved Makefile.common to Makefile.common.in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10214 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-25 19:59:21 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
John Criswell
e26ba9fb3f Added LLVM copyrights to Makefiles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9313 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 22:28:01 +00:00
John Criswell
a37fefd064 Checkin of autoconf-style object root.
Modified Makefiles to use the new Makefile setup in LLVM.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8380 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-06 15:03:24 +00:00
Chris Lattner
9534acbf77 Initial checkin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8039 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 22:33:59 +00:00
Chris Lattner
8ca0eebe4e Initial checkin of ModuleMaker project
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8036 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-21 22:29:52 +00:00