Evan Cheng
3130873f30
DisableGVCompilation should not abort on internal GlobalValue's.
...
llvm-svn: 60750
2008-12-09 07:31:49 +00:00
Chris Lattner
5c70ae0588
Make JIT::runFunction handle functions with non-C calling conventions.
...
llvm-svn: 59904
2008-11-23 08:00:11 +00:00
Nicolas Geoffray
3cd13e7e65
Implement support for JIT exceptions on X86_64. Relative offsets are
...
encoded on 32 bytes, and the personality function is not encoded as
relative.
llvm-svn: 59516
2008-11-18 10:44:46 +00:00
Evan Cheng
f8ba919d76
Always emit a function pointer as a pointer to the function stub (if there is one). This makes it possible to compare function pointer values in lazy compilation mode. This fixes PR3043.
...
llvm-svn: 59265
2008-11-13 21:50:50 +00:00
Evan Cheng
b6c760349e
Change binary dump format.
...
llvm-svn: 59119
2008-11-12 08:22:43 +00:00
Evan Cheng
b9dbae83d7
Comments and indentation.
...
llvm-svn: 59007
2008-11-10 23:26:16 +00:00
Evan Cheng
e2bed5dc3b
Forgot these.
...
llvm-svn: 58952
2008-11-10 01:52:24 +00:00
Evan Cheng
7f1eececb4
Remove a InvalidateInstructionCache call with incorrect size.
...
llvm-svn: 58898
2008-11-08 08:15:39 +00:00
Evan Cheng
3d9c134136
Rename startFunctionStub to startGVStub since it's also used for GV non-lazy ptr.
...
llvm-svn: 58897
2008-11-08 08:02:53 +00:00
Evan Cheng
fe6df6ae18
Rename isString -> isExternalSymbol; getString -> getExternalSymbol since these work on externsym machine relocations.
...
llvm-svn: 58895
2008-11-08 07:37:34 +00:00
Evan Cheng
8dfc67205a
More debug output.
...
llvm-svn: 58894
2008-11-08 07:22:53 +00:00
Evan Cheng
237175e1ab
More debug output.
...
llvm-svn: 58868
2008-11-07 22:30:29 +00:00
Evan Cheng
6e23b1e651
Jump tables may be emitted by target.
...
llvm-svn: 58835
2008-11-07 09:02:17 +00:00
Evan Cheng
1ea366a419
Improve JIT debugging outputs format consistency.
...
llvm-svn: 58807
2008-11-06 17:46:04 +00:00
Evan Cheng
3e727721d0
Need a \n.
...
llvm-svn: 58788
2008-11-06 01:18:29 +00:00
Evan Cheng
7390b46342
Undo 58778 but makes the binary dump prettier.
...
llvm-svn: 58782
2008-11-05 23:44:08 +00:00
Evan Cheng
575f3150cf
Remove debug output that's not really useful.
...
llvm-svn: 58778
2008-11-05 23:21:11 +00:00
Evan Cheng
2702e22b83
Rename isGVLazyPtr to isGVNonLazyPtr relocation. This represents Mac OS X
...
indirect gv reference. Please don't call it lazy.
llvm-svn: 58746
2008-11-05 01:50:32 +00:00
Evan Cheng
8a5c3c5cc3
Debugging output tweak.
...
llvm-svn: 58737
2008-11-05 00:22:28 +00:00
Evan Cheng
28e234a959
For some targets, it's not possible to place GVs in the same memory buffer as the MachineCodeEmitter allocated memory. Code and data has different read / write / execution privilege requirements.
...
This is a short term workaround. The current solution is for the JIT memory manager to manage code and data memory separately.
llvm-svn: 58688
2008-11-04 09:30:48 +00:00
Evan Cheng
7847f4f030
80 col violation.
...
llvm-svn: 58684
2008-11-04 06:10:31 +00:00
Evan Cheng
45516a94c1
Silence a compiler warning.
...
llvm-svn: 58598
2008-11-03 07:14:02 +00:00
Jim Grosbach
31e64cbf49
Revert errant deletion. The target needs to be able to specify that it doesn't want the generic constant pool to be emitted.
...
llvm-svn: 58475
2008-10-30 23:44:39 +00:00
Evan Cheng
479adf22ee
Let target resolve some relocation results.
...
llvm-svn: 58407
2008-10-29 23:54:46 +00:00
Jim Grosbach
d735f403a0
Support for constant islands in the ARM JIT.
...
Since the ARM constant pool handling supercedes the standard LLVM constant
pool entirely, the JIT emitter does not allocate space for the constants,
nor initialize the memory. The constant pool is considered part of the
instruction stream.
Likewise, when resolving relocations into the constant pool, a hook into
the target back end is used to resolve from the constant ID# to the
address where the constant is stored.
For now, the support in the ARM emitter is limited to 32-bit integer. Future
patches will expand this to the full range of constants necessary.
llvm-svn: 58338
2008-10-28 18:25:49 +00:00
Nicolas Geoffray
ce30b5caf0
Support for allocation of TLS variables in the JIT. Allocation of a global
...
variable is moved to the execution engine. The JIT calls the TargetJITInfo
to allocate thread local storage. Currently, only linux/x86 knows how to
allocate thread local global variables.
llvm-svn: 58142
2008-10-25 15:41:43 +00:00
Oscar Fuentes
a932cae97a
CMake: Turned some libraries into partially linked objects. Corrected
...
names of LLVMCore and ARMCodeGen.
llvm-svn: 57943
2008-10-22 02:51:53 +00:00
Nuno Lopes
112ac04abd
fix a tricky bug in the JIT global variable emitter, that was triggered when JITing a variable independently of a function. This lead to sharing memory memory between functions and GVs thus changing the value of a GV could change the code in execution. more details on the ML.
...
llvm-svn: 57900
2008-10-21 11:42:16 +00:00
Nuno Lopes
08a1a82acc
little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in emitGlobals()
...
llvm-svn: 57484
2008-10-14 10:04:52 +00:00
Mon P Wang
dc1aa21e4e
Revert r57340 move guard mutex in getPointerToFunction as this can cause
...
deadlock issues with java
llvm-svn: 57356
2008-10-10 18:07:10 +00:00
Mon P Wang
6c79c8e822
Moved guard mutex upwards to guard materializing a function
...
in getPointerToFunction
llvm-svn: 57340
2008-10-10 01:47:42 +00:00
Dale Johannesen
075a62519f
Add a "loses information" return value to APFloat::convert
...
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.
llvm-svn: 57329
2008-10-09 23:00:39 +00:00
Dale Johannesen
9e57068854
Rename APFloat::convertToAPInt to bitcastToAPInt to
...
make it clearer what the function does. No functional
change.
llvm-svn: 57325
2008-10-09 18:53:47 +00:00
Duncan Sands
8f296a3788
Add <cstdio> include where needed by gcc-4.4.
...
Patch by Samuel Tardieu.
llvm-svn: 57291
2008-10-08 07:23:46 +00:00
Daniel Dunbar
40fb36a42c
Unbreak build.
...
llvm-svn: 57017
2008-10-03 17:11:57 +00:00
Jim Grosbach
a49386d8e7
On Darwin ARM, memory needs special handling to do JIT. This patch expands
...
this handling to work properly for modifying stub functions, relocations
back to entry points after JIT compilation, etc..
llvm-svn: 57013
2008-10-03 16:17:20 +00:00
Dan Gohman
30c5ce1b7d
Switch the MachineOperand accessors back to the short names like
...
isReg, etc., from isRegister, etc.
llvm-svn: 57006
2008-10-03 15:45:36 +00:00
Nicolas Geoffray
c3efec61f5
Acquire the lock only when necessary. More precisely, do not acquire
...
the lock when calling a method which may materialize the llvm::Function.
llvm-svn: 56995
2008-10-03 07:27:08 +00:00
Evan Cheng
7eea8fb7cd
Add runStaticConstructorsDestructors which runs ctors / dtors of a single module. Patch by David Chisnall.
...
llvm-svn: 56849
2008-09-30 15:51:21 +00:00
Devang Patel
64dd7a2e89
Large mechanical patch.
...
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622
2008-09-25 21:00:45 +00:00
Evan Cheng
0ed8f5b185
Add DisableGVCompilation which forces the JIT to assert when it tries to allocate space for a GlobalVariable.
...
llvm-svn: 56557
2008-09-24 16:25:55 +00:00
Devang Patel
a3e9bf1bca
s/ParameterAttributes/Attributes/g
...
llvm-svn: 56513
2008-09-23 23:03:40 +00:00
Oscar Fuentes
0f25988689
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Evan Cheng
a0459a1c5a
Preliminary support for systems which require changing JIT memory regions privilege from read / write to read / executable.
...
llvm-svn: 56303
2008-09-18 07:54:21 +00:00
Anton Korobeynikov
6ad8b060d0
Make safer variant of alias resolution routine to be default
...
llvm-svn: 56005
2008-09-09 20:05:04 +00:00
Evan Cheng
15fd1af657
MMI may be null.
...
llvm-svn: 55626
2008-09-02 08:14:01 +00:00
Nicolas Geoffray
05014c43fa
Add support for JIT exceptions on Darwin. Since we're dealing with libgcc,
...
whose darwin code was written after the ability to dynamically register frames,
we need to do special hacks to make things work.
llvm-svn: 55507
2008-08-28 22:34:49 +00:00
Dan Gohman
5438048f54
Avoid a warning about isTargetNullPtr being unused in release builds.
...
llvm-svn: 55350
2008-08-26 01:38:29 +00:00
Evan Cheng
4fa90a1d3e
Get rid of a couple of dynamic_cast.
...
llvm-svn: 55022
2008-08-20 00:28:12 +00:00
Nicolas Geoffray
2f08e00f01
Update the JIT exception writer to better mimic the codegen exception writer.
...
Also skip indirect encoding for platforms that ask for one: we direclty
write an address, not a pointer to the address.
llvm-svn: 54987
2008-08-19 14:48:14 +00:00