summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix Makefile buildDavid Blaikie2015-02-231-1/+1
| | | | llvm-svn: 230197
* [orc] Add a trivial unit test to get the ball rollingDavid Blaikie2015-02-235-1/+60
| | | | | | | | | I made my best guess at the Makefile, since I don't have a make build. I'm not sure if it should be valid to add an empty list of things, but it seemed the sort of degenerate case. llvm-svn: 230196
* [CMake] Add RuntimeDyld to libdeps corresponding to r229343.NAKAMURA Takumi2015-02-162-0/+2
| | | | llvm-svn: 229351
* Revert r227247 and r227228: "Add weak symbol support to RuntimeDyld".Lang Hames2015-01-284-63/+1
| | | | | | | | | This has wider implications than I expected when I reviewed the patch: It can cause JIT crashes where clients have used the default value for AbortOnFailure during symbol lookup. I'm currently investigating alternative approaches and I hope to have this back in tree soon. llvm-svn: 227287
* [ExecutionEngine] Fix r227228 tests on WindowsKeno Fischer2015-01-271-0/+1
| | | | | | | On Windows, we're running MCJIT with ELF, so the module needs to have its Triple explicitly adjusted. llvm-svn: 227247
* [ExecutionEngine] Add weak symbol support to RuntimeDyldKeno Fischer2015-01-274-1/+62
| | | | | | | | | | | Support weak symbols by first looking up if there is an externally visible symbol we can find, and only if that fails using the one in the object file we're loading. Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6950 llvm-svn: 227228
* [ExecutionEngine] FindFunctionNamed: Skip declarationsKeno Fischer2015-01-271-0/+19
| | | | | | | | | | | | | | | | Summary: Basically all other methods that look up functions by name skip them if they are mere declarations. Do the same in FindFunctionNamed. Reviewers: lhames Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7068 llvm-svn: 227227
* Fix the C-API MCJIT test for 32-bit big endian machines.Vasileios Kalintiris2015-01-151-12/+6
| | | | | | | | | | Avoid using unions for storing the return value from LLVMGetGlobalValueAddress() and LLVMGetFunctionAddress() and accessing it as a pointer through another pointer member. This causes problems on 32-bit big endian machines since the pointer gets the higher part of the return value of the aforementioned functions. llvm-svn: 226170
* [C API] Expose LLVMGetGlobalValueAddress and LLVMGetFunctionAddress.Peter Zotov2014-12-221-0/+38
| | | | | | Patch by Ramkumar Ramachandra <artagnon@gmail.com> llvm-svn: 224720
* [MCJIT] Unique-ptrify the RTDyldMemoryManager member of MCJIT. NFC.Lang Hames2014-12-032-4/+4
| | | | llvm-svn: 223183
* [MCJIT] Make repeat calls to MCJIT::getPointerToFunction for declarations safe.Lang Hames2014-10-222-0/+21
| | | | | | | | | | | | | | MCJIT::getPointerForFunction adds the resulting address to the global mapping. This should be done via updateGlobalMapping rather than addGlobalMapping, since the latter asserts if a mapping already exists. MCJIT::getPointerToFunction is actually deprecated - hopefully we can remove it (or more likely re-task it) entirely soon. In the mean time it should at least work as advertised. <rdar://problem/18727946> llvm-svn: 220444
* Adds 'override' to overriding methods. NFC.Argyrios Kyrtzidis2014-10-011-1/+1
| | | | llvm-svn: 218815
* [MCJIT] Turn the getSymbolAddress free function created in r218626 into a staticLang Hames2014-10-011-3/+6
| | | | | | | | | | | member of RTDyldMemoryManager (and rename to getSymbolAddressInProcess). The functionality this provides is very specific to RTDyldMemoryManager, so it makes sense to keep it in that class to avoid accidental re-use. No functional change. llvm-svn: 218741
* Unit test r218187, changing RTDyldMemoryManager::getSymbolAddress's behavior ↵David Blaikie2014-09-291-0/+30
| | | | | | | | | | | favor mangled lookup over unmangled lookup. The contract of this function seems problematic (fallback in either direction seems like it could produce bugs in one client or another), but here's some tests for its current behavior, at least. See the commit/review thread of r218187 for more discussion. llvm-svn: 218626
* Rework r218304, "ExecutionEngineTests: Call llvm_shutdown() on exit for ↵NAKAMURA Takumi2014-09-231-2/+3
| | | | | | | | ManagedStatic introduced in r218151." r218304 caused crash on msvc builder. llvm-svn: 218308
* ExecutionEngineTests: Call llvm_shutdown() on exit for ManagedStatic ↵NAKAMURA Takumi2014-09-231-0/+3
| | | | | | introduced in r218151. llvm-svn: 218304
* Reinstate "Nuke the old JIT."Eric Christopher2014-09-0217-2069/+3
| | | | | | | | Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
* Return a std::unique_ptr when creating a new MemoryBuffer.Rafael Espindola2014-08-272-7/+6
| | | | llvm-svn: 216583
* Pass a std::unique_ptr<MemoryBuffer>& to getLazyBitcodeModule.Rafael Espindola2014-08-261-3/+2
| | | | | | | By taking a reference we can do the ownership transfer in one place instead of expecting every caller to do it. llvm-svn: 216492
* IntelJITEventListener updates to fix breaks by recent changes to ↵Elena Demikhovsky2014-08-211-1/+1
| | | | | | | | EngineBuilder and DIContext. By Arch Robison. llvm-svn: 216159
* BumpPtrAllocator: don't accept 0 for the alignment parameterHans Wennborg2014-08-191-1/+1
| | | | | | | | It seems unnecessary to have to use an extra branch to check for this special case. http://reviews.llvm.org/D4945 llvm-svn: 216036
* Don't own the buffer in object::Binary.Rafael Espindola2014-08-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Owning the buffer is somewhat inflexible. Some Binaries have sub Binaries (like Archive) and we had to create dummy buffers just to handle that. It is also a bad fit for IRObjectFile where the Module wants to own the buffer too. Keeping this ownership would make supporting IR inside native objects particularly painful. This patch focuses in lib/Object. If something elsewhere used to own an Binary, now it also owns a MemoryBuffer. This patch introduces a few new types. * MemoryBufferRef. This is just a pair of StringRefs for the data and name. This is to MemoryBuffer as StringRef is to std::string. * OwningBinary. A combination of Binary and a MemoryBuffer. This is needed for convenience functions that take a filename and return both the buffer and the Binary using that buffer. The C api now uses OwningBinary to avoid any change in semantics. I will start a new thread to see if we want to change it and how. llvm-svn: 216002
* Modernize the .ll parsing interface.Rafael Espindola2014-08-192-12/+9
| | | | | | | | | | * Use StringRef instead of std::string& * Return a std::unique_ptr<Module> instead of taking an optional module to write to (was not really used). * Use current comment style. * Use current naming convention. llvm-svn: 215989
* Make it explicit that ExecutionEngine takes ownership of the modules.Rafael Espindola2014-08-198-95/+97
| | | | llvm-svn: 215967
* Simplify memory ownership with std::unique_ptr.Rafael Espindola2014-08-131-14/+6
| | | | llvm-svn: 215567
* Simplify ownership with std::unique_ptr. NFC.Rafael Espindola2014-08-131-2/+3
| | | | llvm-svn: 215566
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-132-6/+6
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* ADT: remove MinGW32 and Cygwin OSType enumSaleem Abdulrasool2014-08-092-3/+0
| | | | | | | | | | | Remove the MinGW32 and Cygwin types from the OSType enumeration. These values are represented via environments of Windows. It is a source of confusion and needlessly clutters the code. The cost of doing this is that we must sink the check for them into the normalization code path along with the spelling. Addresses PR20592. llvm-svn: 215303
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-0717-3/+2072
| | | | | | | | | | | be deleted. This will be reapplied as soon as possible and before the 3.6 branch date at any rate. Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reverts commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 215154
* fix configure+make buildRafael Espindola2014-08-072-2/+2
| | | | llvm-svn: 215116
* Nuke the old JIT.Rafael Espindola2014-08-0715-2070/+1
| | | | | | | | | I am sure we will be finding bits and pieces of dead code for years to come, but this is a good start. Thanks to Lang Hames for making MCJIT a good replacement! llvm-svn: 215111
* [CMake] Update libdeps.NAKAMURA Takumi2014-07-143-0/+3
| | | | llvm-svn: 212920
* Revert "Introduce a string_ostream string builder facilty"Alp Toker2014-06-261-6/+7
| | | | | | Temporarily back out commits r211749, r211752 and r211754. llvm-svn: 211814
* Introduce a string_ostream string builder faciltyAlp Toker2014-06-261-7/+6
| | | | | | | | | | | | | | | | | | | | string_ostream is a safe and efficient string builder that combines opaque stack storage with a built-in ostream interface. small_string_ostream<bytes> additionally permits an explicit stack storage size other than the default 128 bytes to be provided. Beyond that, storage is transferred to the heap. This convenient class can be used in most places an std::string+raw_string_ostream pair or SmallString<>+raw_svector_ostream pair would previously have been used, in order to guarantee consistent access without byte truncation. The patch also converts much of LLVM to use the new facility. These changes include several probable bug fixes for truncated output, a programming error that's no longer possible with the new interface. llvm-svn: 211749
* Remove the last uses of 'using std::error_code'Rafael Espindola2014-06-131-2/+1
| | | | | | This finishes the transition to std::error_code. llvm-svn: 210877
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* [C++11] Use 'nullptr'.Craig Topper2014-06-088-70/+70
| | | | llvm-svn: 210442
* Fix build when no native target is enabledAlp Toker2014-06-081-3/+4
| | | | | | | The JITTests and MCJITTests unit test targets require a native arch with JIT support, otherwise fail to link. llvm-svn: 210411
* Add C API for thread yielding callback.Juergen Ributzka2014-05-161-0/+27
| | | | | | | | | | | | | | | | | | | | | Sometimes a LLVM compilation may take more time then a client would like to wait for. The problem is that it is not possible to safely suspend the LLVM thread from the outside. When the timing is bad it might be possible that the LLVM thread holds a global mutex and this would block any progress in any other thread. This commit adds a new yield callback function that can be registered with a context. LLVM will try to yield by calling this callback function, but there is no guaranteed frequency. LLVM will only do so if it can guarantee that suspending the thread won't block any forward progress in other LLVM contexts in the same process. Once the client receives the call back it can suspend the thread safely and resume it at another time. Related to <rdar://problem/16728690> llvm-svn: 208945
* Revert "[PM] Add pass run listeners to the pass manager."Juergen Ributzka2014-05-151-28/+0
| | | | | | | Revert the current implementation and C API. New implementation and C APIs are in the works. llvm-svn: 208904
* Replace a virtual with an override.Rafael Espindola2014-05-071-2/+2
| | | | llvm-svn: 208242
* [PM] Add pass run listeners to the pass manager.Juergen Ributzka2014-04-281-0/+28
| | | | | | | | | | | | | | | | | | This commit provides the necessary C/C++ APIs and infastructure to enable fine- grain progress report and safe suspension points after each pass in the pass manager. Clients can provide a callback function to the pass manager to call after each pass. This can be used in a variety of ways (progress report, dumping of IR between passes, safe suspension of threads, etc). The run listener list is maintained in the LLVMContext, which allows a multi- threaded client to be only informed for it's own thread. This of course assumes that the client created a LLVMContext for each thread. This fixes <rdar://problem/16728690> llvm-svn: 207430
* Changes in IntelJITEventListener - By Arch RobinsonElena Demikhovsky2014-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - take->release: LLVM has moved to C++11. MockWrapper became an instance of unique_ptr. - method symbol_iterator::increment disappeared recently, in this revision: r200442 | rafael | 2014-01-29 20:49:50 -0600 (Wed, 29 Jan 2014) | 9 lines Simplify the handling of iterators in ObjectFile. None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. My change mimics the change that the revision made to lib/DebugInfo/DWARFContext.cpp . - const_cast: Shut up a warning from gcc. I ran unittests/ExecutionEngine/JIT/Debug+Asserts/JITTests to make sure it worked. - Arch llvm-svn: 205689
* MCJIT: ensure that cygwin is identified properlySaleem Abdulrasool2014-03-313-2/+12
| | | | | | | Cygwin is now a proper environment rather than an OS. This updates the MCJIT tests to avoid execution on Cygwin. This fixes native cygwin tests. llvm-svn: 205266
* MultiJITTest.cpp: Tweak getPointerToNamedFunction() to be aware of also ↵NAKAMURA Takumi2014-03-111-0/+8
| | | | | | | | | | | | Windows x64. In import thunk, jmp is: - On x86, 0xFF 0x25 [disp32]. - On x64, 0xFF 0x25 [pcrel32]. See also my r144178. llvm-svn: 203523
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-0610-87/+77
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [Layering] Move DebugInfo.h into the IR library where its implementationChandler Carruth2014-03-061-1/+1
| | | | | | already lives. llvm-svn: 203046
* [Layering] Move DIBuilder.h into the IR library where its implementationChandler Carruth2014-03-061-1/+1
| | | | | | already lives. llvm-svn: 203038
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-053-41/+41
| | | | llvm-svn: 202957
* [cleanup] Re-sort all the includes with utils/sort_includes.py.Chandler Carruth2014-03-041-2/+2
| | | | llvm-svn: 202811
OpenPOWER on IntegriCloud