summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* Un-XFAIL JIT EH tests under [am]san.Peter Collingbourne2015-12-158-8/+8
| | | | | | | | | | 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
* [RuntimeDyld] Don't allocate unnecessary stub buffer spaceSanjoy Das2015-11-232-0/+38
| | | | | | | | | | | | | | Summary: For relocation types that are known to not require stub functions, there is no need to allocate extra space for the stub functions. Reviewers: lhames, reames, maksfb Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D14676 llvm-svn: 253920
* [RuntimeDyld] Add support for R_X86_64_PC8 relocation.Maksim Panchenko2015-11-081-0/+26
| | | | llvm-svn: 252423
* RuntimeDyld: add COFF i386 supportSaleem Abdulrasool2015-11-011-0/+66
| | | | | | | This adds support for COFF I386. This is sufficient for code execution in a 32-bit JIT, though, imported symbols need to custom lowered for the redirection. llvm-svn: 251761
* [RuntimeDyld][COFF] Fix a think-o in the handling of the IMAGE_REL_AMD64_ADDR64Lang Hames2015-10-231-0/+6
| | | | | | relocation that was introduced in r250733. llvm-svn: 251135
* [RuntimeDyld] Ignore ST_FILE symbols when constructing GlobalSymbolTableKeno Fischer2015-10-213-0/+19
| | | | | | | | | | | | | | Summary: ELF's STT_File symbols may overlap with regular globals in other files, so we should ignore them here in order to avoid having bogus entries in the symbol table that confuse us when resolving relocations. Reviewers: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13888 llvm-svn: 250942
* [RuntimeDyld][COFF] Fix some endianness issues, re-enable the regression test.Lang Hames2015-10-191-0/+0
| | | | llvm-svn: 250733
* [RuntimeDyld] Add support for absolute symbols.Lang Hames2015-10-181-1/+6
| | | | llvm-svn: 250639
* [RuntimeDyld] Drop the '.s' suffix off the COFF test case - the MIPS bot startedLang Hames2015-10-151-0/+0
| | | | | | | | | failing when the suffix was added. I assume the lack of a '.s' suffix means that the test case just wasn't running before, and it has never worked on MIPS. I'll investigate that tomorrow. llvm-svn: 250376
* [RuntimeDyld] Don't try to get the contents of sections that don't have anyLang Hames2015-10-151-1/+4
| | | | | | | | | | | (e.g. bss sections). MachO and ELF have been silently letting this pass, but COFFObjectFile contains an assertion to catch this kind of (ab)use of the getSectionContents, and this was causing the JIT to crash on COFF objects with BSS sections. This patch should fix that. llvm-svn: 250371
* [Orc] Teach the CompileOnDemand layer to clone aliases.Lang Hames2015-10-061-0/+21
| | | | | | | | This allows modules containing aliases to be lazily jit'd. Previously these failed with missing symbol errors because the aliases weren't cloned from the original module. llvm-svn: 249481
* [RuntimeDyld] Support non-zero addends for the MachO X86_64 SUBTRACTOR reloc.Lang Hames2015-09-101-2/+2
| | | | | | This functionality was accidentally left out of r247119. llvm-svn: 247336
* [RuntimeDyld] Add support for MachO x86_64 SUBTRACTOR relocation.Lang Hames2015-09-091-0/+13
| | | | llvm-svn: 247119
* [mips64][mcjit] Add N64R6 relocations tests and fix N64R2 testsPetar Jovanovic2015-08-282-2/+60
| | | | | | | | | | | | This patch adds a test for MIPS64R6 relocations, it corrects check expressions for R_MIPS_26 and R_MIPS_PC16 relocations in MIPS64R2 test, and it adds run for big endian in MIPS64R2 test. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D11217 llvm-svn: 246311
* [mips] Expand JAL instructions when PIC is enabled.Daniel Sanders2015-08-181-0/+2
| | | | | | | | | | | | | | Summary: This is the correct way to handle JAL instructions when PIC is enabled. Patch by Toma Tabacu Reviewers: seanbruno, tomatabacu Subscribers: brooks, seanbruno, emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D6231 llvm-svn: 245305
* [mips][mcjit] Calculate correct addend for HI16 and PCHI16 relocPetar Jovanovic2015-08-131-2/+11
| | | | | | | | | | | Previously, for O32 ABI we did not calculate correct addend for R_MIPS_HI16 and R_MIPS_PCHI16 relocations. This patch fixes that. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D11186 llvm-svn: 244897
* [RuntimeDyld][AArch64] Add explicit addends before calling relocationValueRef.Lang Hames2015-08-111-0/+12
| | | | | | relocationValueRef uses the addend, so it has to be set before the call. llvm-svn: 244574
* [SPARC] Disable unsupported ExecutionEngine tests, and XFAIL a coupleJames Y Knight2015-08-071-1/+4
| | | | | | of DebugInfo tests. llvm-svn: 244371
* [RuntimeDyld] Adapt PPC64 relocations to PPC32Hal Finkel2015-08-042-0/+50
| | | | | | | | | Begin adapting some of the implemented PPC64 relocations for PPC32 (with a test case). Patch by Pierre-Andre Saulais! llvm-svn: 243991
* [RuntimeDyld] MachO: Add support for ARM scattered vanilla relocations.Lang Hames2015-07-241-0/+7
| | | | llvm-svn: 243126
* [Mips] Add support for MCJIT for MIPS32r6Petar Jovanovic2015-07-062-0/+54
| | | | | | | | | | Add support for resolving MIPS32r6 relocations in MCJIT. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D10687 llvm-svn: 241442
* Make this test a bit more interesting.Rafael Espindola2015-07-061-1/+4
| | | | | | Before every test was using a section with an address of zero. llvm-svn: 241427
* [RuntimeDyld] Skip relocations for external symbols with 64-bit address ~0ULL.Lang Hames2015-07-041-1/+12
| | | | | | | | | | | Requested by Eugene Rozenfeld of the LLILC team, this feature allows JIT clients to skip relocations for selected external symbols by returning ~0ULL from their symbol resolver. If this value is returned for a given symbol, RuntimeDyld will skip all relocations for that symbol. The client will be responsible for applying the skipped relocations manually before the code is executed. llvm-svn: 241383
* Move the personality function from LandingPadInst to FunctionDavid Majnemer2015-06-1710-20/+20
| | | | | | | | | | | | | | | | | | | 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][mcjit] Add R_MIPS_PC32 relocationPetar Jovanovic2015-06-081-0/+9
| | | | | | | | | | This patch adds R_MIPS_PC32 relocation for Mips64. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D10235 llvm-svn: 239301
* Re-commit r238838, r238844 with fix for host/target endian mismatch and ↵Daniel Sanders2015-06-031-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | windows buildbot. The windows buildbot originally failed because the check expressions are evaluated as 64-bit values, even for 32-bit symbols. Fixed this by comparing bottom 32-bits of the expressions. The host/target endian mismatch issue is that it's invalid to read/write target values using a host pointer without taking care of endian differences between the target and host. Most (if not all) instances of reinterpret_cast<uint32_t*>() in the RuntimeDyld are examples of this bug. This has been fixed for Mips using the endian aware read/write functions. The original commits were: r238838: [mips] Add RuntimeDyld tests for currently supported O32 relocations. Reviewers: petarj, vkalintiris Reviewed By: vkalintiris Subscribers: vkalintiris, llvm-commits Differential Revision: http://reviews.llvm.org/D10126 r238844: [mips][mcjit] Add support for R_MIPS_PC32. Summary: This allows us to resolve relocations for DW_EH_PE_pcrel TType encodings in the exception handling LSDA. Also fixed a nearby typo. Reviewers: petarj, vkalintiris Reviewed By: vkalintiris Subscribers: vkalintiris, llvm-commits Differential Revision: http://reviews.llvm.org/D10127 llvm-svn: 238915
* This reverts commit r238838, r238844 and r238888.Rafael Espindola2015-06-031-48/+0
| | | | | | | | Trying to bring back a windows bot: http://lab.llvm.org:8011/builders/clang-x86-win2008-selfhost/builds/1224/steps/ninja%20check%202/logs/FAIL%3A%20LLVM%3A%3AELF_O32_PIC_relocations.s llvm-svn: 238903
* [mips] XFAIL ELF_O32_PIC_relocations.s for big-endian mipsDaniel Sanders2015-06-021-0/+2
| | | | | | | The test exposes pre-existing bugs when the endian of the host and target do not match. llvm-svn: 238888
* [mips][mcjit] Add support for R_MIPS_PC32.Daniel Sanders2015-06-021-0/+6
| | | | | | | | | | | | | | | | | | Summary: This allows us to resolve relocations for DW_EH_PE_pcrel TType encodings in the exception handling LSDA. Also fixed a nearby typo. Reviewers: petarj, vkalintiris Reviewed By: vkalintiris Subscribers: vkalintiris, llvm-commits Differential Revision: http://reviews.llvm.org/D10127 llvm-svn: 238844
* [mips] Add RuntimeDyld tests for currently supported O32 relocations.Daniel Sanders2015-06-021-0/+40
| | | | | | | | | | | | Reviewers: petarj, vkalintiris Reviewed By: vkalintiris Subscribers: vkalintiris, llvm-commits Differential Revision: http://reviews.llvm.org/D10126 llvm-svn: 238838
* [Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6Petar Jovanovic2015-05-2825-22/+184
| | | | | | | | | | Add support for resolving MIPS64r2 and MIPS64r6 relocations in MCJIT. Patch by Vladimir Radosavljevic. Differential Revision: http://reviews.llvm.org/D9667 llvm-svn: 238424
* [RuntimeDyld] Fix MachO i386 SECTDIFF relocation to support non-zero addends.Lang Hames2015-05-271-2/+2
| | | | | | | Previously, relocations of the form 'A - B + C' would fail on i386 when C was non-zero. llvm-svn: 238356
* [Orc] Reapply r236465 with fixes for the MSVC bots.Lang Hames2015-05-051-1/+1
| | | | llvm-svn: 236506
* [Orc] Revert r236465 - It broke the Windows bots.Lang Hames2015-05-041-1/+1
| | | | | | | Looks like the usual missing explicit move-constructor issue with MSVC. I should have a fix shortly. llvm-svn: 236472
* [Orc] Refactor the compile-on-demand layer to make module partitioning lazy,Lang Hames2015-05-041-1/+1
| | | | | | | | | | | | | | | and avoid cloning unused decls into every partition. Module partitioning showed up as a source of significant overhead when I profiled some trivial test cases. Avoiding the overhead of partitionging for uncalled functions helps to mitigate this. This change also means that it is no longer necessary to have a LazyEmittingLayer underneath the CompileOnDemand layer, since the CompileOnDemandLayer will not extract or emit function bodies until they are called. llvm-svn: 236465
* [opaque pointer type] Add textual IR support for explicit type parameter to ↵David Blaikie2015-04-1611-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [RuntimeDyld] Make sure we emit MachO __eh_frame and __gcc_except_tab sections,Lang Hames2015-04-151-0/+7
| | | | | | | | even if there are no references to them in the code. This allows exceptions thrown from JIT'd code to be caught by the JIT itself. llvm-svn: 234975
* [Orc] Reapply r234815, outputting via stdout instead.Lang Hames2015-04-141-2/+3
| | | | llvm-svn: 234908
* 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-143-0/+34
| | | | | | | | | | | | | | | | | | 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] Revert 234815. Still haven't quite got this test figured out apparently.Lang Hames2015-04-141-27/+14
| | | | llvm-svn: 234822
* [Orc] Make the OrcLazy hello.ll regression test output via stderr.Lang Hames2015-04-131-14/+27
| | | | | | | | | | This keeps the program and JIT output in sync, enabling FileCheck to test the order of target program and JIT events. In particular we can now test that main is not compiled until after the global constructor has run. llvm-svn: 234815
* [Orc] Back out r234805 for hello.ll until I can figure out how to sync up theLang Hames2015-04-131-3/+2
| | | | | | output. llvm-svn: 234810
* [Orc] Add an Orc layer for applying arbitrary transforms to IR, use it to addLang Hames2015-04-131-2/+3
| | | | | | | debugging output to the LLI orc-lazy JIT, and update the orc-lazy "hello.ll" test to actually test for lazy compilation. llvm-svn: 234805
* [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
OpenPOWER on IntegriCloud