1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 04:52:54 +02:00
Commit Graph

72 Commits

Author SHA1 Message Date
Chris Lattner
b2c9317b8d Add a new flag that disables symbol lookup with dlsym when set. This allows
a JIT client to completely control symbol lookup with the LazyFunctionCreator
interface.

llvm-svn: 52335
2008-06-16 17:44:14 +00:00
Nate Begeman
26bb02a23a Fix a couple issues with the JIT and multiple modules:
1. The "JITState" object creates a PassManager with the ModuleProvider that the
   jit is created with.  If the ModuleProvider is removed and deleted, the
   PassManager is invalid.

2. The Global maps in the JIT were not invalidated with a ModuleProvider was 
   removed.  This could lead to a case where the Module would be freed, and a 
   new Module with Globals at the same addresses could return invalid results.

llvm-svn: 51384
2008-05-21 16:34:48 +00:00
Bill Wendling
1866fa680f Remove warnings about unused parameters and shadowed variables.
llvm-svn: 51266
2008-05-19 20:15:12 +00:00
Nicolas Geoffray
c80229e1c7 Cosmetic changes, as suggested by Evan. No functionality changes.
llvm-svn: 49993
2008-04-20 17:44:19 +00:00
Nicolas Geoffray
f005e6fa3b Enable jitting with a known memory size.
llvm-svn: 49924
2008-04-18 20:59:31 +00:00
Nicolas Geoffray
1f3211af01 Correlate stubs with functions in JIT: when emitting a stub, the JIT tells the memory manager which function
the stub will resolve.

llvm-svn: 49814
2008-04-16 20:46:05 +00:00
Chris Lattner
0891662a49 Make ExecutionEngine::updateGlobalMapping return the old mapping.
llvm-svn: 49206
2008-04-04 04:47:41 +00:00
Nicolas Geoffray
72fa78e195 Enable exception handling int JIT
llvm-svn: 47079
2008-02-13 18:39:37 +00:00
Chris Lattner
e0b1ee937a Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +00:00
Dan Gohman
80af3e255d Add explicit keywords, and fix a minor typo that they uncovered.
llvm-svn: 45034
2007-12-14 15:41:34 +00:00
Chris Lattner
a7caf360c9 add a new ExecutionEngine::createJIT which can be used if you only want
to create a JIT.  This lets you specify JIT-specific configuration items
like the JITMemoryManager to use.

llvm-svn: 44647
2007-12-06 01:34:04 +00:00
Chris Lattner
e297cb5408 simplify creation of the interpreter, make ExecutionEngine ctor protected,
delete one ExecutionEngine ctor, minor cleanup.

llvm-svn: 44646
2007-12-06 01:08:09 +00:00
Chris Lattner
fefff1c2f7 improve header guard
llvm-svn: 44641
2007-12-05 23:45:41 +00:00
Chris Lattner
3043dc44cd split the JIT memory management code out from the main JIT logic into its
own JITMemoryManager interface.  There is no functionality change with 
this patch.

llvm-svn: 44640
2007-12-05 23:39:57 +00:00
Chris Lattner
ecea068eb2 add a mechanism for the JIT to invoke a function to lazily create functions as they are referenced.
llvm-svn: 43210
2007-10-22 02:50:12 +00:00
Chris Lattner
712119a5ed Add a convenience method for creating EE's.
llvm-svn: 43206
2007-10-21 22:57:11 +00:00
Devang Patel
b4a9a2e418 Add removeModuleProvider()
llvm-svn: 43002
2007-10-15 19:56:32 +00:00
Dale Johannesen
9ce8a9d633 Implement x86 long double in jit (not really
complete, but common cases work)

llvm-svn: 42043
2007-09-17 18:44:13 +00:00
Reid Spencer
564f193ad0 Make StoreValueToMemory a little more efficient by not copying a
GenericValue to a temporary.

llvm-svn: 34957
2007-03-06 05:02:28 +00:00
Reid Spencer
b5e0b0bc5e Make GenericeValue into a struct with a union instead of just a union. This
allows an APInt value to be constructed. Remove all the native integer types
from the union. These are replaced with the single IntVal of type APInt.

llvm-svn: 34945
2007-03-06 03:01:54 +00:00
Reid Spencer
cdb5aa2805 Make the creation functions take an error string. This will help the
ExecutionEngine report errors on creation (like bytecode stuff) and also
help to get rid of exception handling.

llvm-svn: 34886
2007-03-03 18:18:11 +00:00
Reid Spencer
e96b55e61f Require the destination GlobalValue for LoadValueFromMemory to be passed
in as a parameter instead of returned.

llvm-svn: 34882
2007-03-03 08:35:14 +00:00
Reid Spencer
36fb227e99 Add APIntVal as a possible GenericeValue.
llvm-svn: 34879
2007-03-03 07:36:44 +00:00
Reid Spencer
f3265181e2 Rename BoolTy as Int1Ty. Patch by Sheng Zhou.
llvm-svn: 33076
2007-01-11 18:21:29 +00:00
Reid Spencer
a7eaf62ace For PR950:
Change integer type names for signless integer types

llvm-svn: 32777
2006-12-31 05:23:18 +00:00
Chris Lattner
89e9bb620a allow clients to indicate that they never want lazy compilation.
llvm-svn: 31600
2006-11-09 19:30:47 +00:00
Chris Lattner
cccfd59edf add a way to have multiple modules in a JIT :)
llvm-svn: 29723
2006-08-16 02:53:27 +00:00
Chris Lattner
1eabe5fb58 initial changes to support JIT'ing from multiple module providers, implicitly
linking the program on the fly.

llvm-svn: 29721
2006-08-16 01:24:12 +00:00
Chris Lattner
2a1973c8c2 Move methods out of line so that MutexGuard.h isn't required in the header.
llvm-svn: 28178
2006-05-08 22:00:26 +00:00
Owen Anderson
71bc529dfa Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759.

llvm-svn: 28074
2006-05-03 01:29:57 +00:00
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