summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* Re-enabling MCJIT object caching with memory leak fixedAndrew Kaylor2013-04-252-18/+68
| | | | llvm-svn: 180575
* Revert "Adding object caching support to MCJIT"Rafael Espindola2013-04-252-65/+18
| | | | | | | | | | This reverts commit 07f03923137a91e3cca5d7fc075a22f8c9baf33a. Looks like it broke the valgrind bot: http://lab.llvm.org:8011/builders/llvm-x86_64-linux-vg_leak/builds/649 llvm-svn: 180249
* Revert "Exposing MCJIT through C API"Rafael Espindola2013-04-251-48/+0
| | | | | | | | | | This reverts commit 8c31b298149ca3c3f2bbd9e8aa9a01c4d91f3d74. It looks like this commit broke some bots: http://lab.llvm.org:8011/builders/llvm-ppc64-linux2/builds/5209 llvm-svn: 180248
* Exposing MCJIT through C APIAndrew Kaylor2013-04-241-0/+48
| | | | | | Patch by Filip Pizlo llvm-svn: 180229
* Making invalidateInstructionCache automatic in SectionMemoryManagerAndrew Kaylor2013-04-241-0/+5
| | | | llvm-svn: 180225
* Fix dependency layering issues caused by r180112.Eric Christopher2013-04-231-1/+0
| | | | | | Patch by Tom Stellard. (Committed while he's afk per request) llvm-svn: 180157
* Adding object caching support to MCJITAndrew Kaylor2013-04-232-18/+65
| | | | llvm-svn: 180146
* Wrap.h: Define wrap / unwrap function for ExecutionEngineTom Stellard2013-04-231-1/+0
| | | | llvm-svn: 180112
* Move C++ code out of the C headers and into either C++ headersEric Christopher2013-04-221-0/+22
| | | | | | | or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
* Two small cleanups for ELF's templates.Rafael Espindola2013-04-171-1/+1
| | | | | | | | | | * We only ever specialize these templates with an instantiation of ELFType, so we don't need a template template. * Replace LLVM_ELF_COMMA with just passing the individual parameters to the macro. This requires a second macro for when we only have ELFT, but that is still a small win. llvm-svn: 179726
* Make the host endianness check an integer constant expression.Rafael Espindola2013-04-152-6/+6
| | | | | | | | | | | | | | | I will remove the isBigEndianHost function once I update clang. The ifdef logic is designed to * not use configure/cmake to avoid breaking -arch i686 -arch ppc. * default to little endian * be as small as possible It looks like sys/endian.h is the preferred header on most modern BSD systems, but it is better to change this in a followup patch as machine/endian.h is available on FreeBSD, OpenBSD, NetBSD and OS X. llvm-svn: 179527
* Revert r179409 because it caused some warnings and some of the build bots fail.Nadav Rotem2013-04-121-277/+44
| | | | llvm-svn: 179418
* Add support for additional vector instructions in the interpreter.Nadav Rotem2013-04-121-44/+277
| | | | | | patch by Veselov, Yuri <Yuri.Veselov@intel.com>. llvm-svn: 179409
* Respect Addend when processing MCJIT relocations to local/global symbols.Ulrich Weigand2013-04-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the RuntimeDyldELF::processRelocationRef routine finds the target symbol of a relocation in the local or global symbol table, it performs a section-relative relocation: Value.SectionID = lsi->second.first; Value.Addend = lsi->second.second; At this point, however, any Addend that might have been specified in the original relocation record is lost. This is somewhat difficult to trigger for relocations within the code section since they usually do not contain non-zero Addends (when built with the default JIT code model, in any case). However, the problem can be reliably triggered by a relocation within the data section caused by code like: int test[2] = { -1, 0 }; int *p = &test[1]; The initializer of "p" will need a relocation to "test + 4". On platforms using RelA relocations this means an Addend of 4 is required. Current code ignores this addend when processing the relocation, resulting in incorrect execution. Fixed by taking the Addend into account when processing relocations to symbols found in the local or global symbol table. Tested on x86_64-linux and powerpc64-linux. llvm-svn: 178869
* Add support for vector data types in the LLVM interpreter.Nadav Rotem2013-04-013-3/+182
| | | | | | | Patch by: Veselov, Yuri <Yuri.Veselov@intel.com> llvm-svn: 178469
* Formatting, grammarAndrew Kaylor2013-02-201-3/+2
| | | | llvm-svn: 175647
* Adding support for absolute relocations. This occurs in ELF files when a ↵Andrew Kaylor2013-02-201-7/+14
| | | | | | relocation is given with no name and an undefined section. The relocation is applied with an address of zero. llvm-svn: 175643
* [patch] bug 15055 Add Unistd.h to OProfileWrapper.cppWill Schmidt2013-02-071-0/+1
| | | | | | | | Add #include <unistd.h> to OProfileWrapper.cpp. This provides the declarations for 'read' and 'close' that are otherwise missing, and result in 'error: <foo> was not declared in this scope'. This matches the issue as reported in bug 15055 "Can no longer compile LLVM with --with-oprofile" llvm-svn: 174661
* Fix misplaced 'break'.Jim Grosbach2013-02-011-3/+3
| | | | llvm-svn: 174205
* interpreter: Fix errant fallthrough.Jim Grosbach2013-01-311-1/+3
| | | | llvm-svn: 174080
* RuntimeDyld: Fix errant fallthrough.Jim Grosbach2013-01-311-0/+1
| | | | llvm-svn: 174078
* Formatting correctionAndrew Kaylor2013-01-291-2/+1
| | | | llvm-svn: 173739
* Add support for source and line information to IntelJITEventListener for ↵Andrew Kaylor2013-01-281-8/+45
| | | | | | object emitted by MCJIT. llvm-svn: 173712
* Add support for applying in-memory relocations to the .debug_line section ↵Andrew Kaylor2013-01-251-0/+2
| | | | | | and, in the case of ELF files, using symbol addresses when available for relocations to the .debug_info section. Also extending the llvm-rtdyld tool to add the ability to dump line number information for testing purposes. llvm-svn: 173517
* Make APFloat constructor require explicit semantics.Tim Northover2013-01-222-8/+14
| | | | | | | | | Previously we tried to infer it from the bit width size, with an added IsIEEE argument for the PPC/IEEE 128-bit case, which had a default value. This default value allowed bugs to creep in, where it was inappropriate. llvm-svn: 173138
* Introduce llvm::sys::getProcessTriple() function.Peter Collingbourne2013-01-161-13/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | In r143502, we renamed getHostTriple() to getDefaultTargetTriple() as part of work to allow the user to supply a different default target triple at configure time. This change also affected the JIT. However, it is inappropriate to use the default target triple in the JIT in most circumstances because this will not necessarily match the current architecture used by the process, leading to illegal instruction and other such errors at run time. Introduce the getProcessTriple() function for use in the JIT and its clients, and cause the JIT to use it. On architectures with a single bitness, the host and process triples are identical. On other architectures, the host triple represents the architecture of the host CPU, while the process triple represents the architecture used by the host CPU to interpret machine code within the current process. For example, when executing 32-bit code on a 64-bit Linux machine, the host triple may be 'x86_64-unknown-linux-gnu', while the process triple may be 'i386-unknown-linux-gnu'. This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple platforms. Differential Revision: http://llvm-reviews.chandlerc.com/D254 llvm-svn: 172627
* [Object][ELF] Simplify ELFObjectFile by using ELFType.Michael J. Spencer2013-01-151-41/+41
| | | | | | | | | | | | | This simplifies the usage and implementation of ELFObjectFile by using ELFType to replace: <endianness target_endianness, std::size_t max_alignment, bool is64Bits> This does complicate the base ELF types as they must now use template template parameters to partially specialize for the 32 and 64bit cases. However these are only defined once. llvm-svn: 172515
* Fix CastingDavid Greene2013-01-141-1/+2
| | | | | | Do proper casting to eliminate a const-away-cast compiler warning. llvm-svn: 172470
* Fix More CastsDavid Greene2013-01-141-3/+8
| | | | | | Properly cast some more code that triggered cast-away-const errors. llvm-svn: 172469
* Fix bug in exception table allocation (PR13678)Eli Bendersky2013-01-111-8/+18
| | | | | | Patch by Michael Muller. llvm-svn: 172214
* PowerPC: EH adjustmentsAdhemerval Zanella2013-01-091-1/+8
| | | | | | | | | This patch adjust the r171506 to make all DWARF enconding pc-relative for PPC64. It also adds the R_PPC64_REL32 relocation handling in MCJIT (since the eh_frame will not generate PIC-relative relocation) and also adds the emission of stubs created by the TTypeEncoding. llvm-svn: 171979
* [Object][ELF] Add a maximum alignment. This is used by createELFObjectFile ↵Michael J. Spencer2013-01-041-49/+51
| | | | | | to create a properly aligned reader. llvm-svn: 171520
* PowerPC: Fix eh_frame relocation for PIC Adhemerval Zanella2013-01-041-0/+6
| | | | | | | | | This patch fixes the PPC eh_frame definitions for the personality and frame unwinding for PIC objects. It makes PIC build correctly creates relative relocations in the '.rela.eh_frame' segments and thus avoiding a text relocation that generates a DT_TEXTREL segments in link phase. llvm-svn: 171506
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-0214-36/+36
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* convert a bunch of callers from DataLayout::getIndexedOffset() to ↵Nuno Lopes2012-12-301-3/+4
| | | | | | | | | GEP::accumulateConstantOffset(). The later API is nicer than the former, and is correct regarding wrap-around offsets (if anyone cares). There are a few more places left with duplicated code, which I'll remove soon. llvm-svn: 171259
* Removed "static" from "__jit_debug_descriptor" because "static" adds C++ ↵Elena Demikhovsky2012-12-241-1/+1
| | | | | | mangling prefix to this symbol. llvm-svn: 171025
* Remove duplicate includes.Roman Divacky2012-12-211-1/+0
| | | | llvm-svn: 170902
* Query section for whether it should be executable.Tim Northover2012-12-171-5/+3
| | | | llvm-svn: 170350
* Adjust JIT target triple on OS X to match the current architecture.Bob Wilson2012-12-051-1/+11
| | | | | | | | | For OS X builds, we generate one version of config.h but then build for multiple architectures. This means that the LLVM_HOSTTRIPLE setting may have the wrong architecture. Adjust it dynamically to match the current architecture. <rdar://problem/12715470> llvm-svn: 169405
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-046-10/+10
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] llvm-svn: 169224
* RuntimeDyld: Fix up r169178. MSVC doesn't like "or".NAKAMURA Takumi2012-12-042-2/+2
| | | | llvm-svn: 169183
* Runtime dynamic linker for MCJIT should support MIPS BigEndian architecture.Akira Hatanaka2012-12-033-3/+4
| | | | | | | | | This small change adds support for that. It will make all MCJIT tests pass in make-check on BigEndian platforms. Patch by Petar Jovanovic. llvm-svn: 169178
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-0315-73/+77
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Move the InstVisitor utility into VMCore where it belongs. It heavilyChandler Carruth2012-11-301-2/+2
| | | | | | | | | | | | depends on the IR infrastructure, there is no sense in it being off in Support land. This is in preparation to start working to expand InstVisitor into more special-purpose visitors that are still generic and can be re-used across different passes. The expansion will go into the Analylis tree though as nothing in VMCore needs it. llvm-svn: 168972
* MCJIT depends on JIT.Benjamin Kramer2012-11-281-1/+1
| | | | | | | Unbreaks the CMake shared library build. This is nasty and should be fixed eventually. llvm-svn: 168800
* Moving SectionMemoryManager to MCJIT to avoid cross dependency between JIT ↵Andrew Kaylor2012-11-283-1/+1
| | | | | | and RuntimeDyld llvm-svn: 168755
* Moving SectionMemoryManager into RuntimeDyld and adding unit tests for it.Andrew Kaylor2012-11-272-0/+227
| | | | | | | | The SectionMemoryManager now supports (and requires) applying section-specific page permissions. Clients using this memory manager must call either MCJIT::finalizeObject() or SectionMemoryManager::applyPermissions() before executing JITed code. See r168718 for changes from the previous implementation. llvm-svn: 168721
* IntelJITEventsWrapper.h: Prune two members, FinalizeThreadFunc and ↵NAKAMURA Takumi2012-11-221-6/+0
| | | | | | FinalizeProcessFunc, for now. [-Wunused-private-field] llvm-svn: 168495
* Implementing basic function-level profiling support in IntelJITEventListener.Andrew Kaylor2012-11-211-0/+75
| | | | | | Tests to follow in another patch. llvm-svn: 168444
* Add R_ARM_TARGET1 relocation to MCJIT and ensure that the runtime dyld readsAmara Emerson2012-11-162-3/+2
| | | | | | | | | all symbols during object loading, not just global ones. This fixes JIT execution of code using llvm.global_ctors with internal linkage constructors. llvm-svn: 168148
OpenPOWER on IntegriCloud