[all-commits] [llvm/llvm-project] 6154c4: [ORC] Remove OrcV1 APIs.

lhames via All-commits all-commits at lists.llvm.org
Sun Oct 18 21:23:04 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 6154c4115cd4b78d0171892aac21e340e72e32bd
      https://github.com/llvm/llvm-project/commit/6154c4115cd4b78d0171892aac21e340e72e32bd
  Author: Lang Hames <lhames at gmail.com>
  Date:   2020-10-18 (Sun, 18 Oct 2020)

  Changed paths:
    R llvm/include/llvm-c/OrcBindings.h
    M llvm/include/llvm/ExecutionEngine/ExecutionEngine.h
    M llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h
    M llvm/include/llvm/ExecutionEngine/Orc/Core.h
    M llvm/include/llvm/ExecutionEngine/Orc/ExecutionUtils.h
    R llvm/include/llvm/ExecutionEngine/Orc/GlobalMappingLayer.h
    M llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
    M llvm/include/llvm/ExecutionEngine/Orc/IRTransformLayer.h
    R llvm/include/llvm/ExecutionEngine/Orc/LambdaResolver.h
    R llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h
    R llvm/include/llvm/ExecutionEngine/Orc/Legacy.h
    R llvm/include/llvm/ExecutionEngine/Orc/NullResolver.h
    M llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h
    M llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
    R llvm/include/llvm/ExecutionEngine/Orc/RemoteObjectLayer.h
    M llvm/lib/ExecutionEngine/ExecutionEngine.cpp
    M llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
    M llvm/lib/ExecutionEngine/Orc/Core.cpp
    R llvm/lib/ExecutionEngine/Orc/Legacy.cpp
    R llvm/lib/ExecutionEngine/Orc/NullResolver.cpp
    R llvm/lib/ExecutionEngine/Orc/OrcCBindings.cpp
    R llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h
    R llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp
    R llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h
    M llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
    R llvm/test/ExecutionEngine/OrcMCJIT/2002-12-16-ArgTest.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-01-04-ArgumentBug.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-01-04-LoopTest.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-01-04-PhiTest.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-01-09-SARTest.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-01-10-FUCOM.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-01-15-AlignmentTest.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-05-06-LivenessClobber.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-05-07-ArgumentTest.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-05-11-PHIRegAllocBug.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-06-04-bzip2-bug.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-06-05-PHIBug.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-08-15-AllocaAssertion.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-08-21-EnvironmentTest.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-08-23-RegisterAllocatePhysReg.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2005-12-02-TailCallBug.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2007-12-10-APIntLoadStore.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2008-06-05-APInt-OverAShr.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/2013-04-04-RelocAddend.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/Inputs/cross-module-b.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-b.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-c.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/Inputs/multi-module-eh-b.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/Inputs/weak-function-2.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/cross-module-a.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/eh.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/fpbitcast.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/hello.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/hello2.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/lit.local.cfg
    R llvm/test/ExecutionEngine/OrcMCJIT/load-object-a.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/multi-module-a.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/multi-module-eh-a.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/non-extern-addend.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/pr13727.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/pr32650.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/Inputs/cross-module-b.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-b.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/Inputs/multi-module-c.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/cross-module-a.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/eh.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/lit.local.cfg
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/multi-module-a.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/simpletest-remote.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/stubs-remote.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/stubs-sm-pic.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/test-common-symbols-remote.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/test-data-align-remote.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/test-fp-no-external-funcs-remote.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-remote.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-sm-pic.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-remote.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-sm-pic.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/simplesttest.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/simpletest.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/stubs.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-arith.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-branch.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-call-no-external-funcs.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-call.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-cast.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-common-symbols-alignment.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-common-symbols.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-constantexpr.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-data-align.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-fp-no-external-funcs.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-fp.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-global-ctors.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-global.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-loadstore.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-local.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-logical.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-loop.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-phi.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-ret.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-return.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-setcond-fp.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-setcond-int.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/test-shift.ll
    R llvm/test/ExecutionEngine/OrcMCJIT/weak-function.ll
    M llvm/tools/lli/RemoteJITUtils.h
    M llvm/tools/lli/lli.cpp
    M llvm/tools/llvm-c-test/include-all.c
    M llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
    M llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
    R llvm/unittests/ExecutionEngine/Orc/GlobalMappingLayerTest.cpp
    R llvm/unittests/ExecutionEngine/Orc/LazyEmittingLayerTest.cpp
    R llvm/unittests/ExecutionEngine/Orc/LegacyAPIInteropTest.cpp
    R llvm/unittests/ExecutionEngine/Orc/LegacyCompileOnDemandLayerTest.cpp
    R llvm/unittests/ExecutionEngine/Orc/LegacyRTDyldObjectLinkingLayerTest.cpp
    R llvm/unittests/ExecutionEngine/Orc/ObjectTransformLayerTest.cpp
    R llvm/unittests/ExecutionEngine/Orc/OrcCAPITest.cpp
    M llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
    R llvm/unittests/ExecutionEngine/Orc/RemoteObjectLayerTest.cpp

  Log Message:
  -----------
  [ORC] Remove OrcV1 APIs.

This removes all legacy layers, legacy utilities, the old Orc C bindings,
OrcMCJITReplacement, and OrcMCJITReplacement regression tests.

ExecutionEngine and MCJIT are not affected by this change.


  Commit: 0aec49c8531bc5282b095730d34681455826bc2c
      https://github.com/llvm/llvm-project/commit/0aec49c8531bc5282b095730d34681455826bc2c
  Author: Lang Hames <lhames at gmail.com>
  Date:   2020-10-18 (Sun, 18 Oct 2020)

  Changed paths:
    M llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/LLJITWithObjectLinkingLayerPlugin.cpp
    M llvm/include/llvm/ExecutionEngine/Orc/Core.h
    M llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h
    M llvm/include/llvm/ExecutionEngine/Orc/Layer.h
    M llvm/include/llvm/ExecutionEngine/Orc/LazyReexports.h
    M llvm/include/llvm/ExecutionEngine/Orc/MachOPlatform.h
    M llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h
    M llvm/include/llvm/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.h
    M llvm/include/llvm/ExecutionEngine/RuntimeDyld.h
    M llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp
    M llvm/lib/ExecutionEngine/Orc/Core.cpp
    M llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp
    M llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp
    M llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp
    M llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
    M llvm/lib/ExecutionEngine/Orc/Layer.cpp
    M llvm/lib/ExecutionEngine/Orc/LazyReexports.cpp
    M llvm/lib/ExecutionEngine/Orc/MachOPlatform.cpp
    M llvm/lib/ExecutionEngine/Orc/ObjectLinkingLayer.cpp
    M llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp
    M llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.h
    M llvm/unittests/ExecutionEngine/Orc/CMakeLists.txt
    M llvm/unittests/ExecutionEngine/Orc/CoreAPIsTest.cpp
    M llvm/unittests/ExecutionEngine/Orc/OrcTestCommon.h
    M llvm/unittests/ExecutionEngine/Orc/RTDyldObjectLinkingLayerTest.cpp
    A llvm/unittests/ExecutionEngine/Orc/ResourceTrackerTest.cpp

  Log Message:
  -----------
  [ORC] Add support for resource tracking/removal (removable code).

This patch introduces new APIs to support resource tracking and removal in Orc.
It is intended as a thread-safe generalization of the removeModule concept from
OrcV1.

Clients can now create ResourceTracker objects (using
JITDylib::createResourceTracker) to track resources for each MaterializationUnit
(code, data, aliases, absolute symbols, etc.) added to the JIT. Every
MaterializationUnit will be associated with a ResourceTracker, and
ResourceTrackers can be re-used for multiple MaterializationUnits. Each JITDylib
has a default ResourceTracker that will be used for MaterializationUnits added
to that JITDylib if no ResourceTracker is explicitly specified.

Two operations can be performed on ResourceTrackers: transferTo and remove. The
transferTo operation transfers tracking of the resources to a different
ResourceTracker object, allowing ResourceTrackers to be merged to reduce
administrative overhead (the source tracker is invalidated in the process). The
remove operation removes all resources associated with a ResourceTracker,
including any symbols defined by MaterializationUnits associated with the
tracker, and also invalidates the tracker. These operations are thread safe, and
should work regardless of the the state of the MaterializationUnits. In the case
of resource transfer any existing resources associated with the source tracker
will be transferred to the destination tracker, and all future resources for
those units will be automatically associated with the destination tracker. In
the case of resource removal all already-allocated resources will be
deallocated, any if any program representations associated with the tracker have
not been compiled yet they will be destroyed. If any program representations are
currently being compiled then they will be prevented from completing: their
MaterializationResponsibility will return errors on any attempt to update the
JIT state.

Clients (usually Layer writers) wishing to track resources can implement the
ResourceManager API to receive notifications when ResourceTrackers are
transferred or removed. The MaterializationResponsibility::withResourceKeyDo
method can be used to create associations between the key for a ResourceTracker
and an allocated resource in a thread-safe way.

RTDyldObjectLinkingLayer and ObjectLinkingLayer are updated to use the
ResourceManager API to enable tracking and removal of memory allocated by the
JIT linker.

The new JITDylib::clear method can be used to trigger removal of every
ResourceTracker associated with the JITDylib (note that this will only
remove resources for the JITDylib, it does not run static destructors).

This patch includes unit tests showing basic usage. A follow-up patch will
update the Kaleidoscope and BuildingAJIT tutorial series to OrcV2 and will
use this API to release code associated with anonymous expressions.


  Commit: ad92f16ccc5f87625bfea2823cd79700bea52c54
      https://github.com/llvm/llvm-project/commit/ad92f16ccc5f87625bfea2823cd79700bea52c54
  Author: Lang Hames <lhames at gmail.com>
  Date:   2020-10-18 (Sun, 18 Oct 2020)

  Changed paths:
    M llvm/docs/tutorial/BuildingAJIT4.rst
    R llvm/docs/tutorial/BuildingAJIT5.rst
    M llvm/examples/Kaleidoscope/BuildingAJIT/CMakeLists.txt
    M llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/KaleidoscopeJIT.h
    M llvm/examples/Kaleidoscope/BuildingAJIT/Chapter1/toy.cpp
    M llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/KaleidoscopeJIT.h
    M llvm/examples/Kaleidoscope/BuildingAJIT/Chapter2/toy.cpp
    M llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/KaleidoscopeJIT.h
    M llvm/examples/Kaleidoscope/BuildingAJIT/Chapter3/toy.cpp
    M llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/KaleidoscopeJIT.h
    M llvm/examples/Kaleidoscope/BuildingAJIT/Chapter4/toy.cpp
    R llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/CMakeLists.txt
    R llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/KaleidoscopeJIT.h
    R llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/RemoteJITUtils.h
    R llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/CMakeLists.txt
    R llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/server.cpp
    R llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/toy.cpp
    M llvm/examples/Kaleidoscope/Chapter3/toy.cpp
    M llvm/examples/Kaleidoscope/Chapter4/toy.cpp
    M llvm/examples/Kaleidoscope/Chapter5/toy.cpp
    M llvm/examples/Kaleidoscope/Chapter6/toy.cpp
    M llvm/examples/Kaleidoscope/Chapter7/toy.cpp
    M llvm/examples/Kaleidoscope/Chapter8/toy.cpp
    M llvm/examples/Kaleidoscope/Chapter9/toy.cpp
    M llvm/examples/Kaleidoscope/include/KaleidoscopeJIT.h
    M llvm/include/llvm/ExecutionEngine/Orc/TPCIndirectionUtils.h
    M llvm/lib/ExecutionEngine/Orc/TPCIndirectionUtils.cpp

  Log Message:
  -----------
  [ORC][examples] Update Kaleidoscope and BuildingAJIT tutorial series to OrcV2.

This patch updates the Kaleidoscope and BuildingAJIT tutorial series (chapter
1-4) to OrcV2. Chapter 5 of the BuildingAJIT series is removed -- it will be
re-instated once we have in-tree support for out-of-process JITing.

This patch only updates the tutorial code, not the text. Patches welcome for
that, otherwise I will try to update it in a few weeks.


Compare: https://github.com/llvm/llvm-project/compare/f402e682d0ef...ad92f16ccc5f


More information about the All-commits mailing list