- Sep 11, 2018
-
-
Lang Hames authored
The Create method can just construct the ExecutionSession, rather than having the client pass it in. llvm-svn: 341872
-
- Sep 06, 2018
-
-
Lang Hames authored
The existing memory manager API can not be shared between objects when linking concurrently (since there is no way to know which concurrent allocations were performed on behalf of which object, and hence which allocations would be safe to finalize when finalizeMemory is called). For now, we can work around this by requiring a new memory manager for each object. This change only affects the concurrent version of the ORC APIs. llvm-svn: 341579
-
Lang Hames authored
Section address mappings can be applied using the RuntimeDyld instance passed to the RuntimeDyld::MemoryManager::notifyObjectLoaded method. Proving an alternate route via RuntimeDyldObjectLinkingLayer2 is redundant. llvm-svn: 341578
-
- Sep 02, 2018
-
-
Lang Hames authored
llvm-svn: 341283
-
Lang Hames authored
Removes the implicit conversion to the underlying type for JITSymbolFlags::FlagNames and replaces it with some bitwise and comparison operators. llvm-svn: 341282
-
- Aug 31, 2018
-
-
Lang Hames authored
management and materialization responsibility registration. The setOverrideObjectFlagsWithResponsibilityFlags method instructs RTDyldObjectlinkingLayer2 to override the symbol flags produced by RuntimeDyld with the flags provided by the MaterializationResponsibility instance. This can be used to enable symbol visibility (hidden/exported) for COFF object files, which do not currently support the SF_Exported flag. The setAutoClaimResponsibilityForObjectSymbols method instructs RTDyldObjectLinkingLayer2 to claim responsibility for any symbols provided by a given object file that were not already in the MaterializationResponsibility instance. Setting this flag allows higher-level program representations (e.g. LLVM IR) to be added based on only a subset of the symbols they provide, without having to write intervening layers to scan and add the additional symbols. This trades diagnostic quality for convenience however: If all symbols are enumerated up-front then clashes can be detected and reported early. If this option is set, clashes for the additional symbols may not be detected until late, and detection may depend on the flow of control through JIT'd code. llvm-svn: 341154
-
- Aug 28, 2018
-
-
Lang Hames authored
The new method name/behavior more closely models the way it was being used. It also fixes an assertion that can occur when using the new ORC Core APIs, where flags alone don't necessarily provide enough context to decide whether the caller is responsible for materializing a given symbol (which was always the reason this API existed). The default implementation of getResponsibilitySet uses lookupFlags to determine responsibility as before, so existing JITSymbolResolvers should continue to work. llvm-svn: 340874
-
Lang Hames authored
The addObjectFile method adds the given object file to the JIT session, making its code available for execution. Support for the -extra-object flag is added to lli when operating in -jit-kind=orc-lazy mode to support testing of this feature. llvm-svn: 340870
-
- Aug 26, 2018
-
-
Lang Hames authored
Private symbols are not visible outside the object file, and so not defined by the object file from ORC's perspective. No test case yet. Ideally this would be a unit test parsing a checked-in binary, but I am not aware of any way to reference the LLVM source root from a unit test. llvm-svn: 340703
-
- Aug 18, 2018
-
-
Lang Hames authored
An emitted symbol has had its contents written and its memory protections applied, but it is not automatically ready to execute. Prior to ORC supporting concurrent compilation, the term "finalized" could be interpreted two different (but effectively equivalent) ways: (1) The finalized symbol's contents have been written and its memory protections applied, and (2) the symbol is ready to run. Now that ORC supports concurrent compilation, sense (1) no longer implies sense (2). We have already introduced a new term, 'ready', to capture sense (2), so rename sense (1) to 'emitted' to avoid any lingering confusion. llvm-svn: 340115
-
- Aug 17, 2018
-
-
Lang Hames authored
VSO was a little close to VDSO (an acronym on Linux for Virtual Dynamic Shared Object) for comfort. It also risks giving the impression that instances of this class could be shared between ExecutionSessions, which they can not. JITDylib seems moderately less confusing, while still hinting at how this class is intended to be used, i.e. as a JIT-compiled stand-in for a dynamic library (code that would have been a dynamic library if you had wanted to compile it ahead of time). llvm-svn: 340084
-
- Aug 06, 2018
-
-
Lang Hames authored
This code was moved out from BasicObjectLayerMaterializationUnit, which required the supplied object to be well formed. The getObjectSymbolFlags function does not require a well-formed object, so we have to propagate the error here. llvm-svn: 338975
-
Lang Hames authored
flags map from a buffer representing an object file. llvm-svn: 338974
-
- Aug 02, 2018
-
-
Lang Hames authored
An instance of ReexportsFallbackDefinitionGenerator can be attached to a VSO (via setFallbackDefinitionGenerator) to re-export symbols on demandy from a backing VSO. llvm-svn: 338764
-
Lang Hames authored
The callable flag can be used to indicate that a symbol is callable. If present, the symbol is callable. If absent, the symbol may or may not be callable (the client must determine this by context, for example by examining the program representation that will provide the symbol definition). This flag will be used in the near future to enable creation of lazy compilation stubs based on SymbolFlagsMap instances only (without having to provide additional information to determine which symbols need stubs). llvm-svn: 338649
-
- Jul 21, 2018
-
-
Lang Hames authored
llvm-svn: 337637
-
Lang Hames authored
llvm-svn: 337626
-
- Jul 20, 2018
-
-
Reid Kleckner authored
Breaks the build with LLVM_ENABLE_THREADS=OFF. llvm-svn: 337608
-
Lang Hames authored
deprecating SymbolResolver and AsynchronousSymbolQuery. Both lookup overloads take a VSO search order to perform the lookup. The first overload is non-blocking and takes OnResolved and OnReady callbacks. The second is blocking, takes a boolean flag to indicate whether to wait until all symbols are ready, and returns a SymbolMap. Both overloads take a RegisterDependencies function to register symbol dependencies (if any) on the query. llvm-svn: 337595
-
Lang Hames authored
This discards the unresolved symbols set and returns the flags map directly (rather than mutating it via the first argument). The unresolved symbols result made it easy to chain lookupFlags calls, but such chaining should be rare to non-existant (especially now that symbol resolvers are being deprecated) so the simpler method signature is preferable. llvm-svn: 337594
-
Lang Hames authored
A search order is a list of VSOs to be searched linearly to find symbols. Each VSO now has a search order that will be used when fixing up definitions in that VSO. Each VSO's search order defaults to just that VSO itself. This is a first step towards removing symbol resolvers from ORC altogether. In practice symbol resolvers tended to be used to implement a search order anyway, sometimes with additional programatic generation of symbols. Now that VSOs support programmatic generation of definitions via fallback generators, search orders provide a cleaner way to achieve the desired effect (while removing a lot of boilerplate). llvm-svn: 337593
-
- Jul 12, 2018
-
-
Stefan Granitz authored
llvm-svn: 336887
-
- Jul 11, 2018
-
-
Lang Hames authored
This patch broke a few buildbots. I will investigate and re-apply when I have a fix. llvm-svn: 336767
-
Lang Hames authored
and fix a bug that these exposed. llvm-svn: 336760
-
Lang Hames authored
symbols in another VSO). Also fixes a bug where chained aliases within a single VSO would deadlock on materialization. llvm-svn: 336741
-
- Jul 09, 2018
-
-
Lang Hames authored
delegate method (and unit test). The name 'replace' better captures what the old delegate method did: it returned materialization responsibility for a set of symbols to the VSO. The new delegate method delegates responsibility for a set of symbols to a new MaterializationResponsibility instance. This can be used to split responsibility between multiple threads, or multiple materialization methods. llvm-svn: 336603
-
- Jul 05, 2018
-
-
Heejin Ahn authored
Summary: CompileOnDemandLayer.cpp uses function in these libraries, and builds with `-DSHARED_LIB=ON` fail without this. Reviewers: lhames Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D48995 llvm-svn: 336389
-
Lang Hames authored
writing them to a buffer and re-loading them. Also introduces a multithreaded variant of SimpleCompiler (MultiThreadedSimpleCompiler) for compiling IR concurrently on multiple threads. These changes are required to JIT IR on multiple threads correctly. No test case yet. I will be looking at how to modify LLI / LLJIT to test multithreaded JIT support soon. llvm-svn: 336385
-
- Jul 03, 2018
-
-
Lang Hames authored
The verifier identified several modules that were broken due to incorrect linkage on declarations. To fix this, CompileOnDemandLayer2::extractFunction has been updated to change decls to external linkage. llvm-svn: 336150
-
- Jun 27, 2018
-
-
Lang Hames authored
This should fix the recent builder failures in the test-global-ctors.ll testcase. llvm-svn: 335680
-
Lang Hames authored
llvm-svn: 335677
-
Lang Hames authored
llvm-svn: 335673
-
- Jun 26, 2018
-
-
Lang Hames authored
LLJIT is a prefabricated ORC based JIT class that is meant to be the go-to replacement for MCJIT. Unlike OrcMCJITReplacement (which will continue to be supported) it is not API or bug-for-bug compatible, but targets the same use cases: Simple, non-lazy compilation and execution of LLVM IR. LLLazyJIT extends LLJIT with support for function-at-a-time lazy compilation, similar to what was provided by LLVM's original (now long deprecated) JIT APIs. This commit also contains some simple utility classes (CtorDtorRunner2, LocalCXXRuntimeOverrides2, JITTargetMachineBuilder) to support LLJIT and LLLazyJIT. Both of these classes are works in progress. Feedback from JIT clients is very welcome! llvm-svn: 335670
-
Lang Hames authored
AsynchronousSymbolQuery::canStillFail checks the value of the callback to prevent sending it redundant error notifications, so we need to reset it after running it. llvm-svn: 335664
-
Lang Hames authored
llvm-svn: 335663
-
Lang Hames authored
llvm-svn: 335661
-
Lang Hames authored
symbolAliases can be used to define symbol aliases within a VSO. llvm-svn: 335565
-
- Jun 23, 2018
-
-
Lang Hames authored
llvm-svn: 335408
-
- Jun 18, 2018
-
-
Lang Hames authored
CompileOnDemandLayer2 is a replacement for CompileOnDemandLayer built on the ORC Core APIs. Functions in added modules are extracted and compiled lazily. CompileOnDemandLayer2 supports multithreaded JIT'd code, and compilation on multiple threads. llvm-svn: 334967
-
Lang Hames authored
materializing weak symbols as strong. This removes some elaborate flag tweaking and plays nicer with RuntimeDyld, which relies of weak/common flags to determine whether it should emit a given weak definition. (Switching to strong up-front makes it appear as if there is already an overriding definition, which would require an extra back-channel to override). llvm-svn: 334966
-