1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
Commit Graph

22 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen
0c88537b3d Revert ExecutionEngine patches, they either failed to build or broke unit tests.
Please ensure the build is clean and tests are passing when recommitting.

llvm-svn: 131044
2011-05-07 03:12:54 +00:00
Dylan Noblesmith
2cfbf76aa1 ExecutionEngine: delete duplicated files
Forgot to `svn rm` these in revisions 131025 / 131029.

llvm-svn: 131030
2011-05-06 22:24:04 +00:00
Dylan Noblesmith
a12e687660 ExecutionEngine: push TargetMachine creation into clients
In particular, into EngineBuilder. This should only impact
the private API between the EE and EB classes, not external
clients, since JITCtor and MCJITCtor are both protected members.

llvm-svn: 131026
2011-05-06 22:06:22 +00:00
Dylan Noblesmith
763e1abfba ExecutionEngine: fix JIT/MCJIT selectTarget() duplication
This prepares for making JITCtor/MCJITCtor take a
TargetMachine* directly from clients like EngineBuilder.

llvm-svn: 131025
2011-05-06 22:05:43 +00:00
Eric Christopher
3c8665787d 80-col fix.
llvm-svn: 129973
2011-04-22 03:07:06 +00:00
Jim Grosbach
222045c063 MCJIT relocation resolution.
llvm-svn: 129445
2011-04-13 15:28:10 +00:00
Jim Grosbach
bf66067333 Refactor MCJIT 32-bit section loading.
Teach 32-bit section loading to use the Memory Manager interface, just like
the 64-bit loading does. Tidy up a few other things here and there.

llvm-svn: 129138
2011-04-08 17:31:24 +00:00
Jim Grosbach
8a1f712b53 RuntimeDyld should use the memory manager API.
Start teaching the runtime Dyld interface to use the memory manager API
for allocating space. Rather than mapping directly into the MachO object,
we extract the payload for each object and copy it into a dedicated buffer
allocated via the memory manager. For now, just do Segment64, so this works
on x86_64, but not yet on ARM.

llvm-svn: 128973
2011-04-06 01:11:05 +00:00
Jim Grosbach
5530392fa3 Remove extraneous 'return'.
llvm-svn: 128959
2011-04-05 23:39:08 +00:00
Jim Grosbach
03cd766c1d Add missing file from r128851.
llvm-svn: 128856
2011-04-04 23:20:40 +00:00
Jim Grosbach
b4624c7d62 Layer the memory manager between the JIT and the runtime Dyld.
The JITMemory manager references LLVM IR constructs directly, while the
runtime Dyld works at a lower level and can handle objects which may not
originate from LLVM IR. Introduce a new layer for the memory manager to
handle the interface between them. For the MCJIT, this layer will be almost
entirely simply a call-through w/ translation between the IR objects and
symbol names.

llvm-svn: 128851
2011-04-04 23:04:39 +00:00
Jim Grosbach
30c2338560 Instantiate a JITMemoryManager for MCJIT Dyld
llvm-svn: 128485
2011-03-29 21:03:05 +00:00
Jim Grosbach
f7d5f8a831 Fix double-free of Module.
The ExecutionEngine constructor already added the module, so there's no
need to call addModule() directly. Doing so causes a double-free of the
Module at program termination.

llvm-svn: 128171
2011-03-23 21:35:02 +00:00
Jim Grosbach
a64f8bf9d5 Make sure to report any errors from the runtime dyld.
llvm-svn: 128160
2011-03-23 19:51:34 +00:00
Jim Grosbach
92735f5775 Add missing file from previous commit.
llvm-svn: 128095
2011-03-22 18:21:14 +00:00
Jim Grosbach
c11fb437b2 Add simple arg passing to MC-JIT and support for exit() call.
Support argument passing simple, common, prototypes directly. More
complicated scenarios will require building up a stub function, which the
MC-JIT isn't set up to handle yet.

Add Intercept.cpp, which is just a copy from ExecutionEngine/JIT for now,
to handle looking looking up external symbol names. This probably more
properly belongs as part of RuntimeDyld. It'll migrate there as things
flesh out more fully.

llvm-svn: 128090
2011-03-22 18:05:27 +00:00
Eric Christopher
7497603688 Fix comment in header.
llvm-svn: 128077
2011-03-22 08:49:56 +00:00
Jim Grosbach
e19f7261d5 Hook up the MCJIT to the RuntimeDyld library.
Lots of cleanup to make the interfaces prettier, use the JITMemoryManager,
handle multiple functions and modules, etc.. This gets far enough that
the MCJIT compiles and runs code, though.

llvm-svn: 128052
2011-03-22 01:06:42 +00:00
Jim Grosbach
89580295e7 Silence a warning.
llvm-svn: 127918
2011-03-18 22:50:49 +00:00
Jim Grosbach
75deb766b9 Beginnings of MC-JIT code generation.
Proof-of-concept code that code-gens a module to an in-memory MachO object.
This will be hooked up to a run-time dynamic linker library (see: llvm-rtdyld
for similarly conceptual work for that part) which will take the compiled
object and link it together with the rest of the system, providing back to the
JIT a table of available symbols which will be used to respond to the
getPointerTo*() queries.

llvm-svn: 127916
2011-03-18 22:48:41 +00:00
Michael J. Spencer
d5ec932c3a Merge System into Support.
llvm-svn: 120298
2010-11-29 18:16:10 +00:00
Daniel Dunbar
aff668a681 MCJIT: Stub out MCJIT implementation, still doesn't do anything useful.
llvm-svn: 119509
2010-11-17 16:06:43 +00:00