1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00
Commit Graph

42 Commits

Author SHA1 Message Date
Jeff Cohen
3fb8f32540 Fix headers
llvm-svn: 27043
2006-03-24 06:07:16 +00:00
Jeff Cohen
1dcffcaf83 Minor corrections.
llvm-svn: 27041
2006-03-24 02:58:54 +00:00
Jeff Cohen
dab30f45d8 Get JIT/Interpreter working on Windows again.
llvm-svn: 27037
2006-03-24 02:53:49 +00:00
Chris Lattner
2aa3f9a6b5 remove the intrinsiclowering hook
llvm-svn: 26970
2006-03-23 05:22:51 +00:00
Chris Lattner
05c3c52edf wrap lines to 80 columns.
Add static JITCtor/InterpCtor fields

llvm-svn: 26945
2006-03-22 06:06:37 +00:00
Chris Lattner
0b736a0d1e Add a helper method for running static ctors/dtors in the module.
llvm-svn: 26619
2006-03-08 18:42:46 +00:00
Reid Spencer
78910545f0 For PR540:
This patch completes the changes for making lli thread-safe. Here's the list
of changes:
* The Support/ThreadSupport* files were removed and replaced with the
  MutexGuard.h file since all ThreadSupport* declared was a Mutex Guard.
  The implementation of MutexGuard.h is now based on sys::Mutex which hides
  its implementation and makes it unnecessary to have the -NoSupport.h and
  -PThreads.h versions of ThreadSupport.

* All places in ExecutionEngine that previously referred to "Mutex" now
  refer to sys::Mutex

* All places in ExecutionEngine that previously referred to "MutexLocker"
  now refer to MutexGuard (this is frivolous but I believe the technically
  correct name for such a class is "Guard" not a "Locker").

These changes passed all of llvm-test. All we need now are some test cases
that actually use multiple threads.

llvm-svn: 22404
2005-07-12 15:51:55 +00:00
Misha Brukman
4ad5efd1a9 Remove trailing whitespace
llvm-svn: 21409
2005-04-21 20:39:54 +00:00
Reid Spencer
f7cd830e8d Add a convenience function for clearing the two global areas.
Patch contributed by Morten Ofsted.

llvm-svn: 18890
2004-12-13 16:22:32 +00:00
Chris Lattner
2dbdf38808 This is the proper code for this method, thanks to Reid for getting CVS working
again.

llvm-svn: 18103
2004-11-22 16:54:54 +00:00
Reid Spencer
7aa1c0b8fb Implement a missing function called by JIT/Emitter.cpp but never defined.
NOTE: Its not clear that this implementation is correct.
CHRIS: Please review this!
llvm-svn: 18101
2004-11-22 12:38:36 +00:00
Misha Brukman
14f6ade91b Add method to delete machine code generated for a Function
llvm-svn: 17600
2004-11-07 23:58:02 +00:00
Alkis Evlogimenos
0c50e0f211 Fixes to make LLVM compile with vc7.1.
Patch contributed by Paolo Invernizzi!

llvm-svn: 16152
2004-09-03 18:19:51 +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
Brian Gaeke
aba4159be8 Represent va_list in interpreter as a (ec-stack-depth . var-arg-index)
pair, and look up varargs in the execution stack every time, instead of
just pushing iterators (which can be invalidated during callFunction())
around.  (union GenericValue now has a "pair of uints" member, to support
this mechanism.) Fixes Bug 234.

llvm-svn: 11845
2004-02-25 23:01:48 +00:00
Chris Lattner
d11cffdfc6 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.

llvm-svn: 10673
2003-12-31 20:19:31 +00:00
Chris Lattner
869549f54b We may now pass IntrinsicLowering implementations into these methods
llvm-svn: 10630
2003-12-28 09:48:17 +00:00
Chris Lattner
7e4c7347ad New method
llvm-svn: 10615
2003-12-26 06:50:15 +00:00
Chris Lattner
4f8b788c30 Rename 'run' to 'runFunction' to emphasize that it is usable to run any
function in a module, not just main

llvm-svn: 10608
2003-12-26 06:12:25 +00:00
Chris Lattner
cfa59c4d89 Cleanups to implement PR135
llvm-svn: 10548
2003-12-20 03:35:50 +00:00
Chris Lattner
8fdf8b8d71 Simple refactorings to prepare for lazy global emission
llvm-svn: 10546
2003-12-20 02:45:16 +00:00
Chris Lattner
f0ded5c697 Doxygenify comments, remove extraneous #include
llvm-svn: 10428
2003-12-12 06:31:42 +00:00
Brian Gaeke
a7db493d85 Use uintptr_t for pointer values in the ExecutionEngine.
llvm-svn: 10425
2003-12-12 05:06:09 +00:00
Chris Lattner
c6d99b5894 add two new virtual functions:
The first returns a function pointer or a stub if it's not already generated
  The second exposes what was previously JIT specific state to general clients

llvm-svn: 10319
2003-12-08 08:22:01 +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
16c6cda9d5 Added LLVM copyright header (for lack of a better term).
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Misha Brukman
99daf743bb If we move the constructors to the .cpp file, we can drop the #include
llvm-svn: 9180
2003-10-16 21:16:21 +00:00
Misha Brukman
2ab03faac1 Enabling incremental bytecode loading in the JIT:
* ExecutionEngine can be constructed from a ModuleProvider
* Alphabetized order of forward-declared classes

llvm-svn: 9123
2003-10-14 21:35:52 +00:00
Brian Gaeke
8e1bb0bcb2 Make getOperandValue and executeCastOperation methods of Interpreter.
This lets us protect a few more ExecutionEngine methods.

llvm-svn: 8367
2003-09-05 18:55:03 +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
b42efb0e33 Zap some more unused static method decls
llvm-svn: 8364
2003-09-05 06:10:50 +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
24b58d4b81 Targets now configure themselves based on the source module, not on the
ad-hoc "Config" flags

llvm-svn: 8134
2003-08-24 19:50:53 +00:00
John Criswell
8bc390da1b The JIT now passes the environment pointer to the main() function when it
starts a program.  This allows the GNU env program to compile and JIT under
LLVM.

llvm-svn: 8022
2003-08-21 21:12:30 +00:00
Brian Gaeke
2e59087317 Deconstify parameter to getPointerToFunction().
llvm-svn: 7822
2003-08-13 18:17:54 +00:00
Chris Lattner
d68c05b473 More cassert inclusion for GCC 3.3
llvm-svn: 7318
2003-07-25 18:06:53 +00:00
Chris Lattner
46f2fc75da Make sure that globals are emitted AFTER the passmanager is set up for the JIT,
because the globals may refer to functions that need to be compiled!

llvm-svn: 6105
2003-05-12 02:14:34 +00:00
Chris Lattner
451890e365 Add new method to check to see if a global is available
llvm-svn: 6058
2003-05-09 03:29:03 +00:00
Chris Lattner
ba9142280a Add a pointersize/endianness safe load routine to match the store routine
llvm-svn: 6042
2003-05-08 16:52:16 +00:00
Chris Lattner
5fe4097f52 Initial checkin of new LLI with JIT compiler
llvm-svn: 5126
2002-12-24 00:01:05 +00:00