summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
* Extend RTDyld API to enable optionally precomputing the total amount of memoryLang Hames2014-02-123-65/+205
| | | | | | | | | | | | | | | | | | required for all sections in a module. This can be useful when targets or code-models place strict requirements on how sections must be laid out in memory. If RTDyldMemoryManger::needsToReserveAllocationSpace() is overridden to return true then the JIT will call the following method on the memory manager, which can be used to preallocate the necessary memory. void RTDyldMemoryManager::reserveAllocationSpace(uintptr_t CodeSize, uintptr_t DataSizeRO, uintptr_t DataSizeRW) Patch by Vaidas Gasiunas. Thanks very much Viadas! llvm-svn: 201259
* [AArch64] Add missing PCRel relocations for AArch64 in RuntimeDyldELFBradley Smith2014-02-111-0/+42
| | | | llvm-svn: 201149
* In RuntimeDyldImpl::emitSection, make Allocate (section size to be allocated) aLang Hames2014-02-111-1/+1
| | | | | | | | | | | | | uintptr_t. An unsigned could overflow for large sections. No test case - anything big enough to overflow an unsigned is going to take an appreciable time to zero when the test passes. The choice of uintptr_t was made to match the RTDyldMemoryManager APIs, but these should probably be hardcoded to uint64_ts: It is legitimate to JIT for 64-bit targets from a 32-bit host/compiler. llvm-svn: 201127
* Change the begin and end methods in ObjectFile to match the style guide.Rafael Espindola2014-02-103-12/+12
| | | | llvm-svn: 201108
* Simplify getSymbolFlags.Rafael Espindola2014-01-311-2/+1
| | | | | | | None of the object formats require extra parsing to compute these flags, so the method cannot fail. llvm-svn: 200574
* Simplify the handling of iterators in ObjectFile.Rafael Espindola2014-01-302-23/+14
| | | | | | | | | | | | None of the object file formats reported error on iterator increment. In retrospect, that is not too surprising: no object format stores symbols or sections in a linked list or other structure that requires chasing pointers. As a consequence, all error checking can be done on begin() and end(). This reduces the text segment of bin/llvm-readobj in my machine from 521233 to 518526 bytes. llvm-svn: 200442
* Add support for PC-relative non-extern relocations to RuntimeDyldMachO.Lang Hames2014-01-291-0/+2
| | | | | | | | | 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-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | 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
* Fix known typosAlp Toker2014-01-244-10/+10
| | | | | | | Sweep the codebase for common typos. Includes some changes to visible function names that were misspelt. llvm-svn: 200018
* Add target analysis passes to the codegen pipeline for MCJIT.Juergen Ributzka2014-01-233-0/+15
| | | | | | | | | | | This patch adds the target analysis passes (usually TargetTransformInfo) to the codgen pipeline. We also expose now the AddAnalysisPasses method through the C API, because the optimizer passes would also benefit from better target-specific cost models. Reviewed by Andrew Kaylor llvm-svn: 199926
* Change createObjectFile to return an ErrorOr.Rafael Espindola2014-01-221-1/+2
| | | | llvm-svn: 199776
* Rename these methods to match the style guide.Rafael Espindola2014-01-211-1/+1
| | | | llvm-svn: 199751
* Attempt to fix the MSVC build.Rafael Espindola2014-01-161-0/+2
| | | | llvm-svn: 199352
* Prevent calls to __jit_debug_register_code from being optimized out.Rafael Espindola2014-01-161-1/+5
| | | | | | Patch by Andrew MacPherson. I just tweaked the comment. llvm-svn: 199350
* Return an error_code from materializeAllPermanently.Rafael Espindola2014-01-141-1/+4
| | | | llvm-svn: 199275
* Decouple dllexport/dllimport from linkageNico Rieck2014-01-141-3/+1
| | | | | | | | | | | | | | | | | | | Representing dllexport/dllimport as distinct linkage types prevents using these attributes on templates and inline functions. Instead of introducing further mixed linkage types to include linkonce and weak ODR, the old import/export linkage types are replaced with a new separate visibility-like specifier: define available_externally dllimport void @f() {} @Var = dllexport global i32 1, align 4 Linkage for dllexported globals and functions is now equal to their linkage without dllexport. Imported globals and functions must be either declarations with external linkage, or definitions with AvailableExternallyLinkage. llvm-svn: 199218
* Revert "Decouple dllexport/dllimport from linkage"Nico Rieck2014-01-141-1/+3
| | | | | | | | Revert this for now until I fix an issue in Clang with it. This reverts commit r199204. llvm-svn: 199207
* Decouple dllexport/dllimport from linkageNico Rieck2014-01-141-3/+1
| | | | | | | | | | | | | | | | | | | Representing dllexport/dllimport as distinct linkage types prevents using these attributes on templates and inline functions. Instead of introducing further mixed linkage types to include linkonce and weak ODR, the old import/export linkage types are replaced with a new separate visibility-like specifier: define available_externally dllimport void @f() {} @Var = dllexport global i32 1, align 4 Linkage for dllexported globals and functions is now equal to their linkage without dllexport. Imported globals and functions must be either declarations with external linkage, or definitions with AvailableExternallyLinkage. llvm-svn: 199204
* Re-sort #include lines again, prior to moving headers around.Chandler Carruth2014-01-131-1/+1
| | | | llvm-svn: 199080
* Re-apply r196639: Add support for archives and object file caching under MCJIT.Lang Hames2014-01-089-10/+149
| | | | | | | | | I believe the bot failures on linux systems were due to overestimating the alignment of object-files within archives, which are only guaranteed to be two-byte aligned. I have reduced the alignment in RuntimeDyldELF::createObjectImageFromFile accordingly. llvm-svn: 198737
* Move the llvm mangler to lib/IR.Rafael Espindola2014-01-071-1/+1
| | | | | | This makes it available to tools that don't link with target (like llvm-ar). llvm-svn: 198708
* Re-sort all of the includes with ./utils/sort_includes.py so thatChandler Carruth2014-01-075-7/+6
| | | | | | | | | | subsequent changes are easier to review. About to fix some layering issues, and wanted to separate out the necessary churn. Also comment and sink the include of "Windows.h" in three .inc files to match the usage in Memory.inc. llvm-svn: 198685
* Make the llvm mangler depend only on DataLayout.Rafael Espindola2014-01-031-2/+2
| | | | | | | | | | | | | | Before this patch any program that wanted to know the final symbol name of a GlobalValue had to link with Target. This patch implements a compromise solution where the mangler uses DataLayout. This way, any tool that already links with Target (llc, clang) gets the exact behavior as before and new IR files can be mangled without linking with Target. With this patch the mangler is constructed with just a DataLayout and DataLayout is extended to include the information the Mangler needs. llvm-svn: 198438
* There are no __register_frame and __deregister_frame functions Yaron Keren2013-12-171-1/+1
| | | | | | | | | | when using structured exception handling (SEH) on Windows 64. http://llvm-reviews.chandlerc.com/D2378 Patch by Jonathan Liu! llvm-svn: 197483
* Prune redundant dependencies in LLVMBuild.txt.NAKAMURA Takumi2013-12-114-4/+4
| | | | llvm-svn: 196988
* Whitespace cleanups.NAKAMURA Takumi2013-12-076-15/+13
| | | | llvm-svn: 196654
* Revert r196639 while I investigate a bot failure.Lang Hames2013-12-079-149/+10
| | | | llvm-svn: 196641
* Add support for archives and object file caching under MCJIT.Lang Hames2013-12-079-10/+149
| | | | | | Patch by Andy Kaylor, with minor edits to resolve merge conflicts. llvm-svn: 196639
* Remove the isImplicitlyPrivate argument of getNameWithPrefix.Rafael Espindola2013-12-051-1/+1
| | | | | | | | | | | | getSymbolWithGlobalValueBase use is to create a name of a new symbol based on the name of an existing GV. Assert that and then remove the last call to pass true to isImplicitlyPrivate. This gives the mangler API a 1:1 mapping from GV to names, which is what we need to drop the mangler dependency on the target (and use an extended datalayout instead). llvm-svn: 196472
* Use the mangler consistently instead of using getGlobalPrefix directly.Rafael Espindola2013-11-281-11/+9
| | | | llvm-svn: 195911
* [mips] Resolve relocation for the stubs in MCJIT when load address is knownPetar Jovanovic2013-11-191-5/+4
| | | | | | | | | | 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
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-194-0/+14
| | | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. The memory leaks in this version have been fixed. Thanks Alexey for pointing them out. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 195064
* Revert r194865 and r194874.Alexey Samsonov2013-11-184-12/+0
| | | | | | | | | | | | This change is incorrect. If you delete virtual destructor of both a base class and a subclass, then the following code: Base *foo = new Child(); delete foo; will not cause the destructor for members of Child class. As a result, I observe plently of memory leaks. Notable examples I investigated are: ObjectBuffer and ObjectBufferStream, AttributeImpl and StringSAttributeImpl. llvm-svn: 194997
* [weak vtables] Remove a bunch of weak vtablesJuergen Ributzka2013-11-154-0/+12
| | | | | | | | | | | This patch removes most of the trivial cases of weak vtables by pinning them to a single object file. Differential Revision: http://llvm-reviews.chandlerc.com/D2068 Reviewed by Andy llvm-svn: 194865
* Fix a problem in MCJIT identifying the module containing a global variable.Andrew Kaylor2013-11-151-2/+2
| | | | | | Patch by Keno Fischer! llvm-svn: 194859
* Path: Recognize COFF import library file magic.Rui Ueyama2013-11-151-0/+1
| | | | | | | | | | | | Summary: Make identify_magic to recognize COFF import file. Reviewers: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D2165 llvm-svn: 194852
* Resolve JIT runtime linking problems on Android.Andrew Kaylor2013-11-152-3/+84
| | | | | | Patch by James Lyon! llvm-svn: 194832
* Don't try to initialize memory for a global if the allocation failed in ↵Andrew Kaylor2013-11-151-0/+4
| | | | | | | | ExecutionEngine. Patch by Dale Martin! llvm-svn: 194831
* Correct spelling.Yaron Keren2013-11-151-1/+1
| | | | llvm-svn: 194808
* Fixing a problem with iterator validity in ↵Andrew Kaylor2013-11-111-2/+12
| | | | | | RuntimeDyldImpl::resolveExternalSymbols llvm-svn: 194415
* The FIXME was indeed fixed in the linker, comment removed.Yaron Keren2013-10-251-4/+0
| | | | llvm-svn: 193402
* Replaced non-ASCII character.Yaron Keren2013-10-241-1/+1
| | | | llvm-svn: 193324
* Revert part of r193291, restoring the deletion of loaded objects.Chandler Carruth2013-10-241-0/+9
| | | | | | | | | | | Without this, customers of the MCJIT were leaking memory like crazy. It's not really clear what the *right* memory management is here, so I'm not trying to add lots of tests or other logic, just trying to get us back to a better baseline. I'll follow up on the original commit to figure out the right path forward. llvm-svn: 193323
* Optimizing MCJIT module state trackingAndrew Kaylor2013-10-242-122/+209
| | | | | | Patch co-developed with Yaron Keren. llvm-svn: 193291
* FIXME comment shouldn't have been doxygen styleAndrew Kaylor2013-10-211-1/+1
| | | | llvm-svn: 193131
* Improving MCJIT/RuntimeDyld thread safetyAndrew Kaylor2013-10-214-12/+40
| | | | llvm-svn: 193094
* Avoid duplicate search by reusing the iterator.Yaron Keren2013-10-192-5/+7
| | | | llvm-svn: 193034
* Added comments from Andrew Kaylor.Yaron Keren2013-10-191-0/+21
| | | | llvm-svn: 193033
* Adding oprofile support for MCJIT.Andrew Kaylor2013-10-162-1/+72
| | | | | | Patch by Dmitry Stogov llvm-svn: 192809
* Really fix build warning/error that I think r192756 was trying to fix.Craig Topper2013-10-161-4/+4
| | | | llvm-svn: 192773
OpenPOWER on IntegriCloud