summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
* When allocating stubs, keep track of which Functions are referencing the stub.Nate Begeman2009-03-051-17/+120
| | | | | | | | This invalidates the stubs in the resolver map when they are no longer referenced, and should the JIT memory manager ever pick up a deallocateStub interface, the JIT could reclaim the memory for unused stubs as well. llvm-svn: 66141
* Fix a thinko in the JIT where the address of a GV was only recorded in the mapNate Begeman2009-03-042-6/+16
| | | | | | | | | on failure to resolve it. Do not abort on failure to resolve an external symbol when using dlsym stubs, since the symbol may not be in the JIT's address space. Just use 0. Allow dlsym stubs to differentiate between GlobalVars and Functions. llvm-svn: 66050
* don't #include a header into the middle of an anon namespace.Chris Lattner2009-03-031-7/+5
| | | | llvm-svn: 65967
* Fix the calculation for how big the allocated stub needs to be.Nate Begeman2009-03-021-1/+1
| | | | llvm-svn: 65895
* Fix the logic in this assertion to properly validate the numberDan Gohman2009-02-191-2/+3
| | | | | | of arguments. llvm-svn: 64999
* Reapply r57340. VMKit does not presently rely on materializeFunctionDan Gohman2009-02-191-2/+2
| | | | | | | being called with the lock released, and this fixes a race condition in the JIT as used by lli. llvm-svn: 64997
* Add support to the JIT for true non-lazy operation. When a call to a functionNate Begeman2009-02-185-40/+225
| | | | | | | | | | | | | | | | | | | | that has not been JIT'd yet, the callee is put on a list of pending functions to JIT. The call is directed through a stub, which is updated with the address of the function after it has been JIT'd. A new interface for allocating and updating empty stubs is provided. Add support for removing the ModuleProvider the JIT was created with, which would otherwise invalidate the JIT's PassManager, which is initialized with the ModuleProvider's Module. Add support under a new ExecutionEngine flag for emitting the infomration necessary to update Function and GlobalVariable stubs after JITing them, by recording the address of the stub and the name of the GlobalValue. This allows code to be copied from one address space to another, where libraries may live at different virtual addresses, and have the stubs updated with their new correct target addresses. llvm-svn: 64906
* On 64bit we may have a personality function which requires 64 bits toNicolas Geoffray2009-02-151-7/+13
| | | | | | be encoded. llvm-svn: 64600
* Split the locking out of JIT::runJITOnFunction so that callersDan Gohman2009-02-062-5/+9
| | | | | | | that already hold the lock can call an entry point that doesn't re-acquire the lock. llvm-svn: 63965
* allow main to have any integer type.Chris Lattner2009-02-041-1/+1
| | | | llvm-svn: 63743
* Reapply patch from r62553, with a fix to avoid looking for an ffi.h that isn'tNick Lewycky2009-02-041-496/+212
| | | | | | | | | | | | there. This changes the interpreter to use libffi. After this patch, the interpreter will barely be able to call any external functions if built on a system without libffi installed (just enough to pass 'make check' really). But with libffi, we can now call any function that isn't variadic or taking a struct or vector parameter (but pointer to struct is fine). Patch by Alexei Svitkine! llvm-svn: 63723
* Fix PR3423: Link llvm on ARM EABI machines. Patch by Robert Schuster.Evan Cheng2009-02-011-3/+3
| | | | llvm-svn: 63489
* Add support for deleting a module provider from a JIT in such a way that it ↵Nate Begeman2009-01-233-1/+41
| | | | | | does not cause the owned module to be fully materialized. llvm-svn: 62864
* Revert r62553 and r62616 due to issues with portability.Tanya Lattner2009-01-221-206/+496
| | | | llvm-svn: 62777
* rename methods in System/Host to be more consistent.Chris Lattner2009-01-221-4/+4
| | | | llvm-svn: 62776
* add getPointerToGlobal to the C bindings, patch by Lennart Augustsson!Chris Lattner2009-01-211-0/+4
| | | | | | PR3364 llvm-svn: 62697
* Fix typo. Patch by Alexei Svitkine.Duncan Sands2009-01-201-1/+1
| | | | llvm-svn: 62616
* Make the Interpreter use libffi if it's available. Patch from Alexei Svitkine!Nick Lewycky2009-01-201-496/+206
| | | | | | | | | | | This requires a rebuild of 'configure' itself. I will be committing that next, but built with the wrong version of autoconf. Somebody who has the right one, please update it. As a side-note, because of the way autoconf works, all built tools will link against libffi, not just lli. If you know how to fix this, please let me know ... llvm-svn: 62553
* don't assert and die on out of range (undefined) shifts. This fixesChris Lattner2009-01-161-4/+16
| | | | | | PR3334. llvm-svn: 62352
* Change isGVCompilationDisabled() semantics again. It should abort on any GV ↵Evan Cheng2009-01-161-1/+4
| | | | | | that's not constant whether it's "internal" or not. In a server / client environment, GV is returned in the same block of memory as code. However, the memory might not be writable. llvm-svn: 62336
* Registry.h should not depend on CommandLine.h.Mikhail Glushenkov2009-01-161-1/+2
| | | | | | | Split Support/Registry.h into two files so that we have less to recompile every time CommandLine.h is changed. llvm-svn: 62312
* Delete trailing whitespace.Mikhail Glushenkov2009-01-161-2/+2
| | | | llvm-svn: 62307
* Add the private linkage.Rafael Espindola2009-01-152-3/+3
| | | | llvm-svn: 62279
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-124-12/+12
| | | | | | suggested by Chris. llvm-svn: 62099
* Removed trailing whitespace from Makefiles.Misha Brukman2009-01-093-6/+6
| | | | llvm-svn: 61991
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-051-1/+0
| | | | llvm-svn: 61715
* Fix misplaced right parentheses.Evan Cheng2009-01-051-2/+2
| | | | llvm-svn: 61699
* Handle weak_extern in the JIT. This fixesDan Gohman2009-01-054-13/+28
| | | | | | | | SingleSource/UnitTests/2007-04-25-weak.c in JIT mode. The test now passes on systems which are able to produce a correct reference output to compare with. llvm-svn: 61674
* Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids ↵Evan Cheng2008-12-101-14/+21
| | | | | | some overflow issues. Patch by Thomas Jablin. llvm-svn: 60828
* Fix a bug introduced by r59265. If lazy compilation is disabled, return ↵Evan Cheng2008-12-101-1/+1
| | | | | | actual function ptr instead of ptr to stub if function is already compiled. llvm-svn: 60822
* DisableGVCompilation should not abort on internal GlobalValue's.Evan Cheng2008-12-091-2/+2
| | | | llvm-svn: 60750
* Make JIT::runFunction handle functions with non-C calling conventions.Chris Lattner2008-11-231-0/+1
| | | | llvm-svn: 59904
* Implement support for JIT exceptions on X86_64. Relative offsets areNicolas Geoffray2008-11-181-61/+27
| | | | | | | encoded on 32 bytes, and the personality function is not encoded as relative. llvm-svn: 59516
* Always emit a function pointer as a pointer to the function stub (if there ↵Evan Cheng2008-11-131-1/+20
| | | | | | is one). This makes it possible to compare function pointer values in lazy compilation mode. This fixes PR3043. llvm-svn: 59265
* Change binary dump format.Evan Cheng2008-11-121-9/+21
| | | | llvm-svn: 59119
* Comments and indentation.Evan Cheng2008-11-101-3/+3
| | | | llvm-svn: 59007
* Forgot these.Evan Cheng2008-11-101-19/+19
| | | | llvm-svn: 58952
* Remove a InvalidateInstructionCache call with incorrect size.Evan Cheng2008-11-081-4/+0
| | | | llvm-svn: 58898
* Rename startFunctionStub to startGVStub since it's also used for GV non-lazy ↵Evan Cheng2008-11-081-6/+6
| | | | | | ptr. llvm-svn: 58897
* Rename isString -> isExternalSymbol; getString -> getExternalSymbol since ↵Evan Cheng2008-11-081-3/+3
| | | | | | these work on externsym machine relocations. llvm-svn: 58895
* More debug output.Evan Cheng2008-11-081-0/+2
| | | | llvm-svn: 58894
* More debug output.Evan Cheng2008-11-072-2/+4
| | | | llvm-svn: 58868
* Jump tables may be emitted by target.Evan Cheng2008-11-071-9/+13
| | | | llvm-svn: 58835
* Improve JIT debugging outputs format consistency.Evan Cheng2008-11-062-16/+18
| | | | llvm-svn: 58807
* Need a \n.Evan Cheng2008-11-061-1/+2
| | | | llvm-svn: 58788
* Undo 58778 but makes the binary dump prettier.Evan Cheng2008-11-051-3/+21
| | | | llvm-svn: 58782
* Remove debug output that's not really useful.Evan Cheng2008-11-051-13/+0
| | | | llvm-svn: 58778
* Rename isGVLazyPtr to isGVNonLazyPtr relocation. This represents Mac OS XEvan Cheng2008-11-051-22/+22
| | | | | | indirect gv reference. Please don't call it lazy. llvm-svn: 58746
* Debugging output tweak.Evan Cheng2008-11-051-2/+2
| | | | llvm-svn: 58737
* For some targets, it's not possible to place GVs in the same memory buffer ↵Evan Cheng2008-11-041-0/+10
| | | | | | | | 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
OpenPOWER on IntegriCloud