summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
* Replace DebugLocTuple with DILocation.Devang Patel2010-01-161-4/+5
| | | | llvm-svn: 93630
* Fix http://llvm.org/PR6028, an assertion failure when an UndefValue ofJay Foad2010-01-151-2/+16
| | | | | | integer type is used. llvm-svn: 93509
* "In order to ease automatic bindings generation, it would be helpful if ↵Chris Lattner2010-01-091-17/+17
| | | | | | | | boolean values were distinguishable from integers. The attached patch introduces "typedef int LLVMBool;", and uses LLVMBool instead of int throughout the C API, wherever a boolean value is called for." Patch by James Y Knight! llvm-svn: 93079
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-052-6/+4
| | | | 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-053-8/+5
| | | | | | dereference the type pointer. llvm-svn: 92726
* These should probably be errs().David Greene2010-01-051-3/+3
| | | | llvm-svn: 92673
* Change errs() to dbgs().David Greene2010-01-051-6/+6
| | | | llvm-svn: 92621
* Change errs() to dbgs().David Greene2010-01-051-3/+3
| | | | llvm-svn: 92618
* Change errs() to dbgs().David Greene2010-01-051-38/+38
| | | | llvm-svn: 92616
* 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
* Fix passing of float arguments through ffi.Nick Lewycky2009-11-181-1/+1
| | | | llvm-svn: 89198
* Add ability to set code model within the execution engine buildersEric Christopher2009-11-173-8/+15
| | | | | | and creation interfaces. llvm-svn: 89151
* Fail less mysteriously; inform the user that their LLVM was not built withNick Lewycky2009-11-171-0/+3
| | | | | | | libffi support and that the interpreter can't call external functions without it. Patch by Timo Juhani Lindfors! Fixes PR5466. llvm-svn: 89062
* 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-095-142/+8
| | | | llvm-svn: 86606
* Remove ByteswapSCANFResults, it is dead.Daniel Dunbar2009-11-081-76/+0
| | | | llvm-svn: 86458
* We don't need to byteswap, the interpreter assumes the program is runningNick Lewycky2009-11-081-8/+1
| | | | | | native anyways. This fixes a crash using %d and similar in a scanf statement. llvm-svn: 86440
* Fix the interpreter to not crash due to zeroext/signextNick Lewycky2009-11-081-10/+0
| | | | llvm-svn: 86428
* 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-294-13/+29
| | | | | | | 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
* Change the JIT to compile eagerly by default as agreed inJeffrey Yasskin2009-10-273-11/+11
| | | | | | | http://llvm.org/PR5184, and beef up the comments to describe what both options do and the risks of lazy compilation in the presence of threads. llvm-svn: 85295
* Fix OProfileJITEventListener after r85182.Jeffrey Yasskin2009-10-271-1/+1
| | | | llvm-svn: 85192
* Automatically do the equivalent of freeMachineCodeForFunction(F) when F isJeffrey Yasskin2009-10-274-21/+40
| | | | | | | | | | | | | being destroyed. This allows users to run global optimizations like globaldce even after some functions have been jitted. This patch also removes the Function* parameter to JITEventListener::NotifyFreeingMachineCode() since it can cause that to be called when the Function is partially destroyed. This change will be even more helpful later when I think we'll want to allow machine code to actually outlive its Function. llvm-svn: 85182
* Remove FreeInst.Victor Hernandez2009-10-262-9/+0
| | | | | | | Remove LowerAllocations pass. Update some more passes to treate free calls just like they were treating FreeInst. llvm-svn: 85176
* Move DataTypes.h to include/llvm/System, update all users. This breaks the lastChandler Carruth2009-10-262-2/+2
| | | | | | direct inclusion edge from System to Support. llvm-svn: 85086
* fix PR5186: the JIT shouldn't try to codegen available_externallyChris Lattner2009-10-251-1/+1
| | | | | | functions it should just look them up like declarations. llvm-svn: 85077
* Fix http://llvm.org/PR4822: allow module deletion after a function has beenJeffrey Yasskin2009-10-232-27/+63
| | | | | | | | | | | | | | compiled. When functions are compiled, they accumulate references in the JITResolver's stub maps. This patch removes those references when the functions are destroyed. It's illegal to destroy a Function when any thread may still try to call its machine code. This patch also updates r83987 to use ValueMap instead of explicit CallbackVHs and fixes a couple "do stuff inside assert()" bugs from r84522. llvm-svn: 84975
OpenPOWER on IntegriCloud