summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine/MCJIT
Commit message (Collapse)AuthorAgeFilesLines
* [RuntimeDyld, PowerPC] Fix check for external symbols when detecting ↵Ulrich Weigand2017-05-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | reloction overflow The PowerPC part of processRelocationRef currently assumes that external symbols can be identified by checking for SymType == SymbolRef::ST_Unknown. This is actually incorrect in some cases, causing relocation overflows to be mis-detected. The correct check is to test whether Value.SymbolName is null. Includes test case. Note that it is a bit tricky to replicate the exact condition that triggers the bug in a test case. The one included here seems to fail reliably (before the fix) across different operating system versions on Power, but it still makes a few assumptions (called out in the test case comments). Also add ppc64le platform name to the supported list in the lit.local.cfg files for the MCJIT and OrcMCJIT directories, since those tests were currently not run at all. Fixes PR32650. Reviewer: hfinkel Differential Revision: https://reviews.llvm.org/D33402 llvm-svn: 303637
* [RuntimeDyld] Move an X86 only test to the correct directory.Davide Italiano2016-11-021-8/+0
| | | | | | This is an attempt to placate the bots after r285841. llvm-svn: 285859
* [lli/COFF] Set the correct alignment for common symbolsDavide Italiano2016-11-021-0/+8
| | | | | | | | | | Otherwise we set it always to zero, which is not correct, and we assert inside alignTo (Assertion failed: Align != 0u && "Align can't be 0."). Differential Revision: https://reviews.llvm.org/D26173 llvm-svn: 285841
* Remove the JIT EH/small code model tests for now.Lang Hames2016-10-191-32/+0
| | | | | | | | | | | These tests rely on two sections being allocated with a limited displacement from one to the other to work. We've never guaranteed this, and consequently these tests usually fail. That led to them being XFAILed, but now they XPASS whenever the sections do happen to be allocated nearby in memory. So I'm removing these for now to get rid of the noise. We can re-instate them if/when we take the time to implement a displacement-respecting allocator. llvm-svn: 284654
* [RuntimeDyld] Revert r279182 and 279201 -- they broke some ARM bots.Lang Hames2016-08-195-5/+5
| | | | llvm-svn: 279275
* [RuntimeDyld][MCJIT] Un-XFAIL some tests that were fixed by r279182.Lang Hames2016-08-195-5/+5
| | | | llvm-svn: 279201
* [ExecutionEngine] Disable weak symbol tests for COFF.Lang Hames2016-08-092-2/+5
| | | | | | COFF doesn't support weak linkage on functions. llvm-svn: 278162
* Re-apply r278065 (Weak symbol support in RuntimeDyld) with a fix for ELF.Lang Hames2016-08-092-0/+35
| | | | llvm-svn: 278149
* Revert r278065 while I investigate some build-bot breakage.Lang Hames2016-08-082-35/+0
| | | | llvm-svn: 278069
* [RuntimeDyld][Orc][MCJIT] Add partial weak-symbol support to RuntimeDyld.Lang Hames2016-08-082-0/+35
| | | | | | | | | | | | | | | This patch causes RuntimeDyld to check for existing definitions when it encounters weak symbols. If a definition already exists then the new weak definition is discarded. All symbol lookups within a "logical dylib" should now agree on the address of any given weak symbol. This allows the JIT to better match the behavior of the static linker for C++ code. This support is only partial, as it does not allow strong definitions that occur after the first weak definition (in JIT symbol lookup order) to override the previous weak definitions. Support for this will be added in a future patch. llvm-svn: 278065
* [powerpc] mark JIT tests as UNSUPPORTED on powerpc64 big endianBill Seurer2016-04-2612-24/+36
| | | | | | | | | | | | | Some of the JIT tests began failing with "[llvm] r266663 - [Orc] Re-commit r266581 with fixes for MSVC, and format cleanups." on powerpc64 big endian. To get the buildbots running I am marking these as UNSUPPORTED for now. If this is fixed remove the UNSUPPORTED flag "powerpc64-unknown-linux-gnu". In r267516 I marked these as XFAIL but they succeed on some of the bots on stage1. llvm-svn: 267518
* [powerpc] mark JIT tests as XFAIL on powerpc64 big endianBill Seurer2016-04-2612-12/+24
| | | | | | | | | | Some of the JIT tests began failing with "[llvm] r266663 - [Orc] Re-commit r266581 with fixes for MSVC, and format cleanups." on powerpc64 big endian. To get the buildbots running I am marking these as XFAIL for now. If this is fixed remove the XFAIL flag "powerpc64-unknown-linux-gnu". llvm-svn: 267516
* Remove some stale comments and fix a typo as suggested by David Blaikie in hisLang Hames2016-01-171-1/+0
| | | | | | | | review of r257343. Thanks Dave! llvm-svn: 258002
* [Orc] Add support for EH-frame registration to the Orc Remote Target utilityLang Hames2016-01-141-0/+32
| | | | | | | | | classes. OrcRemoteTargetClient::RCMemoryManager will now register EH frames with the server automatically. This allows remote-execution of code that uses exceptions. llvm-svn: 257816
* Mark remote-JIT tests as XFAIL, as well as win32, for targeting mingw32.NAKAMURA Takumi2016-01-1411-11/+11
| | | | llvm-svn: 257732
* [Orc] XFAIL a few remote-jit test cases that I missed in r257391.Lang Hames2016-01-111-1/+1
| | | | llvm-svn: 257419
* XFAIL the LLI remote JIT tests on Win32.Lang Hames2016-01-1110-1/+10
| | | | llvm-svn: 257391
* Remove the remote-JIT small code model tests for now. They're causingLang Hames2016-01-112-24/+0
| | | | | | | | | intermittent XPASSes on some builders. These can be reinstated when we have proper support for small-code model in the JIT. llvm-svn: 257359
* XFAIL the remote small code model tests on x86. Small code model is not properlyLang Hames2016-01-112-2/+2
| | | | | | | supported, and only worked previously because we weren't really running them out-of-process. llvm-svn: 257355
* [LLI] Replace the LLI remote-JIT support with the new ORC remote-JIT components.Lang Hames2016-01-113-3/+4
| | | | | | | | The new ORC remote-JITing support provides a superset of the old code's functionality, so we can replace the old stuff. As a bonus, a couple of previously XFAILed tests have started passing. llvm-svn: 257343
* Un-XFAIL JIT EH tests under [am]san.Peter Collingbourne2015-12-154-4/+4
| | | | | | | | | | These tests started passing after libcxxabi's r255559, which fixed a problem relating to how libcxxabi links its EH library. The test failures were caused by an issue with libc++, not the sanitizers (confirmed by building a pre-r255559 revision with libc++/libc++abi and without sanitizers), so they should never have been XFAILed under the sanitizers. llvm-svn: 255708
* Move the personality function from LandingPadInst to FunctionDavid Majnemer2015-06-175-10/+10
| | | | | | | | | | | | | | | | | | | The personality routine currently lives in the LandingPadInst. This isn't desirable because: - All LandingPadInsts in the same function must have the same personality routine. This means that each LandingPadInst beyond the first has an operand which produces no additional information. - There is ongoing work to introduce EH IR constructs other than LandingPadInst. Moving the personality routine off of any one particular Instruction and onto the parent function seems a lot better than have N different places a personality function can sneak onto an exceptional function. Differential Revision: http://reviews.llvm.org/D10429 llvm-svn: 239940
* [Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6Petar Jovanovic2015-05-2811-11/+11
| | | | | | | | | | Add support for resolving MIPS64r2 and MIPS64r6 relocations in MCJIT. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D9667 llvm-svn: 238424
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-04-164-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the call instruction See r230786 and r230794 for similar changes to gep and load respectively. Call is a bit different because it often doesn't have a single explicit type - usually the type is deduced from the arguments, and just the return type is explicit. In those cases there's no need to change the IR. When that's not the case, the IR usually contains the pointer type of the first operand - but since typed pointers are going away, that representation is insufficient so I'm just stripping the "pointerness" of the explicit type away. This does make the IR a bit weird - it /sort of/ reads like the type of the first operand: "call void () %x(" but %x is actually of type "void ()*" and will eventually be just of type "ptr". But this seems not too bad and I don't think it would benefit from repeating the type ("void (), void () * %x(" and then eventually "void (), ptr %x(") as has been done with gep and load. This also has a side benefit: since the explicit type is no longer a pointer, there's no ambiguity between an explicit type and a function that returns a function pointer. Previously this case needed an explicit type (eg: a function returning a void() function was written as "call void () () * @x(" rather than "call void () * @x(" because of the ambiguity between a function returning a pointer to a void() function and a function returning void). No ambiguity means even function pointer return types can just be written alone, without writing the whole function's type. This leaves /only/ the varargs case where the explicit type is required. Given the special type syntax in call instructions, the regex-fu used for migration was a bit more involved in its own unique way (as every one of these is) so here it is. Use it in conjunction with the apply.sh script and associated find/xargs commands I've provided in rr230786 to migrate your out of tree tests. Do let me know if any of this doesn't cover your cases & we can iterate on a more general script/regexes to help others with out of tree tests. About 9 test cases couldn't be automatically migrated - half of those were functions returning function pointers, where I just had to manually delete the function argument types now that we didn't need an explicit function type there. The other half were typedefs of function types used in calls - just had to manually drop the * from those. import fileinput import sys import re pat = re.compile(r'((?:=|:|^|\s)call\s(?:[^@]*?))(\s*$|\s*(?:(?:\[\[[a-zA-Z0-9_]+\]\]|[@%](?:(")?[\\\?@a-zA-Z0-9_.]*?(?(3)"|)|{{.*}}))(?:\(|$)|undef|inttoptr|bitcast|null|asm).*$)') addrspace_end = re.compile(r"addrspace\(\d+\)\s*\*$") func_end = re.compile("(?:void.*|\)\s*)\*$") def conv(match, line): if not match or re.search(addrspace_end, match.group(1)) or not re.search(func_end, match.group(1)): return line return line[:match.start()] + match.group(1)[:match.group(1).rfind('*')].rstrip() + match.group(2) + line[match.end():] for line in sys.stdin: sys.stdout.write(conv(re.search(pat, line), line)) llvm-svn: 235145
* Roll back llvm/test/ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll, possibly ↵NAKAMURA Takumi2015-04-141-1/+0
| | | | | | | | wrong commit. It reverts part of r234839, "[RuntimeDyldELF] Improve GOT support". llvm-svn: 234879
* [RuntimeDyldELF] Improve GOT supportKeno Fischer2015-04-141-0/+1
| | | | | | | | | | | | | | | | | | Summary: This is the first in a series of patches to eventually add support for TLS relocations to RuntimeDyld. This patch resolves an issue in the current GOT handling, where GOT entries would be reused between object files, which leads to the same situation that necessitates the GOT in the first place, i.e. that the 32-bit offset can not cover all of the address space. Thus this patch makes the GOT object-file-local. Unfortunately, this still isn't quite enough, because the MemoryManager does not yet guarantee that sections are allocated sufficiently close to each other, even if they belong to the same object file. To address this concern, this patch also adds a small API abstraction on top of the GOT allocation mechanism that will allow (temporarily, until the MemoryManager is improved) using the stub mechanism instead of allocating a different section. The actual switch from separate section to stub mechanism will be part of a follow-on commit, so that it can be easily reverted independently at the appropriate time. Test Plan: Includes a test case where the GOT of two object files is artificially forced to be apart by several GB. Reviewers: lhames Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8813 llvm-svn: 234839
* [Orc][MCJIT] Remove the small code model regression tests.Lang Hames2015-03-311-12/+0
| | | | | | | | | | | | | These regression tests are supposed to test small code model support, but have been XFAIL'd because we don't have an in-tree memory manager that can guarantee a small-code-model compatible memory layout. Unfortunately, they can occasionally pass if they get lucky with memory allocation, causing unexpected passes on the bots. That's not very helpful. I'm going to remove these until we have the infrastructure (small-code-model compatible memory manager) to run them properly. llvm-svn: 233722
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-03-1315-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gep operator Similar to gep (r230786) and load (r230794) changes. Similar migration script can be used to update test cases, which successfully migrated all of LLVM and Polly, but about 4 test cases needed manually changes in Clang. (this script will read the contents of stdin and massage it into stdout - wrap it in the 'apply.sh' script shown in previous commits + xargs to apply it over a large set of test cases) import fileinput import sys import re rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL) def conv(match): line = match.group(1) line += match.group(4) line += ", " line += match.group(2) return line line = sys.stdin.read() off = 0 for match in re.finditer(rep, line): sys.stdout.write(line[off:match.start()]) sys.stdout.write(conv(match)) off = match.end() sys.stdout.write(line[off:]) llvm-svn: 232184
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-02-2730-94/+94
| | | | | | | | | | | | | | | | | | | | | | | | load instruction Essentially the same as the GEP change in r230786. A similar migration script can be used to update test cases, though a few more test case improvements/changes were required this time around: (r229269-r229278) import fileinput import sys import re pat = re.compile(r"((?:=|:|^)\s*load (?:atomic )?(?:volatile )?(.*?))(| addrspace\(\d+\) *)\*($| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$)") for line in sys.stdin: sys.stdout.write(re.sub(pat, r"\1, \2\3*\4", line)) Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7649 llvm-svn: 230794
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-02-277-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getelementptr instruction One of several parallel first steps to remove the target type of pointers, replacing them with a single opaque pointer type. This adds an explicit type parameter to the gep instruction so that when the first parameter becomes an opaque pointer type, the type to gep through is still available to the instructions. * This doesn't modify gep operators, only instructions (operators will be handled separately) * Textual IR changes only. Bitcode (including upgrade) and changing the in-memory representation will be in separate changes. * geps of vectors are transformed as: getelementptr <4 x float*> %x, ... ->getelementptr float, <4 x float*> %x, ... Then, once the opaque pointer type is introduced, this will ultimately look like: getelementptr float, <4 x ptr> %x with the unambiguous interpretation that it is a vector of pointers to float. * address spaces remain on the pointer, not the type: getelementptr float addrspace(1)* %x ->getelementptr float, float addrspace(1)* %x Then, eventually: getelementptr float, ptr addrspace(1) %x Importantly, the massive amount of test case churn has been automated by same crappy python code. I had to manually update a few test cases that wouldn't fit the script's model (r228970,r229196,r229197,r229198). The python script just massages stdin and writes the result to stdout, I then wrapped that in a shell script to handle replacing files, then using the usual find+xargs to migrate all the files. update.py: import fileinput import sys import re ibrep = re.compile(r"(^.*?[^%\w]getelementptr inbounds )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") normrep = re.compile( r"(^.*?[^%\w]getelementptr )(((?:<\d* x )?)(.*?)(| addrspace\(\d\)) *\*(|>)(?:$| *(?:%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|\[\[[a-zA-Z]|\{\{).*$))") def conv(match, line): if not match: return line line = match.groups()[0] if len(match.groups()[5]) == 0: line += match.groups()[2] line += match.groups()[3] line += ", " line += match.groups()[1] line += "\n" return line for line in sys.stdin: if line.find("getelementptr ") == line.find("getelementptr inbounds"): if line.find("getelementptr inbounds") != line.find("getelementptr inbounds ("): line = conv(re.match(ibrep, line), line) elif line.find("getelementptr ") != line.find("getelementptr ("): line = conv(re.match(normrep, line), line) sys.stdout.write(line) apply.sh: for name in "$@" do python3 `dirname "$0"`/update.py < "$name" > "$name.tmp" && mv "$name.tmp" "$name" rm -f "$name.tmp" done The actual commands: From llvm/src: find test/ -name *.ll | xargs ./apply.sh From llvm/src/tools/clang: find test/ -name *.mm -o -name *.m -o -name *.cpp -o -name *.c | xargs -I '{}' ../../apply.sh "{}" From llvm/src/tools/polly: find test/ -name *.ll | xargs ./apply.sh After that, check-all (with llvm, clang, clang-tools-extra, lld, compiler-rt, and polly all checked out). The extra 'rm' in the apply.sh script is due to a few files in clang's test suite using interesting unicode stuff that my python script was throwing exceptions on. None of those files needed to be migrated, so it seemed sufficient to ignore those cases. Reviewers: rafael, dexonsmith, grosser Differential Revision: http://reviews.llvm.org/D7636 llvm-svn: 230786
* Remove a few more redundant ExecutionEngine regression tests.Lang Hames2015-01-241-8/+0
| | | | llvm-svn: 227021
* Reverting r226937: lit: Make MCJIT's supported arch check case insensitiveKuba Brecka2015-01-241-2/+2
| | | | | | The r226937 commit causes ASan lit tests to be all skipped on OS X. llvm-svn: 226979
* lit: Make MCJIT's supported arch check case insensitiveReid Kleckner2015-01-231-2/+2
| | | | | | | | | Should make the tests run when using CMake on systems where 'uname -p' reports "amd64", such as FreeBSD. Should fix PR21559. llvm-svn: 226937
* [MCJIT] Remove a few redundant MCJIT tests, and drop the extraneous datalayoutLang Hames2015-01-083-6/+0
| | | | | | strings from the copies that remain. llvm-svn: 225460
* XFAIL several MCJIT EH tests under ASan and MSan bootstrap.Alexey Samsonov2015-01-074-4/+4
| | | | llvm-svn: 225393
* Small model and JIT generally don't go well with each other.Joerg Sonnenberger2014-11-251-26/+0
| | | | | | | | | On LP64 platforms, it will work or not depending on the choosen memory layout, so neither PASS nor XFAIL is appropiate. As UNSUPPORTED as per-test target doesn't exist (yet), remove the test instead to unbreak the builds. llvm-svn: 222767
* Mark as explicit failing on x86-64 -- small memory model doesn't agreeJoerg Sonnenberger2014-11-251-0/+1
| | | | | | with default address selections. llvm-svn: 222759
* MCJIT tests passing on ARM after r222414 fixed the relocationRenato Golin2014-11-202-2/+2
| | | | llvm-svn: 222430
* Reinstate "Nuke the old JIT."Eric Christopher2014-09-0282-84/+84
| | | | | | | | Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-0782-84/+84
| | | | | | | | | | | 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-0782-84/+84
| | | | | | | | | 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
* [RuntimeDyld] Support more PPC64 relocationsUlrich Weigand2014-06-201-1/+1
| | | | | | | | | | This adds support for several missing PPC64 relocations in the straight-forward manner to RuntimeDyldELF.cpp. Note that this actually fixes a failure of a large-model test case on PowerPC, allowing the XFAIL to be removed. llvm-svn: 211382
* Reduce verbiage of lit.local.cfg filesAlp Toker2014-06-091-1/+1
| | | | | | We can just split targets_to_build in one place and make it immutable. llvm-svn: 210496
* PC-rel implemented in AArch64, test now passRenato Golin2014-02-121-1/+1
| | | | llvm-svn: 201243
* mips: XFAIL non-extern-addend-smallcodemodel testPetar Jovanovic2014-02-051-1/+1
| | | | | | | Small code model (and default reloc model) set Reloc::PIC_ in this test, and PIC is not yet supported in MCJIT for MIPS. llvm-svn: 200852
* Split out small-code-model MCJIT testcase in order to xfail for AArch64, whereLang Hames2014-01-312-1/+25
| | | | | | PC-rel relocations aren't yet fully implemented. llvm-svn: 200592
* Add support for PC-relative non-extern relocations to RuntimeDyldMachO.Lang Hames2014-01-291-6/+16
| | | | | | | | | Also replaces testcase for r180790 (support for absolute non-externs relocs) with a more robust version. <rdar://problem/15864721> llvm-svn: 200404
* Enable EHABI by defaultRenato Golin2014-01-299-13/+12
| | | | | | | | | | | | | | | | | | | | | | After all hard work to implement the EHABI and with the test-suite passing, it's time to turn it on by default and allow users to disable it as a work-around while we fix the eventual bugs that show up. This commit also remove the -arm-enable-ehabi-descriptors, since we want the tables to be printed every time the EHABI is turned on for non-Darwin ARM targets. Although MCJIT EHABI is not working yet (needs linking with the right libraries), this commit also fixes some relocations on MCJIT regarding the EH tables/lib calls, and update some tests to avoid using EH tables when none are needed. The EH tests in the test-suite that were previously disabled on ARM now pass with these changes, so a follow-up commit on the test-suite will re-enable them. llvm-svn: 200388
* Re-enabling MCJIT tests on ARMRenato Golin2014-01-251-2/+2
| | | | | | | | | After several refactorings on the MCJIT remote communication, things are finally looking good on Clang-compiled LLVM regarding MCJIT remote tests, so I'm re-enabling them to see how the self-hosting buildbot behaves over a longer period. llvm-svn: 200102
* Eliminate inappropriate use of FindProgramByName() from lliAlp Toker2014-01-2211-11/+11
| | | | llvm-svn: 199835
OpenPOWER on IntegriCloud