summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Disable old JIT unittests for AARch64Renato Golin2014-02-253-5/+7
| | | | llvm-svn: 202127
* Disable an MCJIT test on older Darwins until we have a better interface.Andrew Trick2014-02-241-0/+4
| | | | | | | | See <rdar://16149106> [MCJIT] provide a platform-independent way to communicate callee-save frame info. <rdar://16149279> [MCJIT] get the host OS version from a runtime check, not a configure-time check. llvm-svn: 202082
* This test was failing on non-X86-64 platforms because stackmaps only work on ↵Filip Pizlo2014-02-211-0/+9
| | | | | | | | X86-64. Disable it on non-X86-64 platforms and add a comment. llvm-svn: 201838
* Stackmaps are used for OSR exits, which is a custom kind of unwinding. ↵Filip Pizlo2014-02-203-1/+92
| | | | | | | | | | | | | | | | | Hence, they should not be marked nounwind. Marking them nounwind caused crashes in the WebKit FTL JIT, because if we enable sufficient optimizations, LLVM starts eliding compact_unwind sections (or any unwind data for that matter), making deoptimization via stackmaps impossible. This changes the stackmap intrinsic to be may-throw, adds a test for exactly the sympton that WebKit saw, and fixes TableGen to handle un-attributed intrinsics. Thanks to atrick and philipreames for reviewing this. llvm-svn: 201826
* Remove tautological test line (unsigneds are always >=0).Lang Hames2014-02-151-1/+0
| | | | llvm-svn: 201451
* Fix misleading comment.Lang Hames2014-02-131-1/+1
| | | | llvm-svn: 201279
* The new MCJIT C-API unit test is generating objects without constant dataLang Hames2014-02-131-1/+1
| | | | | | | sections, at least on MachO. Relax expectations to keep the bots green while I investigate. llvm-svn: 201277
* Extend RTDyld API to enable optionally precomputing the total amount of memoryLang Hames2014-02-121-1/+132
| | | | | | | | | | | | | | | | | | required for all sections in a module. This can be useful when targets or code-models place strict requirements on how sections must be laid out in memory. If RTDyldMemoryManger::needsToReserveAllocationSpace() is overridden to return true then the JIT will call the following method on the memory manager, which can be used to preallocate the necessary memory. void RTDyldMemoryManager::reserveAllocationSpace(uintptr_t CodeSize, uintptr_t DataSizeRO, uintptr_t DataSizeRW) Patch by Vaidas Gasiunas. Thanks very much Viadas! llvm-svn: 201259
* Update getLazyBitcodeModule to use ErrorOr for error handling.Rafael Espindola2014-01-131-4/+5
| | | | llvm-svn: 199125
* Move the LLVM IR asm writer header files into the IR directory, as theyChandler Carruth2014-01-072-2/+2
| | | | | | | | | | | | | | | | | are part of the core IR library in order to support dumping and other basic functionality. Rename the 'Assembly' include directory to 'AsmParser' to match the library name and the only functionality left their -- printing has been in the core IR library for quite some time. Update all of the #includes to match. All of this started because I wanted to have the layering in good shape before I started adding support for printing LLVM IR using the new pass infrastructure, and commandline support for the new pass infrastructure. llvm-svn: 198688
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-073-3/+3
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* Port r198087 and r198089 (strip dead code by default) from make to cmake.Nico Weber2013-12-301-0/+3
| | | | llvm-svn: 198198
* Attempt to fix JIT unit tests after r198087.Nico Weber2013-12-271-0/+3
| | | | llvm-svn: 198089
* Remove some dead codeRichard Barton2013-12-121-2/+0
| | | | llvm-svn: 197144
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-103-9/+19
| | | | llvm-svn: 196908
* Add JIT to LINK_COMPONENTS in MCJITTests/Makefile.NAKAMURA Takumi2013-12-101-1/+1
| | | | llvm-svn: 196907
OpenPOWER on IntegriCloud