summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* [Orc] During module partitioning, rename anonymous and asm-private globals.Lang Hames2015-04-121-0/+18
| | | | | | | If they're not (re)named, these globals will fail to resolve when the partitioned modules are linked. llvm-svn: 234707
* [Orc] Fix local-linkage handling in the CompileOnDemand layer.Lang Hames2015-04-021-0/+12
| | | | llvm-svn: 233895
* [Orc] Add support classes for inspecting and running C++ static ctor/dtors, andLang Hames2015-04-022-26/+34
| | | | | | | | | use these to add support for C++ static ctors/dtors to the Orc-lazy JIT in LLI. Replace the trivial_retval_1 regression test - the new 'hello' test is covering strictly more code. llvm-svn: 233885
* [Orc][MCJIT] Remove the small code model regression tests.Lang Hames2015-03-312-24/+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
* Make exit-code test use same mechanism as existing one.Daniel Jasper2015-03-251-1/+2
| | | | | | | The other version doesn't properly work with our internal test runner, which sets pipefail. llvm-svn: 233188
* [Orc][lli] Add a very simple Orc-based lazy JIT to lli.Lang Hames2015-03-2598-145/+172
| | | | | | | | | | | | | | | | | This ensures that we're building and testing the CompileOnDemand layer, at least in a basic way. Currently x86-64 only, and with limited to no library calls enabled (depending on host platform). Patches welcome. ;) To enable access to the lazy JIT, this patch replaces the '-use-orcmcjit' lli option with a new option: '-jit-kind={ mcjit | orc-mcjit | orc-lazy }'. All regression tests are updated to use the new option, and one trivial test of the new lazy JIT is added. llvm-svn: 233182
* [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
OpenPOWER on IntegriCloud