summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine/MCJIT
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Revert 199262 - MCJIT remote still failing on ARMRenato Golin2014-01-151-2/+2
| | | | | | | | Disabling remote MCJIT tests on ARM again, as they're still failing when self-hosting on ARM, despite all my tests. At least now we have more info on what message it's breaking and what is going on. Investigating. llvm-svn: 199310
* Re-disable MCJIT remote tests on ARMRenato Golin2014-01-151-0/+5
| | | | llvm-svn: 199309
* Re-enable remote MCJIT tests on ARMv7Renato Golin2014-01-141-5/+0
| | | | llvm-svn: 199262
* llvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Put together rm(1) and ↵NAKAMURA Takumi2014-01-131-7/+2
| | | | | | mkdir(1) at the top. llvm-svn: 199077
* llvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Remove "REQUIRES:shell". ↵NAKAMURA Takumi2014-01-101-2/+0
| | | | | | This doesn't depend on shell's behavior. llvm-svn: 198931
* llvm/test/ExecutionEngine/MCJIT/lit.local.cfg: Add "AMD64" in the host_arch ↵NAKAMURA Takumi2014-01-101-1/+1
| | | | | | | list. FIXME: We should not take CMake's ${CMAKE_SYSTEM_PROCESSOR}... llvm-svn: 198930
* llvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Fix not to use %t.cachedir/%p.NAKAMURA Takumi2014-01-101-4/+13
| | | | | | %p is like X:\foo\bar. llvm-svn: 198926
* Add an "-object-cache-dir=<string>" option to LLI. This option specifies theLang Hames2014-01-091-11/+6
| | | | | | | | | | | root path to which object files managed by the LLIObjectCache instance should be written. This option defaults to "", in which case objects are cached in the same directory as the bitcode they are derived from. The load-object-a.ll test has been rewritten to use this option to support testing in environments where the test directory is not writable. llvm-svn: 198852
* Add missing test case for r198737.Lang Hames2014-01-081-0/+27
| | | | llvm-svn: 198772
* Remove empty MCJIT/load-object-a.ll since r196641.NAKAMURA Takumi2013-12-071-0/+0
| | | | llvm-svn: 196645
* Revert r196639 while I investigate a bot failure.Lang Hames2013-12-071-28/+0
| | | | llvm-svn: 196641
* Add support for archives and object file caching under MCJIT.Lang Hames2013-12-071-0/+28
| | | | | | Patch by Andy Kaylor, with minor edits to resolve merge conflicts. llvm-svn: 196639
* Fix lit config for disabled MCJIT tests on ARMRenato Golin2013-12-031-1/+7
| | | | | | | Separating permanent from temporary targets, added the bug that will fix the temporary (PR18057). llvm-svn: 196274
* Disable Remote MCJIT tests on ARMRenato Golin2013-12-031-2/+1
| | | | | | | | | | The communication protocol is unstable on ARM when compiled with Clang, which is disrupting the self-hosting buildbots that are going to be added this week. I'm working on a solution, but remote MCJIT is not high-priority for ARM at the moment, so it might take a while. llvm-svn: 196257
* [mips] Resolve relocation for the stubs in MCJIT when load address is knownPetar Jovanovic2013-11-197-14/+0
| | | | | | | | | | Instead of processing relocation for branch to stubs right away, emit a modified relocation and add it to queue to be resolved later when final load address is known. This resolves seven MIPS MCJIT issues that were caused by missing relocation fixups at the end. llvm-svn: 195157
* Add XFAIL:arm again on 4 MCJIT tests, since r194558. AArch64 has been left ↵NAKAMURA Takumi2013-11-134-4/+4
| | | | | | | | | | removed. They are failing on clang-native-arm-cortex-a9. Please tweak MCJIT/lit.local.cfg, if this didn't satisfy bots. llvm-svn: 194561
* Remove XFAIL:aarch64,arm from 4 tests in test/ExecutionEngine/MCJIT.NAKAMURA Takumi2013-11-134-4/+4
| | | | | | They are reported as XPASSing. llvm-svn: 194558
* [mips] XFAIL several MCJIT remote testsPetar Jovanovic2013-10-314-0/+8
| | | | | | | | Two of the tests are new test cases (cross-module-a.ll, multi-module-a.ll) not yet supported on MIPS, while XFAIL for the other two tests was accidentally removed in r193570 and this change reverts those lines. llvm-svn: 193781
* Adding a workaround for __main linking with remote lli and Cygwin/MinGWAndrew Kaylor2013-10-298-21/+3
| | | | llvm-svn: 193570
* Renaming MCJIT .ir files to .ll and moving them to InputsAndrew Kaylor2013-10-2816-9/+9
| | | | llvm-svn: 193562
* Standardizing lli's extra module command line optionAndrew Kaylor2013-10-289-9/+9
| | | | llvm-svn: 193544
OpenPOWER on IntegriCloud