summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* [weak vtables] Place class definitions into anonymous namespaces to prevent ↵Juergen Ributzka2013-11-193-28/+15
| | | | | | | | | | weak vtables. This patch places class definitions in implementation files into anonymous namespaces to prevent weak vtables. This eliminates the need of providing an out-of-line definition to pin the vtable explicitly to the file. llvm-svn: 195092
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-193-12/+24
| | | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 195064
* Revert r194865 and r194874.Alexey Samsonov2013-11-183-22/+12
| | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-153-12/+22
| | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
* Removing unnecessary link component for MCJIT unittestsAndrew Kaylor2013-10-212-2/+1
| | | | llvm-svn: 193125
* Assert on duplicate registration. Don't depend on function pointer equality.Rafael Espindola2013-10-161-12/+0
| | | | | | | | | | | | | | | | | | | | Before this patch we would assert when building llvm as multiple shared libraries (cmake's BUILD_SHARED_LIBS). The problem was the line if (T.AsmStreamerCtorFn == Target::createDefaultAsmStreamer) which returns false because of -fvisibility-inlines-hidden. It is easy to fix just this one case, but I decided to try to also make the registration more strict. It looks like the old logic for ignoring followup registration was just a temporary hack that outlived its usefulness. This patch converts the ifs to asserts, fixes the few cases that were registering twice and makes sure all the asserts compare with null. Thanks for Joerg for reporting the problem and reviewing the patch. llvm-svn: 192803
* MCJIT: skip some more new multi-module tests on unsupported platforms.Tim Northover2013-10-021-0/+8
| | | | | | This should fix the i386 Darwin build-bot. llvm-svn: 191840
* This threads SectionName through the allocateCodeSection/allocateDataSection ↵Filip Pizlo2013-10-024-26/+32
| | | | | | | | | | | | | | | | | | APIs, both in C++ and C land. It's useful for the memory managers that are allocating a section to know what the name of the section is. At a minimum, this is useful for low-level debugging - it's customary for JITs to be able to tell you what memory they allocated, and as part of any such dump, they should be able to tell you some meta-data about what each allocation is for. This allows clients that supply their own memory managers to do this. Additionally, we also envision the SectionName being useful for passing meta-data from within LLVM to an LLVM client. This changes both the C and C++ APIs, and all of the clients of those APIs within LLVM. I'm assuming that it's safe to change the C++ API because that API is allowed to change. I'm assuming that it's safe to change the C API because we haven't shipped the API in a release yet (LLVM 3.3 doesn't include the MCJIT memory management C API). llvm-svn: 191804
* Tests for MCJIT multiple module supportAndrew Kaylor2013-10-014-75/+556
| | | | llvm-svn: 191723
* Revert "[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc."Rafael Espindola2013-07-261-2/+1
| | | | | | This reverts commit r187248. It broke many bots. llvm-svn: 187254
* [PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc.Bill Schmidt2013-07-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Both GCC and LLVM will implicitly define __ppc__ and __powerpc__ for all PowerPC targets, whether 32- or 64-bit. They will both implicitly define __ppc64__ and __powerpc64__ for 64-bit PowerPC targets, and not for 32-bit targets. We cannot be sure that all other possible compilers used to compile Clang/LLVM define both __ppc__ and __powerpc__, for example, so it is best to check for both when relying on either inside the Clang/LLVM code base. This patch makes sure we always check for both variants. In addition, it fixes one unnecessary check in lib/Target/PowerPC/PPCJITInfo.cpp. (At least one of __ppc__ and __powerpc__ should always be defined when compiling for a PowerPC target, no matter which compiler is used, so testing for them is unnecessary.) There are some places in the compiler that check for other variants, like __POWERPC__ and _POWER, and I have left those in place. There is no need to add them elsewhere. This seems to be in Apple-specific code, and I won't take a chance on breaking it. There is no intended change in behavior; thus, no test cases are added. llvm-svn: 187248
* [mips] Use pristine object file while processing relocations.Akira Hatanaka2013-07-241-0/+2
| | | | | | | | | | | | | | | | | | | Similar to ARM change r182800, dynamic linker will read bits/addends from the original object rather than from the object that might have been patched previously. For the purpose of relocations for MCJIT stubs on MIPS, we internally use otherwise unused MIPS relocations. The change also enables MCJIT unit tests for MIPS (EL/BE), and the following two tests now pass: - MCJITTest.return_global and - MCJITTest.multiple_functions. These issues have been tracked as Bug 16250. Patch by Petar Jovanovic. llvm-svn: 187019
* Convert Windows to Unix line endings, no functionality change.Stephen Lin2013-07-131-172/+172
| | | | llvm-svn: 186264
* Use SmallVectorImpl::iterator/const_iterator instead of SmallVector to avoid ↵Craig Topper2013-07-041-1/+1
| | | | | | specifying the vector size. llvm-svn: 185606
* Fix -Wsign-compare warning and remove windows-style line endings introduced ↵David Blaikie2013-07-021-17/+17
| | | | | | by r185421 llvm-svn: 185443
* Fixed alignment of code sections in the JIT mode. Added a test to the ↵Elena Demikhovsky2013-07-021-0/+23
| | | | | | JITMemoryManager. llvm-svn: 185421
* Revising the MCJIT ObjectCache interface to allow subclasses to avoid ↵Andrew Kaylor2013-06-281-7/+10
| | | | | | retaining references to returned objects llvm-svn: 185221
* Adding tests for DebugIR passDaniel Malea2013-06-281-34/+43
| | | | | | | | | | - lit tests verify that each line of input LLVM IR gets a !dbg node and a corresponding entry of metadata that contains the line number - unit tests verify that DebugIR works as advertised in the interface - refactored some useful IR generation functionality from the MCJIT unit tests so it can be reused llvm-svn: 185212
* [mips] Remove Triple:mips from SupportedArchs in MCJIT unittestsAkira Hatanaka2013-06-201-1/+0
| | | | | | | | | | | | | | MIPS does not handle multiple relocations correctly, so two tests from the unittests are expected to fail. These are: - MCJITTest.return_global and - MCJITTest.multiple_functions. Until the multiple relocations are fixed, XFAIL the MCJIT unittests for MIPS. This issue is tracked as Bug 16250. Patch by Petar Jovanovic. llvm-svn: 184461
* Remove unused member.Rafael Espindola2013-05-301-1/+0
| | | | llvm-svn: 182958
* Expose the RTDyldMemoryManager through the C API. This allows clients of Filip Pizlo2013-05-221-38/+125
| | | | | | | | the C API to provide their own way of allocating JIT memory (both code and data) and finalizing memory permissions (page protections, cache flush). llvm-svn: 182448
* Roll out r182407 and r182408 because they broke builds.Filip Pizlo2013-05-211-125/+38
| | | | llvm-svn: 182409
* Expose the RTDyldMemoryManager through the C API. This allows clients of Filip Pizlo2013-05-211-38/+125
| | | | | | | | the C API to provide their own way of allocating JIT memory (both code and data) and finalizing memory permissions (page protections, cache flush). llvm-svn: 182408
* Alternative fix for problem addressed in r182233Ulrich Weigand2013-05-211-42/+19
| | | | | | | | | | | | | | | | | Revision r182233 partially reverted the change in r181200 to simplify JIT unif test #ifdefs, because that change caused a link error on some host operating systems where the export list requires the following symbols to be defined: JITTest_AvailableExternallyFunction JITTest_AvailableExternallyGlobal As discussed on the list, the commit reverts r182233 (and re-installs the full r181200 change), and instead fixes the link problem by moving those two symbols to the top of the file and unconditionally defining them. llvm-svn: 182367
OpenPOWER on IntegriCloud