Chris Lattner
5f2a0d17ab
Fix a really horrible problem that causes the JIT to miscompile any program
...
that use 64-bit integers on 32-bit hosts.
llvm-svn: 21886
2005-05-12 06:01:28 +00:00
Misha Brukman
774e55c446
Remove trailing whitespace
...
llvm-svn: 21420
2005-04-21 22:36:52 +00:00
Chris Lattner
4b688a1c70
This mega patch converts us from using Function::a{iterator|begin|end} to
...
using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*.
This patch is contributed by Gabor Greif, thanks!
llvm-svn: 20597
2005-03-15 04:54:21 +00:00
Chris Lattner
b632a13aa7
Use const iterators where possible. Patch by Evan Jones!
...
llvm-svn: 20354
2005-02-27 19:06:10 +00:00
Chris Lattner
11f76e4975
This is no longer needed. Global variables with undef initializers can be
...
initialized to anything, including garbage.
llvm-svn: 20010
2005-02-02 20:50:50 +00:00
Chris Lattner
ed92fd75e8
Silence VS warnings.
...
llvm-svn: 19391
2005-01-08 20:13:19 +00:00
Reid Spencer
74b17227a5
Use System/DynamicLibrary instead of Support/DynamicLinker
...
llvm-svn: 18357
2004-11-29 14:11:29 +00:00
Chris Lattner
0169ce5e9e
This is a horrible hack to work around libstdc++ bugs :(
...
llvm-svn: 17988
2004-11-19 08:44:07 +00:00
Chris Lattner
0dbd792854
Fix the interpreter crash that Michael McCracken found
...
llvm-svn: 17239
2004-10-26 05:35:14 +00:00
Chris Lattner
8d479b62ad
Add support for undef
...
llvm-svn: 17055
2004-10-16 18:19:26 +00:00
Reid Spencer
c4abcbefb1
Changes For Bug 352
...
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Chris Lattner
923c3d3594
Don't pass too many arguments into runFunction
...
llvm-svn: 15801
2004-08-16 01:05:35 +00:00
Alkis Evlogimenos
f853362a44
Stop using getValues().
...
llvm-svn: 15487
2004-08-04 08:44:43 +00:00
Reid Spencer
b6c894409b
bug 122:
...
- Replace ConstantPointerRef usage with GlobalValue usage
- Correct isa<Constant> for GlobalValue subclass
llvm-svn: 14951
2004-07-18 00:41:27 +00:00
Chris Lattner
94212f7102
Fixes for PR341
...
llvm-svn: 14847
2004-07-15 02:51:31 +00:00
Chris Lattner
6029e3234e
Make add constantexprs work with all types, fixing the regressions from last night
...
llvm-svn: 14760
2004-07-11 08:01:11 +00:00
Reid Spencer
ff9f74082f
Fix for bug 391.
...
Improve exeception handling around bcreader invocations.
llvm-svn: 14674
2004-07-07 21:01:38 +00:00
Chris Lattner
8a9f1ebd22
Move the IntrinsicLowering header into the CodeGen directory
...
llvm-svn: 14265
2004-06-20 07:46:18 +00:00
Chris Lattner
0cd29ae2cd
Rename Type::PrimitiveID to TypeId and ::getPrimitiveID() to ::getTypeID()
...
llvm-svn: 14201
2004-06-17 18:19:28 +00:00
Chris Lattner
d646e15d1a
Remove long unused #includes
...
llvm-svn: 13857
2004-05-27 21:25:44 +00:00
Chris Lattner
686a74c7ac
Fix PR296: [execution engines] Unhandled cast constant expression
...
llvm-svn: 12435
2004-03-16 08:38:56 +00:00
Chris Lattner
2679a58a61
Make the JIT zero out globals with memset instead of an element at a time. This
...
should speed it up a bit on a lot of programs
llvm-svn: 11472
2004-02-15 05:54:06 +00:00
Chris Lattner
ecaa4c58e2
Print out all globals as they are emitted, not just those emitted from
...
emitGlobals
llvm-svn: 11191
2004-02-08 19:33:23 +00:00
Chris Lattner
becd58c6cb
Print an error message if we can't materialize the bytecode file
...
llvm-svn: 11043
2004-02-01 01:07:25 +00:00
Chris Lattner
46fdc8ce43
Add new ExecutionEngine::getGlobalValueAtAddress method, which can efficiently
...
turn a memory address back into the LLVM global object that starts at that
address. Note that this won't cause any additional datastructures to be built
for clients of the EE that don't need this information.
Also modified some code to not access the GlobalAddress map directly.
llvm-svn: 10674
2003-12-31 20:21:04 +00:00
Chris Lattner
44f1ab7c2f
Pass around IntrinsicLowering instances as appropriate.
...
Reimplement the Interpreters implementation of va_* to be more direct.
llvm-svn: 10627
2003-12-28 09:44:37 +00:00
Chris Lattner
3593bb9dd6
Factor code out of LLI
...
llvm-svn: 10616
2003-12-26 06:50:30 +00:00
Chris Lattner
edda0e5d4f
Implement PR135, lazy emission of global variables
...
llvm-svn: 10549
2003-12-20 03:36:47 +00:00
Chris Lattner
214005e5fb
Simple refactorings to prepare for lazy global emission
...
Also, add a stat for the number of globals emitted
llvm-svn: 10547
2003-12-20 02:45:37 +00:00
Chris Lattner
32658dbaf3
Update for changes in the JIT
...
llvm-svn: 10543
2003-12-20 01:45:17 +00:00
Chris Lattner
23328c5f69
Use the new method, though noone currently implements it any better than before
...
llvm-svn: 10320
2003-12-08 08:22:48 +00:00
Chris Lattner
8c11d31e35
Fine grainify namespaceification
...
llvm-svn: 10093
2003-11-19 21:08:57 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Brian Gaeke
d857892674
ExecutionEngine::create no longer takes a TraceMode argument.
...
llvm-svn: 9488
2003-10-24 19:58:38 +00:00
John Criswell
b402729b30
Added LLVM project notice to the top of every C++ source file.
...
Header files will be on the way.
llvm-svn: 9298
2003-10-20 19:43:21 +00:00
Misha Brukman
546d6e6764
Don't release the Module, as that invalidates the Module* within the
...
ModuleProvider, which has bad consequences in lli::callAsMain() which tries to
access that same Module*.
llvm-svn: 9205
2003-10-17 18:31:59 +00:00
Misha Brukman
45a9016e1d
* Reorder includes as per the style guide
...
* Move the constructors from .h file here
* Document ExecutionEngine::create()
* Catch exception possibly thrown by ModuleProvider::releaseModule()
llvm-svn: 9181
2003-10-16 21:18:05 +00:00
Misha Brukman
cc1cfd01ed
Enabling incremental bytecode loading in the JIT:
...
* ExecutionEngine and VM can be constructed using a ModuleProvider.
llvm-svn: 9124
2003-10-14 21:36:31 +00:00
Misha Brukman
e7d07e3cf1
* Tabs to spaces
...
* Doxygenified function comments
* Added FIXMEs to solicit documentation for other functions
llvm-svn: 9022
2003-10-10 17:45:12 +00:00
Brian Gaeke
30e2817dc5
Change to use GetAddressOfSymbol instead of dlsym.
...
llvm-svn: 9012
2003-10-10 17:02:42 +00:00
Chris Lattner
6c68b828f6
Reorder #includes to follow LLVM conventions
...
llvm-svn: 8375
2003-09-05 20:08:15 +00:00
Brian Gaeke
ba6d0a6759
ExecutionEngine.h, GenericValue.h --> include/llvm/ExecutionEngine/
...
Build ExecutionEngine as library.
llvm-svn: 8370
2003-09-05 19:39:22 +00:00
Brian Gaeke
e157a77485
Make CreateArgv part of lli rather than part of ExecutionEngine.
...
Switch Interpreter and JIT's "run" methods to take a Function and a vector of
GenericValues.
Move (almost all of) the stuff that constructs a canonical call to main()
into lli (new methods "callAsMain", "makeStringVector").
Nuke getCurrentExecutablePath(), enableTracing(), getCurrentFunction(),
isStopped(), and many dead decls from interpreter.
Add linux strdup() support to interpreter.
Make interpreter's atexit handler runner and JIT's runAtExitHandlers() look
more alike, in preparation for refactoring.
atexit() is spelled "atexit", not "at_exit".
llvm-svn: 8366
2003-09-05 18:42:01 +00:00
Brian Gaeke
0fdcd57402
Move EE dtor where it belongs
...
llvm-svn: 8345
2003-09-04 22:57:27 +00:00
Brian Gaeke
6d7d9f9cd9
Interpreter cleanups:
...
Get rid of support for DebugMode (make it always off).
Mung some comments.
Get rid of interpreter's PROFILE_STRUCTURE_FIELDS and PerformExitStuff
which have been disabled forever.
Get rid of -abort-on-exception (make it always on).
Get rid of user interaction stuff (debug mode innards).
Simplify Interpreter's callMainFunction().
llvm-svn: 8344
2003-09-04 22:21:24 +00:00
Brian Gaeke
cec978e0ed
ExecutionEngine.cpp: Move execution engine creation stuff into a new
...
static method here.
Remove some extra blank lines.
ExecutionEngine.h: Add its prototype.
lli.cpp: Call it.
Make creation method for each type of EE into a static method of its
own subclass.
Interpreter/Interpreter.cpp: ExecutionEngine::createInterpreter -->
Interpreter::create
Interpreter/Interpreter.h: Likewise.
JIT/JIT.cpp: ExecutionEngine::createJIT --> VM::create
JIT/VM.h: Likewise.
llvm-svn: 8343
2003-09-03 20:34:19 +00:00
Chris Lattner
94184ddd7b
Consult the target data, not the module, about how large the current pointer
...
size is. This ensures that if the module has no specified pointer size that
things will work correctly.
llvm-svn: 8136
2003-08-24 19:55:26 +00:00
Chris Lattner
688dd40912
Add preliminary support for "any" pointersize/endianness. This will need
...
to change soon though.
llvm-svn: 8123
2003-08-24 14:02:47 +00:00
Chris Lattner
785885a8c0
no really, implement it!
...
llvm-svn: 7955
2003-08-18 17:33:15 +00:00
Chris Lattner
d737232814
Add support for casting any pointer to any integer type
...
llvm-svn: 7953
2003-08-18 17:23:40 +00:00