Commit Graph

38 Commits

Author SHA1 Message Date
Owen Anderson edb4a70325 Revert the ConstantInt constructors back to their 2.5 forms where possible, thanks to contexts-on-types. More to come.
llvm-svn: 77011
2009-07-24 23:12:02 +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 b6b2530000 Move EVER MORE stuff over to LLVMContext.
llvm-svn: 75703
2009-07-14 23:09:55 +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
Torok Edwin 73312b3f39 Another attempt at fixing PR2975.
Types can have references to eachother, so we can't just call destroy on them.

llvm-svn: 68523
2009-04-07 17:23:02 +00:00
Torok Edwin 839026562c revert r68457, its crashing in make check.
llvm-svn: 68459
2009-04-06 20:57:34 +00:00
Torok Edwin 96dadc3b63 fix (part of) memory leak on shutdown. See PR2975.
llvm-svn: 68457
2009-04-06 20:49:21 +00:00
Oscar Fuentes cac467ef44 CMake: use add_llvm_example for HowToUseJIT.
llvm-svn: 57944
2008-10-22 02:52:59 +00:00
Oscar Fuentes 9e3f7dbeda CMake: Builds all examples. Corrected name of CBackend target.
llvm-svn: 56682
2008-09-26 19:48:03 +00:00
Chris Lattner 0c19df4871 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.

llvm-svn: 55263
2008-08-23 22:23:09 +00:00
Anton Korobeynikov b9fc3a26fc Remove asmprinters from examples by default. This reduces their size by ~5%
llvm-svn: 54890
2008-08-17 13:55:33 +00:00
Chris Lattner 17f7165f84 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.

llvm-svn: 54873
2008-08-17 07:19:36 +00:00
Gabor Greif e1f6e4b21d API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. Legacy interfaces will be in place for some time. (Merge from use-diet branch.)
llvm-svn: 51200
2008-05-16 19:29:10 +00:00
Gabor Greif e9ecc68d8f 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.

llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Chris Lattner bcf65db6f3 remove attributions from examples.
llvm-svn: 45420
2007-12-29 20:37:57 +00:00
Chris Lattner 11cc8b3c14 remove attributions from the rest of the llvm makefiles.
llvm-svn: 45416
2007-12-29 20:11:13 +00:00
Chris Lattner b0f158cfdf rename APInt::toString -> toStringUnsigned for symmetry with toStringSigned()
Add an APSInt::toString() method.

llvm-svn: 41309
2007-08-23 05:15:32 +00:00
Reid Spencer 8a9ae48d53 Adjust for changes in GenericValue type.
llvm-svn: 34969
2007-03-06 17:24:31 +00:00
Chris Lattner e3cf188c1e eliminate vector-related ctors
llvm-svn: 34227
2007-02-13 06:06:26 +00:00
Reid Spencer 727f31b2cd Add a #include to resolve IntegerType class.
llvm-svn: 33384
2007-01-19 22:45:05 +00:00
Chris Lattner b800b3921c add some casts to support a change in the getOrInsertFunction interface
llvm-svn: 32984
2007-01-07 07:40:09 +00:00
Reid Spencer bc013ba367 For PR950:
Convert signed integer types to signless.

llvm-svn: 32786
2006-12-31 05:50:28 +00:00
Reid Spencer e0fc4dfc22 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.

llvm-svn: 31063
2006-10-20 07:07:24 +00:00
Chris Lattner e63072ea0a Use llvm-config to determine what to link in
llvm-svn: 30092
2006-09-04 06:04:03 +00:00
Jeff Cohen e46cbe7a55 Minor corrections.
llvm-svn: 27042
2006-03-24 03:11:31 +00:00
Jeff Cohen 11e26b52b2 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.

llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Chris Lattner eaf625dc5c These are legal for tail calls
llvm-svn: 21723
2005-05-06 05:59:50 +00:00
Misha Brukman 2f72bafb60 Remove trailing whitespace at the end of lines
llvm-svn: 21380
2005-04-20 16:42:34 +00:00
Alkis Evlogimenos 222dcd44ff Stop using abegin and aend.
llvm-svn: 20610
2005-03-15 07:20:55 +00:00
Reid Spencer bb9932c96a Use LLVMLIBS=JIT to get JIT libraries
llvm-svn: 18333
2004-11-29 07:17:18 +00:00
Reid Spencer 7e9e0b0c82 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.

llvm-svn: 17953
2004-11-18 10:03:46 +00:00
Misha Brukman f9898d7189 Use the shared Makefile.JIT for JIT-enablement, which also enables the examples
to have the JIT functioning on more platforms than just x86

llvm-svn: 16993
2004-10-14 19:02:13 +00:00
Reid Spencer 987319d3a7 Correct the file header to reflect the new "examples" home for the file.
llvm-svn: 16295
2004-09-11 20:30:11 +00:00
Reid Spencer 0bb062e55d Add library LLVMsystem.a because the JIT now needs it.
llvm-svn: 16285
2004-09-11 04:29:44 +00:00
Reid Spencer 5b81eea7a5 Moved small examples from /projects/SmallExamples to /examples.
Made the "ModuleMaker" into an example since its just one source file.

llvm-svn: 16003
2004-08-23 19:29:54 +00:00
Reid Spencer b987b7cede Moved the "SmallExamples" out of the /projects directory and into a new
/examples directory. History was maintained. These programs do not need to
be configured but things in /projects must be.

llvm-svn: 16002
2004-08-23 19:28:39 +00:00