summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* [Orc] Add missing -use-orcmcjit flag to a number of Orc regression tests.Lang Hames2015-03-2316-18/+18
| | | | llvm-svn: 232931
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-03-1331-39/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* ExecutionEngine: Preliminary support for dynamically loadable coff objectsDavid Majnemer2015-03-071-0/+31
| | | | | | | | | | Provide basic support for dynamically loadable coff objects. Only handles a subset of x64 currently. Patch by Andy Ayers! Differential Revision: http://reviews.llvm.org/D7793 llvm-svn: 231574
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-02-2762-204/+204
| | | | | | | | | | | | | | | | | | | | | | | | 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-2716-42/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Make frem.ll flush after calling printf.Zachary Turner2015-02-181-0/+2
| | | | | | | Without this, the test was flaky, and FileCheck would sometimes not detect any input on stdin. llvm-svn: 229732
* [Orc] Make OrcMCJITReplacement::addObject calls transfer buffer ownership to theLang Hames2015-02-021-0/+24
| | | | | | | | | | | | | | | ObjectLinkingLayer. There are a two of overloads for addObject, one of which transfers ownership of the underlying buffer to OrcMCJITReplacement. This commit makes the ownership transfering version pass ownership down to the ObjectLinkingLayer in order to prevent the issue described in r227778. I think this commit will fix the sanitizer bot failures that necessitated the removal of the load-object-a.ll regression test in r227785, so I'm reinstating that test. llvm-svn: 227845
* [Orc] Remove one of the OrcMCJITReplacement regression tests while ILang Hames2015-02-021-24/+0
| | | | | | investigate a sanitizer bot failure. llvm-svn: 227785
* [Orc] Regression tests for OrcMCJITReplacement.Lang Hames2015-02-0289-0/+2171
| | | | | | Duplicated from the MCJIT regression tests. llvm-svn: 227780
* Remove a few more redundant ExecutionEngine regression tests.Lang Hames2015-01-244-84/+0
| | | | llvm-svn: 227021
* Remove a number of redundant ExecutionEngine regression tests.Lang Hames2015-01-2440-1076/+0
| | | | | | | | These tests used to test the legacy JIT but since that has been removed they're just redundantly testing MCJIT. Remove them and just leave their counterparts in test/ExecutionEngine/MCJIT. llvm-svn: 227010
* 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-086-57/+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
* Fix symbol resolution of floating point libc builtins in MCJITReid Kleckner2014-11-131-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for LLI failure on Windows\X86: http://llvm.org/PR5053 LLI.exe crashes on Windows\X86 when single precession floating point intrinsics like the following are used: acos, asin, atan, atan2, ceil, copysign, cos, cosh, exp, floor, fmin, fmax, fmod, log, pow, sin, sinh, sqrt, tan, tanh The above intrinsics are defined as inline-expansions in math.h, and are not exported by msvcr120.dll (Win32 API GetProcAddress returns null). For an FREM instruction, the JIT compiler generates a call to a stub for the fmodf() intrinsic, and adds a relocation to fixup at load time. The loader searches the libraries for the function, but fails because the symbol is not exported. So, the call target remains NULL and the execution crashes. Since the math functions are loaded at JIT/runtime, the JIT can patch CALL instruction directly instead of the searching the libraries' exported symbols. However, this fix caused build failures due to unresolved symbols like _fmodf at link time. Therefore, the current fix defines helper functions in the Runtime link/load library to perform the above operations. The address of these helper functions are used to patch up the CALL instruction at load time. Reviewers: lhames, rnk Reviewed By: rnk Differential Revision: http://reviews.llvm.org/D5387 Patch by Swaroop Sridhar! llvm-svn: 221947
* [MCJIT] Defer application of AArch64 MachO GOT relocations until resolve time.Lang Hames2014-10-211-1/+1
| | | | | | | | | | On AArch64, GOT references are page relative (ADRP + LDR), so they can't be applied until we know exactly where, within a page, the GOT entry will be in the target address space. Fixes <rdar://problem/18693976>. llvm-svn: 220347
* [MCJIT] Temporarily revert r220245 - it broke several bots.Lang Hames2014-10-214-18/+0
| | | | | | (See e.g. http://bb.pgr.jp/builders/cmake-llvm-x86_64-linux/builds/17653) llvm-svn: 220249
* [MCJIT] Make MCJIT honor symbol visibility settings when populating the globalLang Hames2014-10-204-0/+18
| | | | | | | | symbol table. Patch by Anthony Pesch. Thanks Anthony! llvm-svn: 220245
* [mips] Remove XFAIL from two XPASS'ing tests on the llvm-mips-linux builderDaniel Sanders2014-10-032-2/+0
| | | | llvm-svn: 218967
* [MCJIT] Make sure we test ARM BR24 relocations with both internal and externalLang Hames2014-09-111-2/+7
| | | | | | | | | | symbols. Previously we have only been testing these relocations with external symbols. <rdar://problem/18308413> llvm-svn: 217635
* [MCJIT] Add support for ARM HALF_DIFF relocations to MCJIT.Lang Hames2014-09-111-15/+19
| | | | | | Fixes <rdar://problem/18297804>. llvm-svn: 217620
* [MCJIT] Take the relocation addend into account when applying ARM MachO VANILLALang Hames2014-09-111-0/+3
| | | | | | | | and BR24 relocations. <rdar://problem/18296496> llvm-svn: 217605
* [MCJIT] Make sure eh-frame fixups use the target's pointer type, not the host's.Lang Hames2014-09-041-0/+30
| | | | | | | If the wrong pointer type is used it can cause corruption of the frame description entries. llvm-svn: 217124
* Reinstate "Nuke the old JIT."Eric Christopher2014-09-02107-109/+84
| | | | | | | | Approved by Jim Grosbach, Lang Hames, Rafael Espindola. This reinstates commits r215111, 215115, 215116, 215117, 215136. llvm-svn: 216982
* [PATCH][Interpreter] Add missing FP intrinsic lowering.Josh Klontz2014-08-301-0/+16
| | | | | | | | | | | | | | | | | Summary: This extends the work done in [1], adding missing intrinsic lowering for floor, trunc, round and copysign. [1] http://comments.gmane.org/gmane.comp.compilers.llvm.cvs/199372 Test Plan: Extended `test/ExecutionEngine/Interpreter/intrinsics.ll` to test the additional missing intrinsics. All tests pass. Reviewers: dexonsmith Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D5120 llvm-svn: 216827
* [MCJIT] Add an i386 RuntimeDyldMachO test case.Lang Hames2014-08-192-4/+49
| | | | llvm-svn: 216024
* Add missing Interpreter intrinsic lowering for sin, cos and ceilJosh Klontz2014-08-082-0/+22
| | | | llvm-svn: 215209
* Temporarily Revert "Nuke the old JIT." as it's not quite ready toEric Christopher2014-08-07107-84/+109
| | | | | | | | | | | 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
* Remove a few XFAILs.Rafael Espindola2014-08-0725-25/+0
| | | | | | These tests now pass with MCJIT. llvm-svn: 215136
* 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
* [MCJIT] Fix the ARM BR24 relocation in RuntimeDyldMachO.Lang Hames2014-07-301-3/+15
| | | | | | | | | | We now (1) correctly decode the branch immediate, (2) modify the immediate to corretly treat it as PC-rel, and (3) properly populate the stub entry. Previously we had been doing each of these wrong. <rdar://problem/17750739> llvm-svn: 214285
* [MCJIT] XFAIL some RuntimeDyld tests on MIPS - RuntimeDyldChecker isn't properlyLang Hames2014-07-292-0/+2
| | | | | | endian-aware yet, and this is causing failures when cross-linking on MIPS. llvm-svn: 214231
* [MCJIT] Make the RuntimeDyldChecker stub_addr builtin use file names rather thanLang Hames2014-07-292-10/+7
| | | | | | | | | | full paths for its first argument. This allows us to remove the annoying sed lines in the test cases, and write direct references to file names in stub_addr calls (rather than <filename> placeholders). llvm-svn: 214211
* [RuntimeDyld][AArch64] Make encode/decodeAddend also work on big-endian hosts.Juergen Ributzka2014-07-291-1/+0
| | | | llvm-svn: 214205
* [MCJIT] Remove extraneous parentheses in test case.Lang Hames2014-07-281-2/+2
| | | | llvm-svn: 214117
* [RuntimeDyld][AArch64] Update relocation tests and also add a simple GOT test.Juergen Ributzka2014-07-231-25/+40
| | | | llvm-svn: 213807
* Rework to let RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s pass on win32.NAKAMURA Takumi2014-07-231-4/+1
| | | | | | | FIXME: "llvm-rtdyld -verify -check" is still sensitive to path separator. Fix searching StubMap to be tolerant of both '/' and '\\' on Win32. llvm-svn: 213723
* Suppress a test on win32 for now, ↵NAKAMURA Takumi2014-07-231-0/+3
| | | | | | | llvm/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s. FIXME: Fix searching StubMap with '/' and '\\' on Win32. llvm-svn: 213721
* RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s: Use %/T here, or sed(1) ↵NAKAMURA Takumi2014-07-231-1/+1
| | | | | | would be confused with dos path. llvm-svn: 213720
* XFAIL the test on MIPSJuergen Ributzka2014-07-221-0/+1
| | | | | | Not sure how to debug this one without a MIPS machine. Any takers? llvm-svn: 213705
* [MCJIT] Refactor and add stub inspection to the RuntimeDyldChecker framework.Lang Hames2014-07-221-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a 'stub_addr' builtin that can be used to find the address of the stub for a given (<file>, <section>, <symbol>) tuple. This address can be used both to verify the contents of stubs (by loading from the returned address) and to verify references to stubs (by comparing against the returned address). Example (1) - Verifying stub contents: Load 8 bytes (assuming a 64-bit target) from the stub for 'x' in the __text section of f.o, and compare that value against the addres of 'x'. # rtdyld-check: *{8}(stub_addr(f.o, __text, x) = x Example (2) - Verifying references to stubs: Decode the immediate of the instruction at label 'l', and verify that it's equal to the offset from the next instruction's PC to the stub for 'y' in the __text section of f.o (i.e. it's the correct PC-rel difference). # rtdyld-check: decode_operand(l, 4) = stub_addr(f.o, __text, y) - next_pc(l) l: movq y@GOTPCREL(%rip), %rax Since stub inspection requires cooperation with RuntimeDyldImpl this patch pimpl-ifies RuntimeDyldChecker. Its implementation is moved in to a new class, RuntimeDyldCheckerImpl, that has access to the definition of RuntimeDyldImpl. llvm-svn: 213698
* [RuntimeDyld][MachO][AArch64] Add a helper function for encoding addends in ↵Juergen Ributzka2014-07-222-0/+57
| | | | | | | | | | | | | instructions. Factor out the addend encoding into a helper function and simplify the processRelocationRef. Also add a few simple rtdyld tests. More tests to come once GOTs can be tested too. Related to <rdar://problem/17768539> llvm-svn: 213689
* [RuntimeDyld] Replace a crufty old ARM RuntimeDyld test with a new one that usesLang Hames2014-07-104-1/+30
| | | | | | | | | RuntimeDyldChecker. This allows us to remove one of the six remaining object files in the LLVM source tree. llvm-svn: 212780
* Fix this test to not write to the source tree, and instead to write toChandler Carruth2014-06-281-3/+3
| | | | | | | a temporary file. This fixes the test in cases where the source tree is mounted read-only. llvm-svn: 211975
* [RuntimeDyld] Make sure that RuntimeDyld regression tests only run for targetsLang Hames2014-06-272-0/+3
| | | | | | | | | that have been enabled. Without this, testers will fail when llvm-rtdyld is invoked with triples for unsupported targets. llvm-svn: 211969
* [RuntimeDyld] Add a framework for testing relocation logic in RuntimeDyld.Lang Hames2014-06-271-0/+32
| | | | | | | | | | | | | | | | | | | | This patch adds a "-verify" mode to the llvm-rtdyld utility. In verify mode, llvm-rtdyld will test supplied expressions against the linked program images that it creates in memory. This scheme can be used to verify the correctness of the relocation logic applied by RuntimeDyld. The expressions to test will be read out of files passed via the -check option (there may be more than one of these). Expressions to check are extracted from lines of the form: # rtdyld-check: <expression> This system is designed to fit the llvm-lit regression test workflow. It is format and target agnostic, and supports verification of images linked for remote targets. The expression language is defined in llvm/include/llvm/RuntimeDyldChecker.h . Examples can be found in test/ExecutionEngine/RuntimeDyld. llvm-svn: 211956
OpenPOWER on IntegriCloud