summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove dlsym stubs, with Nate Begeman's permission.Jeffrey Yasskin2009-11-091-1/+0
| | | | llvm-svn: 86606
* add interpreter support for indirect goto / blockaddress. The interpreterChris Lattner2009-10-291-1/+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
* Change the JIT to compile eagerly by default as agreed inJeffrey Yasskin2009-10-271-1/+1
| | | | | | | 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 http://llvm.org/PR4822: allow module deletion after a function has beenJeffrey Yasskin2009-10-231-18/+22
| | | | | | | | | | | | | | 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
* Make the ExecutionEngine automatically remove global mappings on when theirJeffrey Yasskin2009-10-131-30/+47
| | | | | | | GlobalValue is destroyed. Function destruction still leaks machine code and can crash on leaked stubs, but this is some progress. llvm-svn: 83987
* ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverseJeffrey Yasskin2009-10-091-16/+19
| | | | | | | mappings, which could cause errors and assert-failures. This patch fixes that, adds a test, and refactors the global-mapping-removal code into a single place. llvm-svn: 83678
* Introduce and use convenience methods for getting pointer typesDuncan Sands2009-10-061-1/+1
| | | | | | | where the element is of a basic builtin type. For example, to get an i8* use getInt8PtrTy. llvm-svn: 83379
* strength reduce a ton of type equality tests to check the typeid (ThroughChris Lattner2009-10-051-11/+11
| | | | | | | | the new predicates I added) instead of going through a context and doing a pointer comparison. Besides being cheaper, this allows a smart compiler to turn the if sequence into a switch. llvm-svn: 83297
* errorstr can be null, don't unconditionally set it. Only report thatChris Lattner2009-09-231-6/+9
| | | | | | | | "the jit has not been linked in" if the interpreter failed. This fixes a unit test failure. llvm-svn: 82601
* Make EngineBuilder return more error codes, by KS Sreeram.Chris Lattner2009-09-231-13/+22
| | | | llvm-svn: 82600
* just remove interpreter support for endianness mismatches. This wasChris Lattner2009-08-231-12/+0
| | | | | | | really old code from when we were running sparcv9 bc files on x86 (before I ported llvm-gcc 3 to work on x86) :) llvm-svn: 79871
* remove use of alloca.hChris Lattner2009-08-231-5/+7
| | | | llvm-svn: 79870
* remove a few DOUTs here and there.Chris Lattner2009-08-231-3/+3
| | | | llvm-svn: 79832
* remove the std::ostream version of module and type printing.Chris Lattner2009-08-231-2/+2
| | | | llvm-svn: 79823
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-131-20/+25
| | | | llvm-svn: 78948
* To catch bugs like the one fixed inJeffrey Yasskin2009-08-071-13/+18
| | | | | | | | | | | | | http://llvm.org/viewvc/llvm-project?view=rev&revision=78127, I'm changing the ExecutionEngine's global mappings to hold AssertingVH<const GlobalValue>. That way, if unregistering a mapping fails to actually unregister it, we'll get an assert. Running the jit nightly tests didn't uncover any actual instances of the problem. This also uncovered the fact that AssertingVH<const X> didn't work, so I fixed that too. llvm-svn: 78400
* Make ExecutionEngine::updateGlobalMapping(GV, NULL) properly remove GV's oldJeffrey Yasskin2009-08-041-1/+1
| | | | | | address from the reverse mapping, and add a test that this works now. llvm-svn: 78127
* Eliminate some uses of DOUT, cerr, and getNameStart().Daniel Dunbar2009-07-261-1/+2
| | | | llvm-svn: 77145
* Simplify / normalize some uses of Value::getName.Daniel Dunbar2009-07-211-1/+1
| | | | llvm-svn: 76553
* Add EngineBuilder to ExecutionEngine in favor of the five optional argument ↵Reid Kleckner2009-07-181-13/+52
| | | | | | | | EE::create(). Also a test commit. llvm-svn: 76276
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-9/+9
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-6/+6
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-19/+21
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Add an option to allocate JITed global data separately from code. ByJeffrey Yasskin2009-07-081-3/+4
| | | | | | | | | | | | | | default, this option is not enabled to support clients who rely on this behavior. Fixes http://llvm.org/PR4483 A patch to allocate additional memory for globals after we run out is forthcoming. Patch by Reid Kleckner! llvm-svn: 75059
* Introduce new error handling API.Torok Edwin2009-07-071-4/+4
| | | | | | | | This will replace exit()/abort() style error handling with an API that allows clients to register custom error handling hooks. The default is to call exit(1) when no error handler is provided. llvm-svn: 74922
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-9/+12
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Rename PaddedSize to AllocSize, in the hope that thisDuncan Sands2009-05-091-5/+5
| | | | | | | will make it more obvious what it represents, and stop it being confused with the StoreSize. llvm-svn: 71349
* Instead of passing in an unsigned value for the optimization level, use an enum,Bill Wendling2009-04-291-1/+1
| | | | | | | 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-291-3/+3
| | | | | | | an optimization level instead of a simple boolean telling it to generate code "fast" or the other type of "fast". llvm-svn: 70347
* 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
* Add support to the JIT for true non-lazy operation. When a call to a functionNate Begeman2009-02-181-0/+1
| | | | | | | | | | | | | | | | | | | | 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
* allow main to have any integer type.Chris Lattner2009-02-041-1/+1
| | | | llvm-svn: 63743
* Add support for deleting a module provider from a JIT in such a way that it ↵Nate Begeman2009-01-231-1/+19
| | | | | | does not cause the owned module to be fully materialized. llvm-svn: 62864
* rename methods in System/Host to be more consistent.Chris Lattner2009-01-221-4/+4
| | | | llvm-svn: 62776
* Add the private linkage.Rafael Espindola2009-01-151-2/+2
| | | | llvm-svn: 62279
* Rename getABITypeSize to getTypePaddedSize, asDuncan Sands2009-01-121-5/+5
| | | | | | suggested by Chris. llvm-svn: 62099
* More debug output.Evan Cheng2008-11-071-1/+1
| | | | llvm-svn: 58868
* Improve JIT debugging outputs format consistency.Evan Cheng2008-11-061-5/+4
| | | | llvm-svn: 58807
* Debugging output tweak.Evan Cheng2008-11-051-2/+2
| | | | llvm-svn: 58737
* 80 col violation.Evan Cheng2008-11-041-2/+2
| | | | llvm-svn: 58684
* Support for allocation of TLS variables in the JIT. Allocation of a globalNicolas Geoffray2008-10-251-12/+15
| | | | | | | | variable is moved to the execution engine. The JIT calls the TargetJITInfo to allocate thread local storage. Currently, only linux/x86 knows how to allocate thread local global variables. llvm-svn: 58142
* little optimization: reuse getPointerToGlobalIfAvailable(CGV) value in ↵Nuno Lopes2008-10-141-1/+1
| | | | | | emitGlobals() llvm-svn: 57484
* Add a "loses information" return value to APFloat::convertDale Johannesen2008-10-091-1/+2
| | | | | | | and APFloat::convertToInteger. Restore return value to IEEE754. Adjust all users accordingly. llvm-svn: 57329
* Rename APFloat::convertToAPInt to bitcastToAPInt toDale Johannesen2008-10-091-8/+8
| | | | | | | make it clearer what the function does. No functional change. llvm-svn: 57325
* Add runStaticConstructorsDestructors which runs ctors / dtors of a single ↵Evan Cheng2008-09-301-32/+40
| | | | | | module. Patch by David Chisnall. llvm-svn: 56849
* Add DisableGVCompilation which forces the JIT to assert when it tries to ↵Evan Cheng2008-09-241-0/+1
| | | | | | allocate space for a GlobalVariable. llvm-svn: 56557
* Preliminary support for systems which require changing JIT memory regions ↵Evan Cheng2008-09-181-1/+2
| | | | | | privilege from read / write to read / executable. llvm-svn: 56303
* Avoid a warning about isTargetNullPtr being unused in release builds.Dan Gohman2008-08-261-0/+2
| | | | llvm-svn: 55350
* Add new parameter Fast to createJIT to enable the fast codegen path.Evan Cheng2008-08-081-3/+4
| | | | llvm-svn: 54523
OpenPOWER on IntegriCloud