summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Fixing pedantic build warnings.Andrew Kaylor2015-01-151-2/+3
| | | | llvm-svn: 226214
* Switch this header file to not hard-code Windows line endings.Chandler Carruth2015-01-151-68/+68
| | | | llvm-svn: 226081
* [cleanup] Re-sort all the #include lines in LLVM usingChandler Carruth2015-01-145-22/+18
| | | | | | | | | | | utils/sort_includes.py. I clearly haven't done this in a while, so more changed than usual. This even uncovered a missing include from the InstrProf library that I've added. No functionality changed here, just mechanical cleanup of the include order. llvm-svn: 225974
* Fix undefined behavior (shift of negative value) in ↵Alexey Samsonov2015-01-101-2/+2
| | | | | | | | | | | | | | RuntimeDyldMachOAArch64::encodeAddend. Test Plan: regression test suite with/without UBSan. Reviewers: lhames, ributzka Subscribers: aemerson, llvm-commits Differential Revision: http://reviews.llvm.org/D6908 llvm-svn: 225568
* Fix the JIT event listeners and replace the associated tests.Andrew Kaylor2015-01-091-67/+68
| | | | | | | | | | The changes to EventListenerCommon.h were contributed by Arch Robison. This fixes bug 22095. http://reviews.llvm.org/D6905 llvm-svn: 225554
* RTDyldMemoryManager.cpp: Make the reference to __morestack weak.Peter Collingbourne2014-12-301-2/+4
| | | | | | | This fixes the DSO build for now. Eventually we should develop some other mechanism to make this work correctly with DSOs. llvm-svn: 225014
* The __morestack function is only available on i386 and x86_64 architectures.Peter Collingbourne2014-12-301-1/+4
| | | | llvm-svn: 224994
* Make the __morestack function available to the JIT memory manager under Linux.Peter Collingbourne2014-12-301-0/+7
| | | | | | | | | This function's implementation lives in libgcc, a static library, so we need to expose it explicitly, like the other such functions. Differential Revision: http://reviews.llvm.org/D6788 llvm-svn: 224993
* [C API] Expose LLVMGetGlobalValueAddress and LLVMGetFunctionAddress.Peter Zotov2014-12-221-0/+8
| | | | | | Patch by Ramkumar Ramachandra <artagnon@gmail.com> llvm-svn: 224720
* Fix line mapping information in LLVM JIT profiling with VtuneAlexey Bataev2014-12-151-0/+12
| | | | | | | | The line mapping information for dynamic code is reported incorrectly. It causes VTune to map LLVM generated code to source lines incorrectly. This patch fix this issue. Patch by Denis Pravdin. Differential Revision: http://reviews.llvm.org/D6603 llvm-svn: 224229
* Move three methods only used by MCJIT to MCJIT.Rafael Espindola2014-12-101-6/+34
| | | | | | | | These methods are only used by MCJIT and are very specific to it. In fact, they are also fairly specific to the fact that we have a dynamic linker of relocatable objects. llvm-svn: 223964
* [MCJIT] Unique-ptrify the RTDyldMemoryManager member of MCJIT. NFC.Lang Hames2014-12-034-12/+31
| | | | llvm-svn: 223183
* Add LLVMObject to LLVMExecutionEngine.NAKAMURA Takumi2014-11-271-1/+1
| | | | llvm-svn: 222869
* [MCJIT] Remove the local symbol table from RuntimeDlyd - it's not needed.Lang Hames2014-11-2710-77/+59
| | | | | | | | All symbols have to be stored in the global symbol to enable cross-rtdyld-instance linking, so the local symbol table content is redundant. llvm-svn: 222867
* [MCJIT] Replace JITEventListener::anchor (temporarily removed in r222861), andLang Hames2014-11-274-1/+3
| | | | | | move GDBRegistrationListener into ExecutionEngine to avoid layering violation. llvm-svn: 222864
* [MCJIT] Remove JITEventListener's anchor until I can determine the right placeLang Hames2014-11-271-3/+0
| | | | | | to put it. This should unbreak the Mips bots. llvm-svn: 222861
* [MCJIT] Move get-any-symbol-load-address logic out of RuntimeDyld and intoLang Hames2014-11-272-9/+3
| | | | | | | | | RuntimeDyldChecker. RuntimeDyld instances should only provide lookup for locally defined symbols. llvm-svn: 222859
OpenPOWER on IntegriCloud