summaryrefslogtreecommitdiffstats
path: root/llvm/unittests/ExecutionEngine/JIT/JITTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Reinstate "Nuke the old JIT."Eric Christopher2014-09-021-730/+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
* Modernize the .ll parsing interface.Rafael Espindola2014-08-191-10/+8
| | | | | | | | | | * 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-191-9/+14
| | | | llvm-svn: 215967
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-071-0/+728
| | | | | | | | | | | 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-071-728/+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
* 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-081-7/+7
| | | | llvm-svn: 210442
* Replace a virtual with an override.Rafael Espindola2014-05-071-2/+2
| | | | llvm-svn: 208242
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-061-12/+14
| | | | | | | | | | 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
* Disable old JIT unittests for AARch64Renato Golin2014-02-251-3/+4
| | | | 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-071-1/+1
| | | | | | | | | | | | | | | | | 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
* 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-021-6/+10
| | | | | | | | | | | | | | | | | | 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
* 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-061-3/+3
| | | | | | | | | | | 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-061-25/+7
| | | | | | | | | | | | | | | | | | | 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
* 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-021-12/+12
| | | | | | | | | | | | | | | | | | | | | 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-041-9/+8
| | | | 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-311-18/+19
| | | | | | | | 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
* Marked this variable as 'used' so that LTO doesn't get rid of it.Bill Wendling2012-10-171-1/+1
| | | | llvm-svn: 166092
* JITTest.cpp: Use LLVM_ATTRIBUTE_USED, rather than __attribute__ directly!NAKAMURA Takumi2012-10-121-1/+1
| | | | llvm-svn: 165790
* Mark function as 'used' so that LTO doesn't try to get rid of it.Bill Wendling2012-10-121-0/+1
| | | | llvm-svn: 165781
* Revert r165777, "Mark function as 'used' so that LTO doesn't try to get rid ↵NAKAMURA Takumi2012-10-121-1/+1
| | | | | | of it." llvm-svn: 165780
* Mark function as 'used' so that LTO doesn't try to get rid of it.Bill Wendling2012-10-121-1/+1
| | | | llvm-svn: 165777
* Some regression tests which are testing the old jit and are exercising ↵James Molloy2012-10-081-1/+14
| | | | | | | | functionality which is both known to be broken and not expected to be fixed in the old jit. To remove these from the regression test output, I've marked them XFAIL (for lit tests) and ifdef'd them out (unit tests). These modifications remove the last long-standing regression test failures from the buildbots (though updating the triple to reflect new ubuntu configuration has temporarily caused some new failures). Tested on x86-64 and ARM Linux. Patch by David Tweed! llvm-svn: 165390
* Implement MipsJITInfo::replaceMachineCodeForFunction.Akira Hatanaka2012-08-011-2/+2
| | | | | | | | | | No new test case is added. This patch makes test JITTest.FunctionIsRecompiledAndRelinked pass on mips platform. Patch by Petar Jovanovic. llvm-svn: 161098
* Move llvm/Support/TypeBuilder.h -> llvm/TypeBuilder.h. This completesChandler Carruth2012-07-151-1/+1
| | | | | | | | | | | | the move of *Builder classes into the Core library. No uses of this builder in Clang or DragonEgg I could find. If there is a desire to have an IR-building-support library that contains all of these builders, that can be easily added, but currently it seems likely that these add no real overhead to VMCore. llvm-svn: 160243
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-291-10/+10
| | | | | | | | | | | | | | | | | This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. llvm-svn: 159421
* Disable JITTest.FunctionIsRecompiledAndRelinked and JITTest.NoStubsSimon Atanasyan2012-05-161-6/+8
| | | | | | on MIPS where they are not implemented. llvm-svn: 156935
* Move getPointerToNamedFunction() from JIT/MCJIT to JITMemoryManager.Danil Malyshev2012-03-281-0/+4
| | | | llvm-svn: 153607
* Revert a series of commits to MCJIT to get the build working in CMakeChandler Carruth2012-03-221-4/+0
| | | | | | | | | | | | | | | (and hopefully on Windows). The bots have been down most of the day because of this, and it's not clear to me what all will be required to fix it. The commits started with r153205, then r153207, r153208, and r153221. The first commit seems to be the real culprit, but I couldn't revert a smaller number of patches. When resubmitting, r153207 and r153208 should be folded into r153205, they were simple build fixes. llvm-svn: 153241
* Based on this discussion: ↵Danil Malyshev2012-03-211-0/+4
| | | | | | | | | http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120305/138477.html 1. Declare a virtual function getPointerToNamedFunction() in JITMemoryManager 2. Move the implementation of getPointerToNamedFunction() form JIT/MCJIT to DefaultJITMemoryManager. llvm-svn: 153205
* MCJIT support for non-function sections.Jim Grosbach2012-01-161-0/+8
| | | | | | | | | | | | | | | | Move to a by-section allocation and relocation scheme. This allows better support for sections which do not contain externally visible symbols. Flesh out the relocation address vs. local storage address separation a bit more as well. Remote process JITs use this to tell the relocation resolution code where the code will live when it executes. The startFunctionBody/endFunctionBody interfaces to the JIT and the memory manager are deprecated. They'll stick around for as long as the old JIT does, but the MCJIT doesn't use them anymore. llvm-svn: 148258
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-161-1/+1
| | | | | | | | | | | | | | | does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. llvm-svn: 142106
* Exclude more arm jit failures pending PR10783.Andrew Trick2011-09-031-3/+0
| | | | llvm-svn: 139074
* Excluding ARM JIT tests until someone can fix this compilation path.Andrew Trick2011-08-261-0/+9
| | | | llvm-svn: 138676
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-241-1/+1
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-6/+6
| | | | llvm-svn: 135375
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-121-2/+2
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
OpenPOWER on IntegriCloud