Anton Korobeynikov
436f708112
Move SLEB/ULEB size calculation routines from AsmPrinter to TargetAsmInfo. This makes JIT asmprinter-free.
...
llvm-svn: 54843
2008-08-16 12:57:46 +00:00
Dale Johannesen
718fcee02d
Some fixes for x86-64 JIT. Make it use small code
...
model, except for external calls; this makes
addressing modes PC-relative. Incomplete.
The assertion at the top of Emitter::runOnMachineFunction
was obviously bogus (always true) so I removed it.
If someone knows what the correct test should be to cover
all the various targets, please fix.
llvm-svn: 54656
2008-08-11 23:46:25 +00:00
Evan Cheng
054bbb0dd8
Add new parameter Fast to createJIT to enable the fast codegen path.
...
llvm-svn: 54523
2008-08-08 08:11:34 +00:00
Dale Johannesen
a4de0fa539
Rewrite JIT handling of GlobalVariables so they
...
are allocated in the same buffer as the code,
jump tables, etc.
The default JIT memory manager does not handle buffer
overflow well. I didn't introduce this and I'm not
attempting to fix it here, but it is more likely to
be hit now since we're putting more stuff in the
buffer. This affects one test that I know of so far,
MultiSource/Benchmarks/NPB-serial/is.
llvm-svn: 54442
2008-08-07 01:30:15 +00:00
Dan Gohman
1238bf634b
Trim #includes.
...
llvm-svn: 54350
2008-08-05 15:32:23 +00:00
Evan Cheng
10d4254f45
Fix for PR2578. Do not split off a block whose size is less than FreeRangeHeader::getMinBlockSize(). Patch by Damien.
...
llvm-svn: 54152
2008-07-29 07:38:32 +00:00
Dan Gohman
6c9a53ffac
Use empty() instead of size().
...
llvm-svn: 53178
2008-07-07 17:52:43 +00:00
Dan Gohman
27986beb10
Correct a comment.
...
llvm-svn: 53064
2008-07-03 00:51:05 +00:00
Dan Gohman
83c1b4cede
Prune a few dependencies on MachineFunction.h.
...
llvm-svn: 52976
2008-07-01 18:15:35 +00:00
Dan Gohman
c8097f8c8c
Split ISD::LABEL into ISD::DBG_LABEL and ISD::EH_LABEL, eliminating
...
the need for a flavor operand, and add a new SDNode subclass,
LabelSDNode, for use with them to eliminate the need for a label id
operand.
Change instruction selection to let these label nodes through
unmodified instead of creating copies of them. Teach the MachineInstr
emitter how to emit a MachineInstr directly from an ISD label node.
This avoids the need for allocating SDNodes for the label id and
flavor value, as well as SDNodes for each of the post-isel label,
label id, and label flavor.
llvm-svn: 52943
2008-07-01 00:05:16 +00:00
Chris Lattner
9c5a1a7da3
Implement JIT support for global aliases, patch by David Chisnall!
...
llvm-svn: 52738
2008-06-25 20:21:35 +00:00
Chris Lattner
ef1aa7c9db
Switch the PPC backend and target-independent JIT to use the libsystem
...
InvalidateInstructionCache method instead of calling through
a hook on the JIT. This is a host feature, not a target feature.
llvm-svn: 52734
2008-06-25 17:18:44 +00:00
Dan Gohman
7460588026
Use back() instead of [size()-1].
...
llvm-svn: 52600
2008-06-21 22:00:54 +00:00
Dan Gohman
9b9cf4cf9c
Use static_cast instead of reinterpret_cast for casting void*.
...
llvm-svn: 52592
2008-06-21 20:17:03 +00:00
Anton Korobeynikov
5b04f6d658
Provide generic hooks for icache invalidation. Add PPC implementation.
...
Patch by Gary Benson!
llvm-svn: 52418
2008-06-17 17:30:05 +00:00
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
Dan Gohman
c877140168
Add #includes to make some dependencies explicit.
...
llvm-svn: 51496
2008-05-23 20:40:06 +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
Nate Begeman
f924b6e0d9
Fix a backwards check in the JIT symbol table code
...
llvm-svn: 51229
2008-05-18 19:09:10 +00:00
Evan Cheng
d86d86bbdf
Disable JIT symbol table for now.
...
llvm-svn: 51152
2008-05-15 17:31:35 +00:00
Gabor Greif
48ffb6c7dc
Fix a bunch of 80col violations that arose from the Create API change. Tweak makefile targets to find these better.
...
llvm-svn: 51143
2008-05-15 10:04:30 +00:00
Dan Gohman
bab18cae46
Clean up the use of static and anonymous namespaces. This turned up
...
several things that were neither in an anonymous namespace nor static
but not intended to be global.
llvm-svn: 51017
2008-05-13 00:00:25 +00:00
Nicolas Geoffray
aaa764cf3a
Be pessimistic in computing the buffer size when aligning.
...
llvm-svn: 50008
2008-04-20 23:39:44 +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
5fdce98ebd
Do not hold the JIT lock when materializing a function and verify if the
...
function has already been codegen'd. This is required by the Java class loading
mechanism which executes Java code when materializing a function.
llvm-svn: 49988
2008-04-20 08:33:02 +00:00
Chris Lattner
f390d62b7f
Switch to using Simplified ConstantFP::get API.
...
llvm-svn: 49977
2008-04-20 00:41:09 +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
e7147e7478
Fix some serious logic errors that broke the jit on darwin/x86-64.
...
llvm-svn: 49606
2008-04-13 07:04:56 +00:00
Evan Cheng
37eb9de565
Add debugging code.
...
llvm-svn: 49566
2008-04-12 00:22:01 +00:00
Chris Lattner
08453a5234
Reenable JIT symbol table.
...
llvm-svn: 49548
2008-04-11 18:11:56 +00:00
Gabor Greif
6c6b8a57f3
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
4cc62604a1
disable this for now.
...
llvm-svn: 49248
2008-04-05 04:12:01 +00:00
Chris Lattner
066a1dea6c
Provide an initial cut at exposing JIT compiled symbols to performance
...
tools. This is currently only enabled on the mac, but could easily be
supported by other hosts that are interested.
llvm-svn: 49207
2008-04-04 05:51:42 +00:00
Dan Gohman
2b96ce84aa
Add explicit keywords.
...
llvm-svn: 48801
2008-03-25 22:06:05 +00:00
Anton Korobeynikov
38e7967f86
Register EH frames emitted in JIT when using gcc unwinding runtime
...
llvm-svn: 48688
2008-03-22 08:53:09 +00:00
Chris Lattner
273b161c3e
fix 80 col violations
...
llvm-svn: 48019
2008-03-07 20:05:43 +00:00
Anton Korobeynikov
0c5e186924
Unbreak build with gcc 4.3: provide missed includes and silence most annoying warnings.
...
llvm-svn: 47367
2008-02-20 11:08:44 +00:00
Nicolas Geoffray
72fa78e195
Enable exception handling int JIT
...
llvm-svn: 47079
2008-02-13 18:39:37 +00:00
Duncan Sands
390baa691d
Use getPreferredAlignmentLog or getPreferredAlignment
...
to get the alignment of global variables, rather than
using hand-made versions.
llvm-svn: 46495
2008-01-29 06:23:44 +00:00
Chris Lattner
00ead854ef
JITEmitter.cpp was trying to sync the icache for function stubs, but
...
was actually passing a completely incorrect size to sys_icache_invalidate.
Instead of having the JITEmitter do this (which doesn't have the correct
size), just make the target sync its own stubs.
llvm-svn: 46354
2008-01-25 16:41:09 +00:00
Evan Cheng
759f389846
X86 JIT PIC jumptable support.
...
llvm-svn: 45616
2008-01-05 02:26:58 +00:00
Evan Cheng
7322e4dec4
X86 PIC JIT support fixes: encoding bugs, add lazy pointer stubs support.
...
llvm-svn: 45575
2008-01-04 10:46:51 +00:00
Chris Lattner
40f17611cc
Remove symbols that don't exist, remove tabs, fix comment typo
...
llvm-svn: 45553
2008-01-03 22:15:32 +00:00
Chris Lattner
a27cc48cbc
Fix PR1873, a problem finding stat-related symbols on linux, due to
...
"libc_nonshared.a". Patch by Edwin Török!
llvm-svn: 45532
2008-01-03 07:10:51 +00:00
Evan Cheng
fb2bc4fc95
Change MachineRelocation::DoesntNeedFnStub to NeedStub. This fields will be used
...
for non-function GV relocations that require function address stubs (e.g. Mac OS X in non-static mode).
llvm-svn: 45527
2008-01-03 02:56:28 +00:00
Chris Lattner
ad9a6ccb83
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Chris Lattner
8193d4af33
remove attribution from lib Makefiles.
...
llvm-svn: 45415
2007-12-29 20:09:26 +00:00
Chuck Rose III
cdc572968c
Adjust VStudio files to add JITMemoryManager files + include <cassert> from same.
...
llvm-svn: 44651
2007-12-06 02:03:01 +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