summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/JIT
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix PR6360. It's easy for a stub's address to escape to user code, so we can'tJeffrey Yasskin2010-03-041-115/+4
| | | | | | | | | just count references to it from JIT output to decide when to destroy it. This patch waits to destroy the JIT's memory of a stub until the Function it refers to is destroyed. External function stubs and GVIndirectSyms aren't destroyed until the JIT itself is. llvm-svn: 97737
* Fix PR5291, in which a SmallPtrSet iterator was held across an insertion intoJeffrey Yasskin2010-03-041-24/+38
| | | | | | the set. llvm-svn: 97720
* Make sure JITResolvers don't leave any stubs behind. When a JITResolver wasJeffrey Yasskin2010-03-041-59/+105
| | | | | | | destroyed, it could leave stubs in the StubToResolverMap, which would confuse the lookup for subsequent lazy compilations. llvm-svn: 97698
* There are two ways of checking for a given type, for example isa<PointerType>(T)Duncan Sands2010-02-161-3/+3
| | | | | | | and T->isPointerTy(). Convert most instances of the first form to the second form. Requested by Chris. llvm-svn: 96344
* Apply patch from http://llvm.org/bugs/attachment.cgi?id=4136 now that PR5004 isBill Wendling2010-02-161-1/+5
| | | | | | finished. llvm-svn: 96304
* Uniformize the names of type predicates: rather than having isFloatTy andDuncan Sands2010-02-151-4/+4
| | | | | | isInteger, we now have isFloatTy and isIntegerTy. Requested by Chris! llvm-svn: 96223
* Make JIT::runFunction clean up the generated stub function.Jeffrey Yasskin2010-02-121-2/+6
| | | | | | Patch by Shivram K! llvm-svn: 96037
* Make it possible to create multiple JIT instances at the same time, by removingJeffrey Yasskin2010-02-113-43/+129
| | | | | | | | | | the global TheJIT and TheJITResolver variables. Lazy compilation is supported by a global map from a stub address to the JITResolver that knows how to compile it. Patch by Olivier Meurant! llvm-svn: 95837
* Fix "the the" and similar typos.Dan Gohman2010-02-101-1/+1
| | | | llvm-svn: 95781
* Move --march, --mcpu, and --mattr from JIT/TargetSelect.cpp to lli.cpp.Jeffrey Yasskin2010-02-053-24/+28
| | | | | | | | | llc.cpp also defined these flags, meaning that when I linked all of LLVM's libraries into a single shared library, llc crashed on startup with duplicate flag definitions. This patch passes them through the EngineBuilder into JIT::selectTarget(). llvm-svn: 95390
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-274-110/+35
| | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. llvm-svn: 94686
* Add support for target-specific 32-bit custom-lowered Chris Lattner2010-01-261-0/+1
| | | | | | jump table entries. llvm-svn: 94505
* make jit jump table emission be based on the EntryKind instead of magic ↵Chris Lattner2010-01-261-18/+27
| | | | | | | | | variables. JITInfo::getPICJumpTableEntry can probably be removed now, but I don't plan to do this. llvm-svn: 94501
* Rearrange handling of jump tables. Highlights:Chris Lattner2010-01-251-16/+22
| | | | | | | | | | | | | | | | | | 1. MachineJumpTableInfo is now created lazily for a function the first time it actually makes a jump table instead of for every function. 2. The encoding of jump table entries is now described by the MachineJumpTableInfo::JTEntryKind enum. This enum is determined by the TLI::getJumpTableEncoding() hook, instead of by lots of code scattered throughout the compiler that "knows" that jump table entries are always 32-bits in pic mode (for example). 3. The size and alignment of jump table entries is now calculated based on their kind, instead of at machinefunction creation time. Future work includes using the EntryKind in more places in the compiler, eliminating other logic that "knows" the layout of jump tables in various situations. llvm-svn: 94470
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-241-1/+0
| | | | llvm-svn: 94378
* Make OProfile support compile again after r93630 removedJeffrey Yasskin2010-01-221-9/+11
| | | | | | | DebugLocTuple. Also use an AssertingVH to ensure that MDNodes aren't destroyed while the FilenameCache is using them. llvm-svn: 94245
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-221-0/+2
| | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. llvm-svn: 94164
* Avoid including DebugInfo.h in AsmPrinter.hDevang Patel2010-01-191-0/+1
| | | | llvm-svn: 93864
* Replace DebugLocTuple with DILocation.Devang Patel2010-01-161-4/+5
| | | | llvm-svn: 93630
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-051-1/+1
| | | | llvm-svn: 92771
* Convert a ton of simple integer type equality tests to the new predicate.Benjamin Kramer2010-01-051-3/+3
| | | | llvm-svn: 92760
* Avoid going through the LLVMContext for type equality where it's safe to ↵Benjamin Kramer2010-01-051-3/+2
| | | | | | dereference the type pointer. llvm-svn: 92726
* Change errs() to dbgs().David Greene2010-01-051-1/+1
| | | | llvm-svn: 92562
* Change errs() to dbgs().David Greene2010-01-051-30/+30
| | | | llvm-svn: 92561
* Change errs() to dbgs().David Greene2010-01-051-8/+8
| | | | llvm-svn: 92560
* Remove dead store and simplify code.Bill Wendling2009-12-281-5/+4
| | | | llvm-svn: 92191
* Partially revert r91626. Materializing extra functions to determine whetherJeffrey Yasskin2009-12-221-16/+9
| | | | | | | | | | | they're available_externally broke VMKit, which was relying on the fact that functions would only be materialized when they were first called. We'll have to wait for http://llvm.org/PR5737 to really fix this. I also added a test for one of the F->isDeclaration() calls which wasn't covered by anything else in the test suite. llvm-svn: 91943
* Fix a crash in JIT::recompileAndRelinkFunction(). It doesn't pass the MCIJeffrey Yasskin2009-12-221-2/+4
| | | | | | | | | argument to runJITOnFunction(), which caused a null pointer dereference at every call. Patch by Gianluca Guida! llvm-svn: 91939
* Don't codegen available_externally functions. Fixes http://llvm.org/PR5735.Jeffrey Yasskin2009-12-173-30/+62
| | | | llvm-svn: 91626
* Change indirect-globals to use a dedicated allocIndirectGV. This lets usJeffrey Yasskin2009-12-151-25/+43
| | | | | | | | | remove start/finishGVStub and the BufferState helper class from the MachineCodeEmitter interface. It has the side-effect of not setting the indirect global writable and then executable on ARM, but that shouldn't be necessary. llvm-svn: 91464
* Remove isPod() from DenseMapInfo, splitting it out to its ownChris Lattner2009-12-151-1/+0
| | | | | | | | isPodLike type trait. This is a generally useful type trait for more than just DenseMap, and we really care about whether something acts like a pod, not whether it really is a pod. llvm-svn: 91421
* Formatting.Eric Christopher2009-12-151-1/+1
| | | | llvm-svn: 91377
* Reinstate r91208 to fix available_externally linkage for globals, withJeffrey Yasskin2009-12-131-1/+1
| | | | | | | nlewycky's fix to add -rdynamic so the JIT can look symbols up in Linux builds of the JITTests binary. llvm-svn: 91250
* Revert r91208. Something on Linux prevents the JIT from looking up a symbolJeffrey Yasskin2009-12-121-1/+1
| | | | | | defined in the test, and I don't have time tonight to figure it out. llvm-svn: 91209
* Fix available_externally linkage for globals. It's probably still notJeffrey Yasskin2009-12-121-1/+1
| | | | | | supported by emitGlobals, but I don't have a test case for that. llvm-svn: 91208
* Comparing std::string with NULL is a bad idea, so just check whether its empty.Torok Edwin2009-12-101-1/+1
| | | | | | | This code was crashing always with oprofile enabled, since it tried to create a StringRef out of NULL, which run strlen on NULL. llvm-svn: 91046
* Fix the OProfileJITEventListener for StringRef being returned from debug info.Jeffrey Yasskin2009-12-071-12/+6
| | | | llvm-svn: 90813
* * Move stub allocation inside the JITEmitter, instead of exposing aJeffrey Yasskin2009-11-231-39/+56
| | | | | | | | | | | | | | way for each TargetJITInfo subclass to allocate its own stubs. This means stubs aren't as exactly-sized anymore, but it lets us get rid of TargetJITInfo::emitFunctionStubAtAddr(), which lets ARM and PPC support the eager JIT, fixing http://llvm.org/PR4816. * Rename the JITEmitter's stub creation functions to describe the kind of stub they create. So far, all of them create lazy-compilation stubs, but they sometimes get used when far-call stubs are needed. Fixing http://llvm.org/PR5201 will involve fixing this. llvm-svn: 89715
* Allow more than one stub to be being generated at the same time.Jeffrey Yasskin2009-11-231-29/+16
| | | | | | | | It's probably better in the long run to replace the indirect-GlobalVariable system. That'll be done after a subsequent patch. llvm-svn: 89708
* Try to fix JITTest.FarCallToKnownFunction on ARM and PPC.Jeffrey Yasskin2009-11-191-10/+14
| | | | llvm-svn: 89410
* Add ability to set code model within the execution engine buildersEric Christopher2009-11-172-6/+12
| | | | | | and creation interfaces. llvm-svn: 89151
* Make X86-64 in the Large model always emit 64-bit calls.Jeffrey Yasskin2009-11-161-17/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The large code model is documented at http://www.x86-64.org/documentation/abi.pdf and says that calls should assume their target doesn't live within the 32-bit pc-relative offset that fits in the call instruction. To do this, we turn off the global-address->target-global-address conversion in X86TargetLowering::LowerCall(). The first attempt at this broke the lazy JIT because it can separate the movabs(imm->reg) from the actual call instruction. The lazy JIT receives the address of the movabs as a relocation and needs to record the return address from the call; and then when that call happens, it needs to patch the movabs with the newly-compiled target. We could thread the call instruction into the relocation and record the movabs<->call mapping explicitly, but that seems to require at least as much new complication in the code generator as this change. To fix this, we make lazy functions _always_ go through a call stub. You'd think we'd only have to force lazy calls through a stub on difficult platforms, but that turns out to break indirect calls through a function pointer. The right fix for that is to distinguish between calls and address-of operations on uncompiled functions, but that's complex enough to leave for someone else to do. Another attempt at this defined a new CALL64i pseudo-instruction, which expanded to a 2-instruction sequence in the assembly output and was special-cased in the X86CodeEmitter's emitInstruction() function. That broke indirect calls in the same way as above. This patch also removes a hack forcing Darwin to the small code model. Without far-call-stubs, the small code model requires things of the JITMemoryManager that the DefaultJITMemoryManager can't provide. Thanks to echristo for lots of testing! llvm-svn: 88984
* Implement DISABLE_INLINE for MSVC. This required changing the position in allBenjamin Kramer2009-11-141-1/+1
| | | | | | forward declaration and patching tblgen to emit it right. Patch by Amine Khaldi! llvm-svn: 88798
* Use stubs when we have them, otherwise use code we already have,Eric Christopher2009-11-121-65/+68
| | | | | | | | otherwise create a stub. Add a test to make sure we don't create extraneous stubs. llvm-svn: 86941
* Fix typo, cleanup whitespace.Eric Christopher2009-11-121-35/+35
| | | | llvm-svn: 86917
* Remove dlsym stubs, with Nate Begeman's permission.Jeffrey Yasskin2009-11-094-141/+8
| | | | llvm-svn: 86606
* Make the need-stub variables accurate and consistent. In the case ofJeffrey Yasskin2009-11-071-15/+13
| | | | | | | | | | | | | MachineRelocations, "stub" always refers to a far-call stub or a load-a-faraway-global stub, so this patch adds "Far" to the term. (Other stubs are used for lazy compilation and dlsym address replacement.) The variable was also inconsistent between the positive and negative sense, and the positive sense ("NeedStub") was more demanding than is accurate (since a nearby-enough function can be called directly even if the platform often requires a stub). Since the negative sense causes double-negatives, I switched to "MayNeedFarStub" globally. llvm-svn: 86363
* Give the JITResolver a direct pointer to its JITEmitter, and use that insteadJeffrey Yasskin2009-11-071-235/+234
| | | | | | | of going through the global TheJIT variable. This makes it easier to use features of JITEmitter that aren't in JITCodeEmitter for fixing PR5201. llvm-svn: 86305
* Fix MSVC build.Benjamin Kramer2009-10-291-0/+1
| | | | llvm-svn: 85505
* add interpreter support for indirect goto / blockaddress. The interpreterChris Lattner2009-10-291-0/+4
| | | | | | | now correctly runs clang's test/CodeGen/indirect-goto.c. The JIT will abort on it until someone feels compelled to implement this. llvm-svn: 85488
OpenPOWER on IntegriCloud