summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* Use uint8_t and int32_t in {JIT,Machine}CodeEmitersBruno Cardoso Lopes2009-06-042-35/+33
| | | | llvm-svn: 72821
* Revert 72650Bruno Cardoso Lopes2009-06-032-33/+35
| | | | llvm-svn: 72783
* Fix new CodeEmitter stuff to follow LLVM codying style. Patch by Aaron GrayBruno Cardoso Lopes2009-06-011-1/+1
| | | | llvm-svn: 72697
* Use uint8_t and int32_t in {JIT,Machine}CodeEmitersBruno Cardoso Lopes2009-05-302-35/+33
| | | | llvm-svn: 72650
* First patch in the direction of splitting MachineCodeEmitter in two subclasses:Bruno Cardoso Lopes2009-05-305-121/+121
| | | | | | JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray llvm-svn: 72631
* stat64/open64/lseek64 for the interpreterTorok Edwin2009-05-231-1/+4
| | | | llvm-svn: 72329
* Allow the JIT ExecutionEngine to report details about the generated machine ↵Argyrios Kyrtzidis2009-05-183-6/+38
| | | | | | | | | | code. Introduce a new class (MachineCodeInfo) that the JIT can fill in with details. Right now, just the address and the size of the machine code are reported. Patch by Evan Phoenix! llvm-svn: 72040
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-094-12/+12
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Set FnEnd in JITEmitter::finishFunction to point strictly to the end of ↵Argyrios Kyrtzidis2009-04-301-3/+6
| | | | | | | | function's machine code. Don't include memory allocated for global variables during relocations resolution. llvm-svn: 70517
* Fix the JIT bindings for ocaml.Bill Wendling2009-04-301-3/+4
| | | | llvm-svn: 70454
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-297-13/+16
| | | | | | | which better identifies what the optimization is doing. And is more flexible for future uses. llvm-svn: 70440
* The second part of the change from -fast to -O#. This changes the JIT to acceptBill Wendling2009-04-297-20/+20
| | | | | | | an optimization level instead of a simple boolean telling it to generate code "fast" or the other type of "fast". llvm-svn: 70347
* Under unusual circumstances (jitting a function that causes the creation ofNick Lewycky2009-04-271-17/+23
| | | | | | | | | | | | another stub, but then never calling the jitted function) can cause the JIT to leave a stub in place. Judging by the comments this is a known deficiency, so we're just not going to use AssertingVH for the StubToFunctionTy map. Also shorten some lines longer than 80 columns. This fixes the "make check" failure with ocaml on x86-64 linux. llvm-svn: 70185
* Use an AssertingVH to detect the case where the Function was deleted butNick Lewycky2009-04-191-10/+11
| | | | | | freeMachineCodeForFunction was never called. llvm-svn: 69531
* make sure to unlock keymgr if the JIT is created and destroyed, allChris Lattner2009-04-161-5/+3
| | | | | | | | locks must be matched with unlocks. Also, use calloc to allocate the block so that it is properly zero'd. Thanks to Nick Kledzik for tracking this down. llvm-svn: 69314
* Mac OS X 10.6 and above do not use key manager to register EH frames.Evan Cheng2009-04-141-2/+8
| | | | llvm-svn: 69090
* Link against libffi if available, fall back to "no external calls fromNick Lewycky2009-04-131-8/+8
| | | | | | interpreter mode" when it's not. llvm-svn: 68937
* Use CHAR_BIT instead of hard-coding 8 in several places where itDan Gohman2009-04-012-3/+4
| | | | | | | is appropriate. This helps visually differentiate host-oriented calculations from target-oriented calculations. llvm-svn: 68227
* fix one more fp80 case (used only by Interpreter)Dale Johannesen2009-03-241-21/+5
| | | | | | and streamline code here a bit. llvm-svn: 67636
* Change JIT for different layout of fp80.Dale Johannesen2009-03-241-5/+5
| | | | llvm-svn: 67629
* Fix some significant problems with constant pools that resulted in ↵Evan Cheng2009-03-131-23/+35
| | | | | | | | | | | | | | | | | | | | | | | unnecessary paddings between constant pool entries, larger than necessary alignments (e.g. 8 byte alignment for .literal4 sections), and potentially other issues. 1. ConstantPoolSDNode alignment field is log2 value of the alignment requirement. This is not consistent with other SDNode variants. 2. MachineConstantPool alignment field is also a log2 value. 3. However, some places are creating ConstantPoolSDNode with alignment value rather than log2 values. This creates entries with artificially large alignments, e.g. 256 for SSE vector values. 4. Constant pool entry offsets are computed when they are created. However, asm printer group them by sections. That means the offsets are no longer valid. However, asm printer uses them to determine size of padding between entries. 5. Asm printer uses expensive data structure multimap to track constant pool entries by sections. 6. Asm printer iterate over SmallPtrSet when it's emitting constant pool entries. This is non-deterministic. Solutions: 1. ConstantPoolSDNode alignment field is changed to keep non-log2 value. 2. MachineConstantPool alignment field is also changed to keep non-log2 value. 3. Functions that create ConstantPool nodes are passing in non-log2 alignments. 4. MachineConstantPoolEntry no longer keeps an offset field. It's replaced with an alignment field. Offsets are not computed when constant pool entries are created. They are computed on the fly in asm printer and JIT. 5. Asm printer uses cheaper data structure to group constant pool entries. 6. Asm printer compute entry offsets after grouping is done. 7. Change JIT code to compute entry offsets on the fly. llvm-svn: 66875
* Allow cross-process JIT to handle MachineRelocations of the ExternalSymbolNate Begeman2009-03-111-13/+82
| | | | | | | variety. For example, an i64 div might turn into a call to __divdi3 during legalization. llvm-svn: 66646
* Fix PR3724 by searching for the largest free block when Chris Lattner2009-03-091-2/+19
| | | | | | | | | allocating memory in the JIT. This is insanely inefficient, but hey, most people implement their own memory managers anyway. Patch by Eric Yew! llvm-svn: 66472
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-2/+2
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Finish cross-process JIT work, and clean up previous work.Nate Begeman2009-03-072-30/+40
| | | | | | | | | | | | | | | | 1. When the JIT is asked to remove a function, updating it's mapping to 0, we invalidate any function stubs used only by that function. Now, also invalidate the JIT's mapping from the GV the stub pointed to, to the address of the GV. 2. When dlsym stubs for cross-process JIT are enabled, do not abort just because a named function cannot be found in the JIT's process. 3. Fix various assumptions about when it is ok to use the lazy resolver when non-lazy JITing is enabled. llvm-svn: 66324
* switch this message back to only being in -debug mode.Chris Lattner2009-03-051-1/+1
| | | | llvm-svn: 66143
* 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
OpenPOWER on IntegriCloud