Skip to content
  1. Apr 22, 2018
  2. Apr 13, 2018
  3. Apr 11, 2018
    • David Blaikie's avatar
      Rename *CommandFlags.def to *CommandFlags.inc · 4333f970
      David Blaikie authored
      These aren't the .def style files used in LLVM that require a macro
      defined before their inclusion - they're just basic non-modular includes
      to stamp out command line flag variables.
      
      llvm-svn: 329840
      4333f970
  4. Apr 02, 2018
  5. Mar 15, 2018
  6. Mar 14, 2018
  7. Feb 14, 2018
  8. Feb 09, 2018
    • Lang Hames's avatar
      [ORC] Remove Layer handles from the layer concept. · 0976cee8
      Lang Hames authored
      Handles were returned by addModule and used as keys for removeModule,
      findSymbolIn, and emitAndFinalize. Their job is now subsumed by VModuleKeys,
      which simplify resource management by providing a consistent handle across all
      layers.
      
      llvm-svn: 324700
      0976cee8
  9. Feb 06, 2018
    • Lang Hames's avatar
      [ORC] Remove some unused lambda captures. · e33798f5
      Lang Hames authored
      llvm-svn: 324410
      e33798f5
    • Lang Hames's avatar
      [ORC] Start migrating ORC layers to use the new ORC Core.h APIs. · 4b546c91
      Lang Hames authored
      In particular this patch switches RTDyldObjectLinkingLayer to use
      orc::SymbolResolver and threads the requried changse (ExecutionSession
      references and VModuleKeys) through the existing layer APIs.
      
      The purpose of the new resolver interface is to improve query performance and
      better support parallelism, both in JIT'd code and within the compiler itself.
      
      The most visibile change is switch of the <Layer>::addModule signatures from:
      
      Expected<Handle> addModule(std::shared_ptr<ModuleType> Mod,
                                 std::shared_ptr<JITSymbolResolver> Resolver)
      
      to:
      
      Expected<Handle> addModule(VModuleKey K, std::shared_ptr<ModuleType> Mod);
      
      Typical usage of addModule will now look like:
      
      auto K = ES.allocateVModuleKey();
      Resolvers[K] = createSymbolResolver(...);
      Layer.addModule(K, std::move(Mod));
      
      See the BuildingAJIT tutorial code for example usage.
      
      llvm-svn: 324405
      4b546c91
  10. Jan 19, 2018
    • Lang Hames's avatar
      [ORC] Re-apply r322913 with a fix for a read-after-free error. · b72f4845
      Lang Hames authored
      ExternalSymbolMap now stores the string key (rather than using a StringRef),
      as the object file backing the key may be removed at any time.
      
      llvm-svn: 323001
      b72f4845
    • Lang Hames's avatar
      [ORC] Revert r322913 while I investigate an ASan failure. · 44efd042
      Lang Hames authored
      llvm-svn: 322914
      44efd042
    • Lang Hames's avatar
      [ORC] Redesign the JITSymbolResolver interface to support bulk queries. · 817df9fa
      Lang Hames authored
      Bulk queries reduce IPC/RPC overhead for cross-process JITing and expose
      opportunities for parallel compilation.
      
      The two new query methods are lookupFlags, which finds the flags for each of a
      set of symbols; and lookup, which finds the address and flags for each of a
      set of symbols. (See doxygen comments for more details.)
      
      The existing JITSymbolResolver class is renamed LegacyJITSymbolResolver, and
      modified to extend the new JITSymbolResolver class using the following scheme:
      
      - lookupFlags is implemented by calling findSymbolInLogicalDylib for each of the
      symbols, then returning the result of calling getFlags() on each of these
      symbols. (Importantly: lookupFlags does NOT call getAddress on the returned
      symbols, so lookupFlags will never trigger materialization, and lookupFlags will
      never call findSymbol, so only symbols that are part of the logical dylib will
      return results.)
      
      - lookup is implemented by calling findSymbolInLogicalDylib for each symbol and
      falling back to findSymbol if findSymbolInLogicalDylib returns a null result.
      Assuming a symbol is found its getAddress method is called to materialize it and
      the result (if getAddress succeeds) is stored in the result map, or the error
      (if getAddress fails) is returned immediately from lookup. If any symbol is not
      found then lookup returns immediately with an error.
      
      This change will break any out-of-tree derivatives of JITSymbolResolver. This
      can be fixed by updating those classes to derive from LegacyJITSymbolResolver
      instead.
      
      llvm-svn: 322913
      817df9fa
  11. Jan 09, 2018
    • Craig Topper's avatar
      [lli] Make lli support -mcpu=native for CPU autodetection · 243f20f1
      Craig Topper authored
      llc, opt, and clang can all autodetect the CPU and supported features. lli cannot as far as I could tell.
      
      This patch uses the getCPUStr() and introduces a new getCPUFeatureList() and uses those in lli in place of MCPU and MAttrs.
      
      Ideally, we would merge getCPUFeatureList and getCPUFeatureStr, but opt and llc need a string and lli wanted a list. Maybe we should just return the SubtargetFeature object and let the caller decide what it needs?
      
      Differential Revision: https://reviews.llvm.org/D41833
      
      llvm-svn: 322100
      243f20f1
  12. Nov 27, 2017
    • David Blaikie's avatar
      Rename CommandFlags.h -> CommandFlags.def · c14bfec4
      David Blaikie authored
      Since this isn't a real header - it includes static functions and had
      external linkage variables (though this change makes them static, since
      that's what they should be) so can't be included more than once in a
      program.
      
      llvm-svn: 319082
      c14bfec4
  13. Sep 04, 2017
    • Lang Hames's avatar
      [ORC] Refactor OrcRemoteTarget code to expose its RPC API, reduce · 9e68b734
      Lang Hames authored
      code duplication in the client, and improve error propagation.
      
      This patch moves the OrcRemoteTarget rpc::Function declarations from
      OrcRemoteTargetRPCAPI into their own namespaces under llvm::orc::remote so that
      they can be used in new contexts (in particular, a remote-object-file adapter
      layer that I will commit shortly).
      
      Code duplication in OrcRemoteTargetClient (especially in loops processing the
      code, rw-data and ro-data allocations) is removed by moving the loop bodies
      into their own functions.
      
      Error propagation is (slightly) improved by adding an ErrorReporter functor to
      the OrcRemoteTargetClient -- Errors that can't be returned (because they occur
      in destructors, or behind stable APIs that don't provide error returns) can be
      sent to the ErrorReporter instead. Some methods in the Client API are also
      changed to make better use of the Expected class: returning Expected<T>s rather
      than returning Errors and taking T&s to store the results.
      
      llvm-svn: 312500
      9e68b734
  14. Aug 28, 2017
  15. Aug 11, 2017
  16. Aug 03, 2017
    • Rafael Espindola's avatar
      Delete Default and JITDefault code models · 79e238af
      Rafael Espindola authored
      IMHO it is an antipattern to have a enum value that is Default.
      
      At any given piece of code it is not clear if we have to handle
      Default or if has already been mapped to a concrete value. In this
      case in particular, only the target can do the mapping and it is nice
      to make sure it is always done.
      
      This deletes the two default enum values of CodeModel and uses an
      explicit Optional<CodeModel> when it is possible that it is
      unspecified.
      
      llvm-svn: 309911
      79e238af
  17. Jul 11, 2017
  18. Jul 07, 2017
    • Lang Hames's avatar
      [ORC] Errorize the ORC APIs. · 4ce98662
      Lang Hames authored
      This patch updates the ORC layers and utilities to return and propagate
      llvm::Errors where appropriate. This is necessary to allow ORC to safely handle
      error cases in cross-process and remote JITing.
      
      llvm-svn: 307350
      4ce98662
  19. Jul 04, 2017
    • Lang Hames's avatar
      [Orc] Remove the memory manager argument to addModule, and de-templatize the · 5b518160
      Lang Hames authored
      symbol resolver argument.
      
      De-templatizing the symbol resolver is part of the ongoing simplification of
      ORC layer API.
      
      Removing the memory management argument (and delegating construction of memory
      managers for RTDyldObjectLinkingLayer to a functor passed in to the constructor)
      allows us to build JITs whose base object layers need not be compatible with
      RTDyldObjectLinkingLayer's memory mangement scheme. For example, a 'remote
      object layer' that sends fully relocatable objects directly to the remote does
      not need a memory management scheme at all (that will be handled by the remote).
      
      llvm-svn: 307058
      5b518160
  20. Jun 24, 2017
  21. Jun 23, 2017
  22. Jun 22, 2017
  23. Jun 20, 2017
  24. May 09, 2017
    • Lang Hames's avatar
      [ExecutionEngine] Make RuntimeDyld::MemoryManager responsible for tracking EH · c936ac7f
      Lang Hames authored
      frames.
      
      RuntimeDyld was previously responsible for tracking allocated EH frames, but it
      makes more sense to have the RuntimeDyld::MemoryManager track them (since the
      frames are allocated through the memory manager, and written to memory owned by
      the memory manager). This patch moves the frame tracking into
      RTDyldMemoryManager, and changes the deregisterFrames method on
      RuntimeDyld::MemoryManager from:
      
      void deregisterEHFrames(uint8_t *Addr, uint64_t LoadAddr, size_t Size);
      
      to:
      
      void deregisterEHFrames();
      
      Separating this responsibility will allow ORC to continue to throw the
      RuntimeDyld instances away post-link (saving a few dozen bytes per lazy
      function) while properly deregistering frames when modules are unloaded.
      
      This patch also updates ORC to call deregisterEHFrames when modules are
      unloaded. This fixes a bug where an exception that tears down the JIT can then
      unwind through dangling EH frames that have been deallocated but not
      deregistered, resulting in UB.
      
      For people using SectionMemoryManager this should be pretty much a no-op. For
      people with custom allocators that override registerEHFrames/deregisterEHFrames,
      you will now be responsible for tracking allocated EH frames.
      
      Reviewed in https://reviews.llvm.org/D32829
      
      llvm-svn: 302589
      c936ac7f
  25. Apr 11, 2017
  26. Apr 06, 2017
  27. Feb 20, 2017
    • Lang Hames's avatar
      [Orc] Rename ObjectLinkingLayer -> RTDyldObjectLinkingLayer. · 67de5d24
      Lang Hames authored
      The current ObjectLinkingLayer (now RTDyldObjectLinkingLayer) links objects
      in-process using MCJIT's RuntimeDyld class. In the near future I hope to add new
      object linking layers (e.g. a remote linking layer that links objects in the JIT
      target process, rather than the client), so I'm renaming this class to be more
      descriptive.
      
      llvm-svn: 295636
      67de5d24
  28. Dec 08, 2016
  29. Nov 20, 2016
  30. Nov 19, 2016
Loading