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
Nicolas Geoffray
c5c2108727
Register the frame register function when allocating the JIT,
...
so that lli works out of the box with -enable-eh.
llvm-svn: 54920
2008-08-18 14:53:56 +00:00
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
Gordon Henriksen
b0ee2172b0
Fix the LLVMCreateJITCompiler C binding.
...
Evan broke it in r54523 by adding a parameter in the implementation without
updating the header correspondingly.
llvm-svn: 54555
2008-08-08 20:49:28 +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
3e389ed424
Use strcpy instead of sprintf here. This avoids a GCC 4.3 format-string
...
warning. There wasn't actually a problem here, because the contents of
the string are known.
llvm-svn: 54385
2008-08-05 23:36:35 +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
Chris Lattner
c5d6ef88ff
Add a new hidden option to the interpreter to cause it to print
...
out every volatile load and store. This is useful for tracking
down insane volatile memory bugs.
llvm-svn: 53241
2008-07-08 17:25:49 +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
Gordon Henriksen
50ca4ebe97
Add C binding for ExecutionEngine::addGlobalMapping.
...
llvm-svn: 52523
2008-06-20 02:16:11 +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
Evan Cheng
d43a533365
Don't forget to initialize SymbolSearchingDisabled.
...
llvm-svn: 52414
2008-06-17 16:49:02 +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
Dan Gohman
e6bb320822
Fix ExecutionEngine's constant code to work properly when structs and arrays
...
will become first-class types.
llvm-svn: 51293
2008-05-20 03:20:09 +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