summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
* [Orc] Move delta-handling for trampoline sizes into the resolver block.Lang Hames2015-03-241-0/+2
| | | | | | | This is the first step towards adding a target-independent callback handler API. llvm-svn: 233049
* Raising minimum required CMake version to 2.8.12.2.Chris Bieneman2015-03-231-1/+1
| | | | | | This commit is in reference to the llvm-dev thread: http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-March/083672.html llvm-svn: 233008
* Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used.Benjamin Kramer2015-03-231-0/+1
| | | | llvm-svn: 232998
* Fix uses of reserved identifiers starting with an underscore followed by an ↵David Blaikie2015-03-161-8/+8
| | | | | | | | | uppercase letter This covers essentially all of llvm's headers and libs. One or two weird cases I wasn't sure were worth/appropriate to fix. llvm-svn: 232394
* [Orc][MCJIT][RuntimeDyld] Re-apply r231726 and r231724 with fix suggested byLang Hames2015-03-115-57/+46
| | | | | | Dave Blaikie. Thanks Dave! llvm-svn: 231896
* Temporarily revert r231726 and r231724 as they're breaking the build.:Eric Christopher2015-03-105-46/+57
| | | | | | | | | | | | | | | | | | | Author: Lang Hames <lhames@gmail.com> Date: Mon Mar 9 23:51:09 2015 +0000 [Orc][MCJIT][RuntimeDyld] Add header that was accidentally left out of r231724. Author: Lang Hames <lhames@gmail.com> Date: Mon Mar 9 23:44:13 2015 +0000 [Orc][MCJIT][RuntimeDyld] Add symbol flags to symbols in RuntimeDyld. Thread the new types through MCJIT and Orc. In particular, add a 'weak' flag. When plumbed through RTDyldMemoryManager, this will allow us to distinguish between weak and strong definitions and find the right ones during symbol resolution. llvm-svn: 231731
* [Orc][MCJIT][RuntimeDyld] Add symbol flags to symbols in RuntimeDyld. Thread theLang Hames2015-03-095-57/+46
| | | | | | | | | | new types through MCJIT and Orc. In particular, add a 'weak' flag. When plumbed through RTDyldMemoryManager, this will allow us to distinguish between weak and strong definitions and find the right ones during symbol resolution. llvm-svn: 231724
* Simplify expressions involving boolean constants with clang-tidyDavid Blaikie2015-03-091-1/+1
| | | | | | | | Patch by Richard (legalize at xmission dot com). Differential Revision: http://reviews.llvm.org/D8154 llvm-svn: 231617
* Fix the autoconf buildDavid Majnemer2015-03-073-195/+160
| | | | | | | | lib/ExecutionEngine/Targets has no Makefile, causing the autoconf build to fail. Solve this by bringing the COFF implementation of RuntimeDyld in line like the Mach-O and ELF implementations. llvm-svn: 231579
* Fix unused variable/function warningsDavid Majnemer2015-03-073-10/+7
| | | | llvm-svn: 231576
* ExecutionEngine: Preliminary support for dynamically loadable coff objectsDavid Majnemer2015-03-078-11/+434
| | | | | | | | | | 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
* Fold init() helpers into constructors. NFC.Benjamin Kramer2015-03-061-25/+12
| | | | llvm-svn: 231486
* Make DataLayout Non-Optional in the ModuleMehdi Amini2015-03-042-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: DataLayout keeps the string used for its creation. As a side effect it is no longer needed in the Module. This is "almost" NFC, the string is no longer canonicalized, you can't rely on two "equals" DataLayout having the same string returned by getStringRepresentation(). Get rid of DataLayoutPass: the DataLayout is in the Module The DataLayout is "per-module", let's enforce this by not duplicating it more than necessary. One more step toward non-optionality of the DataLayout in the module. Make DataLayout Non-Optional in the Module Module->getDataLayout() will never returns nullptr anymore. Reviewers: echristo Subscribers: resistor, llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D7992 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231270
* Add missing includes. make_unique proliferated everywhere.Benjamin Kramer2015-03-012-0/+2
| | | | llvm-svn: 230909
* Revert "Raising minimum required CMake version to 2.8.12.2."Tobias Grosser2015-02-241-1/+1
| | | | | | | | | | | This reverts commit r230062. Debian stable (wheezy) ships still with cmake 2.8.9. The commit broke my LLVM/Polly buildbot, to my knowledge our only Linux+cmake buildbot. llvm-svn: 230343
* Revert "Revert "Raising minimum required CMake version to 2.8.12.2.""Chad Rosier2015-02-231-1/+1
| | | | | | This reverts commit r230240, which was an accidental commit. llvm-svn: 230246
* Revert "Raising minimum required CMake version to 2.8.12.2."Chad Rosier2015-02-231-1/+1
| | | | | | This reverts commit 247aed4710e8befde76da42b27313661dea7cf66. llvm-svn: 230240
* [Orc] Remove redundant using directive.Lang Hames2015-02-221-2/+0
| | | | llvm-svn: 230154
* [Orc] Add header comment to IndirectionUtils.cpp.Lang Hames2015-02-221-0/+9
| | | | llvm-svn: 230153
* [Orc] Move Orc code into a namespace (llvm::orc), update Kaleidoscope code.Lang Hames2015-02-215-14/+29
| | | | | | NFC. llvm-svn: 230143
* Raising minimum required CMake version to 2.8.12.2.Chris Bieneman2015-02-201-1/+1
| | | | llvm-svn: 230062
* Don't deference the section_end() iterator.Rafael Espindola2015-02-171-0/+3
| | | | | | Hard to test given the undefined behavior nature. llvm-svn: 229530
* OrcJIT: Appease msc18 not to be confused on executeCompileCallback<OrcX86_64>.NAKAMURA Takumi2015-02-171-2/+3
| | | | llvm-svn: 229494
* Reformat.NAKAMURA Takumi2015-02-171-5/+3
| | | | llvm-svn: 229493
* [Orc] Update the Orc indirection utils and refactor the CompileOnDemand layer.Lang Hames2015-02-173-192/+162
| | | | | | | | | | | | | | This patch replaces most of the Orc indirection utils API with a new class: JITCompileCallbackManager, which creates and manages JIT callbacks. Exposing this functionality directly allows the user to create callbacks that are associated with user supplied compilation actions. For example, you can create a callback to lazyily IR-gen something from an AST. (A kaleidoscope example demonstrating this will be committed shortly). This patch also refactors the CompileOnDemand layer to use the JITCompileCallbackManager API. llvm-svn: 229461
* [ExecutionEngine] Fix dependence issue by moving RTDyldMemoryManager intoLang Hames2015-02-154-2/+2
| | | | | | | | RuntimeDyld. This should fix http://llvm.org/PR22593. llvm-svn: 229343
* [PM] Remove the old 'PassManager.h' header file at the top level ofChandler Carruth2015-02-131-2/+2
| | | | | | | | | | | | | | | | | | | | LLVM's include tree and the use of using declarations to hide the 'legacy' namespace for the old pass manager. This undoes the primary modules-hostile change I made to keep out-of-tree targets building. I sent an email inquiring about whether this would be reasonable to do at this phase and people seemed fine with it, so making it a reality. This should allow us to start bootstrapping with modules to a certain extent along with making it easier to mix and match headers in general. The updates to any code for users of LLVM are very mechanical. Switch from including "llvm/PassManager.h" to "llvm/IR/LegacyPassManager.h". Qualify the types which now produce compile errors with "legacy::". The most common ones are "PassManager", "PassManagerBase", and "FunctionPassManager". llvm-svn: 229094
* Re-sort #include lines using my handy dandy ./utils/sort_includes.pyChandler Carruth2015-02-132-2/+1
| | | | | | script. This is in preparation for changes to lots of include lines. llvm-svn: 229088
* Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects.Zachary Turner2015-02-112-0/+6
| | | | | | | | | | This allows IDEs to recognize the entire set of header files for each of the core LLVM projects. Differential Revision: http://reviews.llvm.org/D7526 Reviewed By: Chris Bieneman llvm-svn: 228798
* [Orc] Add a JITSymbol class to the Orc APIs, refactor APIs, update clients.Lang Hames2015-02-091-2/+2
| | | | | | | | | | | | | | | | This patch refactors a key piece of the Orc APIs: It removes the *::getSymbolAddress and *::lookupSymbolAddressIn methods, which returned target addresses (uint64_ts), and replaces them with *::findSymbol and *::findSymbolIn respectively, which return instances of the new JITSymbol type. Unlike the old methods, calling findSymbol or findSymbolIn does not cause the symbol to be immediately materialized when found. Instead, the symbol will be materialized if/when the getAddress method is called on the returned JITSymbol. This allows us to query for the existence of symbols without actually materializing them. In the future I expect more information to be attached to the JITSymbol class, for example whether the returned symbol is a weak or strong definition. This will allow us to properly handle weak symbols and multiple definitions. llvm-svn: 228557
* [Orc] Move SectionMemoryManager's implementation from MCJIT to ExecutionEngine.Lang Hames2015-02-063-1/+1
| | | | | | | This is a more sensible home for SectionMemoryManager, and allows the implementation to be shared between Orc and MCJIT. llvm-svn: 228427
* [MC] Remove various unused MCAsmInfo parameters.Sean Silva2015-02-051-6/+2
| | | | llvm-svn: 228244
* [Orc] Make OrcMCJITReplacement::addObject calls transfer buffer ownership to theLang Hames2015-02-021-2/+7
| | | | | | | | | | | | | | | 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 the OwnedModules list from OrcMCJITReplacement and useLang Hames2015-02-021-6/+2
| | | | | | | | | | | | ExecutionEngine's Modules list instead. This makes the owned modules visibile to ExecutionEngine. In particular, it is required for ExecutionEngine::runStaticConstructorsAndDestructors to work. Regression tests for Orc (which test this issue) will be committed shortly. llvm-svn: 227779
* Move DebugInfo to DebugInfo/DWARF.Zachary Turner2015-01-302-2/+2
| | | | | | | | | | | | | In preparation for adding PDB support to LLVM, this moves the DWARF parsing code to its own subdirectory under DebugInfo, and renames LLVMDebugInfo to LLVMDebugInfoDWARF. This is purely a mechanical / build system change. Differential Revision: http://reviews.llvm.org/D7269 Reviewed by: Eric Christopher llvm-svn: 227586
* Revert r227247 and r227228: "Add weak symbol support to RuntimeDyld".Lang Hames2015-01-283-31/+1
| | | | | | | | | This has wider implications than I expected when I reviewed the patch: It can cause JIT crashes where clients have used the default value for AbortOnFailure during symbol lookup. I'm currently investigating alternative approaches and I hope to have this back in tree soon. llvm-svn: 227287
* [ExecutionEngine] Add weak symbol support to RuntimeDyldKeno Fischer2015-01-273-1/+31
| | | | | | | | | | | Support weak symbols by first looking up if there is an externally visible symbol we can find, and only if that fails using the one in the object file we're loading. Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D6950 llvm-svn: 227228
* [ExecutionEngine] FindFunctionNamed: Skip declarationsKeno Fischer2015-01-272-2/+4
| | | | | | | | | | | | | | | | Summary: Basically all other methods that look up functions by name skip them if they are mere declarations. Do the same in FindFunctionNamed. Reviewers: lhames Reviewed By: lhames Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7068 llvm-svn: 227227
* Remove some extraneous includes.Eric Christopher2015-01-272-3/+0
| | | | llvm-svn: 227180
* Move DataLayout back to the TargetMachine from TargetSubtargetInfoEric Christopher2015-01-262-7/+6
| | | | | | | | | | | | | | | | | | | derived classes. Since global data alignment, layout, and mangling is often based on the DataLayout, move it to the TargetMachine. This ensures that global data is going to be layed out and mangled consistently if the subtarget changes on a per function basis. Prior to this all targets(*) have had subtarget dependent code moved out and onto the TargetMachine. *One target hasn't been migrated as part of this change: R600. The R600 port has, as a subtarget feature, the size of pointers and this affects global data layout. I've currently hacked in a FIXME to enable progress, but the port needs to be updated to either pass the 64-bitness to the TargetMachine, or fix the DataLayout to avoid subtarget dependent features. llvm-svn: 227113
* OrcJIT: Avoid non-static initializers.NAKAMURA Takumi2015-01-251-1/+1
| | | | llvm-svn: 227041
* Orc/LLVMBuild.txt: Prune redundant "Target" in libdeps.NAKAMURA Takumi2015-01-251-1/+1
| | | | llvm-svn: 227040
* [Orc] Add TransformUtils to Orc's dependency list.Lang Hames2015-01-241-1/+1
| | | | | | Patch by Jan Vesely. Thanks Jan! llvm-svn: 227011
* Fix the MSVC build with the new Orc JIT APIsReid Kleckner2015-01-231-2/+2
| | | | llvm-svn: 226949
* [Orc] Remove a bunch of constructors from ObjectLinkingLayer.Lang Hames2015-01-231-1/+2
| | | | | | | These constructors were causing trouble for MSVC and older GCCs. This should fix more of the build failures from r226940. llvm-svn: 226946
* [Orc] LLVMLinkInOrcMCJITReplacement shouldn't be in the anonymous namespace.Lang Hames2015-01-231-1/+2
| | | | | | This should fix some of the builder errors from r226940. llvm-svn: 226941
* [Orc] New JIT APIs.Lang Hames2015-01-2314-8/+886
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new set of JIT APIs to LLVM. The aim of these new APIs is to cleanly support a wider range of JIT use cases in LLVM, and encourage the development and contribution of re-usable infrastructure for LLVM JIT use-cases. These APIs are intended to live alongside the MCJIT APIs, and should not affect existing clients. Included in this patch: 1) New headers in include/llvm/ExecutionEngine/Orc that provide a set of components for building JIT infrastructure. Implementation code for these headers lives in lib/ExecutionEngine/Orc. 2) A prototype re-implementation of MCJIT (OrcMCJITReplacement) built out of the new components. 3) Minor changes to RTDyldMemoryManager needed to support the new components. These changes should not impact existing clients. 4) A new flag for lli, -use-orcmcjit, which will cause lli to use the OrcMCJITReplacement class as its underlying execution engine, rather than MCJIT itself. Tests to follow shortly. Special thanks to Michael Ilseman, Pete Cooper, David Blaikie, Eric Christopher, Justin Bogner, and Jim Grosbach for extensive feedback and discussion. llvm-svn: 226940
* [RuntimeDyld] Tidy up emitCommonSymbols a little. NFC.Lang Hames2015-01-172-46/+61
| | | | llvm-svn: 226358
* [RuntimeDyld] Remove the brace initialization that was introduced in r226341.Lang Hames2015-01-171-2/+2
| | | | | | Evidently MSVC doesn't like it. llvm-svn: 226349
* [RuntimeDyld] Track symbol visibility in RuntimeDyld.Lang Hames2015-01-165-38/+89
| | | | | | | | | | | | | | | | | | | RuntimeDyld symbol info previously consisted of just a Section/Offset pair. This patch replaces that pair type with a SymbolInfo class that also tracks symbol visibility. A new method, RuntimeDyld::getExportedSymbolLoadAddress, is introduced which only returns a non-zero result for exported symbols. For non-exported or non-existant symbols this method will return zero. The RuntimeDyld::getSymbolAddress method retains its current behavior, returning non-zero results for all symbols regardless of visibility. No in-tree clients of RuntimeDyld are changed. The newly introduced functionality will be used by the Orc APIs. No test case: Since this patch doesn't modify the behavior for any in-tree clients we don't have a good tool to test this with yet. Once Orc is in we can use it to write regression tests that test these changes. llvm-svn: 226341
OpenPOWER on IntegriCloud