summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/JIT
Commit message (Collapse)AuthorAgeFilesLines
* Reinstate "Nuke the old JIT."Eric Christopher2014-09-0210-2060/+0
| | | | | | | | 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-271-3/+3
| | | | 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
* 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-193-47/+48
| | | | llvm-svn: 215967
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-0710-0/+2063
| | | | | | | | | | | 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
* Nuke the old JIT.Rafael Espindola2014-08-0710-2063/+0
| | | | | | | | | 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-141-0/+1
| | | | 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-083-26/+26
| | | | llvm-svn: 210442
* Replace a virtual with an override.Rafael Espindola2014-05-071-2/+2
| | | | llvm-svn: 208242
* 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
* 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-065-39/+39
| | | | | | | | | | 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
* Disable old JIT unittests for AARch64Renato Golin2014-02-253-5/+7
| | | | llvm-svn: 202127
* 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
* 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-101-4/+7
| | | | llvm-svn: 196908
* 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
* This threads SectionName through the allocateCodeSection/allocateDataSection ↵Filip Pizlo2013-10-022-11/+15
| | | | | | | | | | | | | | | | | | 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
* 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
* 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
* 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
* Partially revert change in r181200 that tried to simplify JIT unit test #ifdefs.Bob Wilson2013-05-201-3/+25
| | | | | | | | | | | | | | The export list for this test requires the following symbols to be available: JITTest_AvailableExternallyFunction JITTest_AvailableExternallyGlobal The change in r181200 commented them out, which caused the test to fail to link, at least on Darwin. I have only reverted the change for arm, since I can't test the other targets and since it sounds like that change was fixing real problems for those other targets. It should be possible to rearrange the code to keep those definitions outside the #ifdefs, but that should be done by someone who can reproduce the problems that r181200 was trying to fix. llvm-svn: 182233
* Minor changes to the MCJITTest unittests to use the correct API for finalizingDavid Tweed2013-05-171-1/+1
| | | | | | | the JIT object (including XFAIL an ARM test that now needs fixing). Also renames internal function for consistency. llvm-svn: 182085
* Remove exception handling support from the old JIT.Rafael Espindola2013-05-071-110/+0
| | | | llvm-svn: 181354
* [SystemZ] Set up JIT/MCJIT test casesUlrich Weigand2013-05-063-6/+9
| | | | | | | | | | | This patch adds the necessary configuration bits and #ifdef's to set up the JIT/MCJIT test cases for SystemZ. Like other recent targets, we do fully support MCJIT, but do not support the old JIT at all. Set up the lit config files accordingly, and disable old-JIT unit tests. Patch by Richard Sandiford. llvm-svn: 181207
* Simplify JIT unit test #ifdefsUlrich Weigand2013-05-062-28/+10
| | | | | | | | | | | | | | | | | | | Several platforms need to disable all old-JIT unit tests, since they only support the new MCJIT. This currently done via #ifdef'ing out those tests in the ExecutionEngine/JIT/*.cpp files. As those #ifdef's have grown historically, we now have a number of repeated directives which -in total- cover nearly the whole file, but leave a couple of helper functions out. When building the tests with clang itself, those helper functions now cause spurious "unused function" warnings. To fix those warnings, and also to remove the duplicate #ifdef conditions and make it easier to disable the tests for a new target, this patch consolidates the #ifdefs into a single one per file, which covers all the tests including all helper routines. Tested on PowerPC and SystemZ. llvm-svn: 181200
* Explicitly add -Wl,--export-all-symbols on mingw/cygwin.Rafael Espindola2013-04-041-0/+3
| | | | | | | Looks like cmake on windows is not expanding ENABLE_EXPORTS to -Wl,--export-all-symbols on mingw or cygwin, so add this back. llvm-svn: 178730
* Don't export symbols in every binary on linux.Rafael Espindola2013-04-041-3/+1
| | | | | | | | | | | | On freebsd this makes sure that symbols are exported on the binaries that need them. The net result is that we should get symbols in the binaries that need them on every platform. On linux x86-64 this reduces the size of the bin directory from 262MB to 250MB. Patch by Stephen Checkoway. llvm-svn: 178725
* Add support for source and line information to IntelJITEventListener for ↵Andrew Kaylor2013-01-282-1/+3
| | | | | | object emitted by MCJIT. llvm-svn: 173712
* Fix bug in exception table allocation (PR13678)Eli Bendersky2013-01-111-3/+50
| | | | | | Patch by Michael Muller. llvm-svn: 172214
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-025-26/+26
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Sort the #include lines for unittest/...Chandler Carruth2012-12-046-32/+27
| | | | llvm-svn: 169250
* Interface changes to allow RuntimeDyld memory managers to set memory ↵Andrew Kaylor2012-11-151-2/+3
| | | | | | permissions after an object has been loaded. llvm-svn: 168114
* Disable all old-JIT unit tests on PowerPC.Ulrich Weigand2012-10-312-21/+22
| | | | | | | | These tests were all failing since the old JIT doesn't work for PowerPC (any more), and there are no plans to attempt to fix it again (instead, work focuses on MCJIT). llvm-svn: 167133
* Use an export list when building JIT unittests. <rdar://problem/12473675>Bob Wilson2012-10-181-0/+7
| | | | | | | | | When building with LTO, the internalize pass is hiding some global symbols that are necessary for the JIT unittests. It seems like that may be a bug in LTO to do that by default, but until that gets fixed, this change makes sure that we export the necessary symbols for the tests to pass. llvm-svn: 166220
* Marked this variable as 'used' so that LTO doesn't get rid of it.Bill Wendling2012-10-171-1/+1
| | | | llvm-svn: 166092
OpenPOWER on IntegriCloud