Skip to content

Commit 74e8a37

Browse files
committed
Revert "Reapply "[ORC] Introduce LazyReexportsManager, … (#118923)" with fixes"
This reverts commit 41652c6 while I investigate more bot failures.
1 parent f145ff3 commit 74e8a37

28 files changed

+80
-835
lines changed

compiler-rt/lib/orc/CMakeLists.txt

+1-4
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
# ORC runtime library common implementation files.
44
set(ORC_COMMON_SOURCES
55
debug.cpp
6-
dlfcn_wrapper.cpp
76
extensible_rtti.cpp
87
log_error_to_stderr.cpp
98
run_program_wrapper.cpp
10-
resolve.cpp
9+
dlfcn_wrapper.cpp
1110
)
1211

1312
# Common implementation headers will go here.
@@ -52,7 +51,6 @@ if (APPLE)
5251
set(ORC_ASM_SOURCES
5352
macho_tlv.x86-64.S
5453
macho_tlv.arm64.S
55-
sysv_reentry.arm64.S
5654
)
5755

5856
set(ORC_IMPL_HEADERS
@@ -118,7 +116,6 @@ else() # not Apple
118116
elfnix_tls.x86-64.S
119117
elfnix_tls.aarch64.S
120118
elfnix_tls.ppc64.S
121-
sysv_reentry.arm64.S
122119
)
123120
endif()
124121

compiler-rt/lib/orc/sysv_reentry.arm64.S

-102
This file was deleted.

compiler-rt/lib/orc/sysv_resolve.cpp

-49
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Test that the orc-remote-executor tool errors out as expected when called
2+
// with no arguments.
3+
//
4+
// RUN: not %orc_rt_executor 2>&1 | FileCheck %s
5+
6+
// CHECK: usage: orc-rt-executor [help] [<mode>] <program arguments>...

compiler-rt/test/orc/lit.cfg.py

-5
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@
1616
host_arch_compatible = True
1717
if host_arch_compatible:
1818
config.available_features.add("host-arch-compatible")
19-
20-
# If the target OS hasn't been set then assume host.
21-
if not config.target_os:
22-
config.target_os = config.host_os
23-
2419
config.test_target_is_host_executable = (
2520
config.target_os == config.host_os and host_arch_compatible
2621
)

llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h

-26
Original file line numberDiff line numberDiff line change
@@ -755,32 +755,6 @@ inline Symbol &createAnonymousPointerJumpStub(LinkGraph &G,
755755
sizeof(PointerJumpStubContent), true, false);
756756
}
757757

758-
/// AArch64 reentry trampoline.
759-
///
760-
/// Contains the instruction sequence for a trampoline that stores its return
761-
/// address on the stack and passes its own address in x0:
762-
/// STP x29, x30, [sp, #-16]!
763-
/// BL <reentry-symbol>
764-
extern const char ReentryTrampolineContent[8];
765-
766-
/// Create a block of N reentry trampolines.
767-
inline Block &createReentryTrampolineBlock(LinkGraph &G,
768-
Section &TrampolineSection,
769-
Symbol &ReentrySymbol) {
770-
auto &B = G.createContentBlock(TrampolineSection, ReentryTrampolineContent,
771-
orc::ExecutorAddr(~uint64_t(7)), 4, 0);
772-
B.addEdge(Branch26PCRel, 4, ReentrySymbol, 0);
773-
return B;
774-
}
775-
776-
inline Symbol &createAnonymousReentryTrampoline(LinkGraph &G,
777-
Section &TrampolineSection,
778-
Symbol &ReentrySymbol) {
779-
return G.addAnonymousSymbol(
780-
createReentryTrampolineBlock(G, TrampolineSection, ReentrySymbol), 0,
781-
sizeof(ReentryTrampolineContent), true, false);
782-
}
783-
784758
/// Global Offset Table Builder.
785759
class GOTTableManager : public TableManager<GOTTableManager> {
786760
public:

llvm/include/llvm/ExecutionEngine/Orc/Core.h

-27
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,6 @@ enum class SymbolState : uint8_t;
5151
using ResourceTrackerSP = IntrusiveRefCntPtr<ResourceTracker>;
5252
using JITDylibSP = IntrusiveRefCntPtr<JITDylib>;
5353

54-
/// A definition of a Symbol within a JITDylib.
55-
class SymbolInstance {
56-
public:
57-
using LookupAsyncOnCompleteFn =
58-
unique_function<void(Expected<ExecutorSymbolDef>)>;
59-
60-
SymbolInstance(JITDylibSP JD, SymbolStringPtr Name)
61-
: JD(std::move(JD)), Name(std::move(Name)) {}
62-
63-
const JITDylib &getJITDylib() const { return *JD; }
64-
const SymbolStringPtr &getName() const { return Name; }
65-
66-
Expected<ExecutorSymbolDef> lookup() const;
67-
void lookupAsync(LookupAsyncOnCompleteFn OnComplete) const;
68-
69-
private:
70-
JITDylibSP JD;
71-
SymbolStringPtr Name;
72-
};
73-
7454
using ResourceKey = uintptr_t;
7555

7656
/// API to remove / transfer ownership of JIT resources.
@@ -570,9 +550,6 @@ class MaterializationResponsibility {
570550
/// emitted or notified of an error.
571551
~MaterializationResponsibility();
572552

573-
/// Return the ResourceTracker associated with this instance.
574-
const ResourceTrackerSP &getResourceTracker() const { return RT; }
575-
576553
/// Runs the given callback under the session lock, passing in the associated
577554
/// ResourceKey. This is the safe way to associate resources with trackers.
578555
template <typename Func> Error withResourceKeyDo(Func &&F) const {
@@ -1771,10 +1748,6 @@ class ExecutionSession {
17711748
JITDispatchHandlers;
17721749
};
17731750

1774-
inline Expected<ExecutorSymbolDef> SymbolInstance::lookup() const {
1775-
return JD->getExecutionSession().lookup({JD.get()}, Name);
1776-
}
1777-
17781751
template <typename Func> Error ResourceTracker::withResourceKeyDo(Func &&F) {
17791752
return getJITDylib().getExecutionSession().runSessionLocked([&]() -> Error {
17801753
if (isDefunct())

llvm/include/llvm/ExecutionEngine/Orc/ELFNixPlatform.h

-5
Original file line numberDiff line numberDiff line change
@@ -138,11 +138,6 @@ class ELFNixPlatform : public Platform {
138138
static ArrayRef<std::pair<const char *, const char *>>
139139
standardRuntimeUtilityAliases();
140140

141-
/// Returns a list of aliases required to enable lazy compilation via the
142-
/// ORC runtime.
143-
static ArrayRef<std::pair<const char *, const char *>>
144-
standardLazyCompilationAliases();
145-
146141
private:
147142
// Data needed for bootstrap only.
148143
struct BootstrapInfo {

llvm/include/llvm/ExecutionEngine/Orc/JITLinkLazyCallThroughManager.h

-26
This file was deleted.

llvm/include/llvm/ExecutionEngine/Orc/JITLinkRedirectableSymbolManager.h

+6-8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ class JITLinkRedirectableSymbolManager : public RedirectableSymbolManager {
3939
ObjLinkingLayer, AnonymousPtrCreator, PtrJumpStubCreator));
4040
}
4141

42+
void emitRedirectableSymbols(std::unique_ptr<MaterializationResponsibility> R,
43+
SymbolMap InitialDests) override;
44+
45+
Error redirect(JITDylib &JD, const SymbolMap &NewDests) override;
46+
47+
private:
4248
JITLinkRedirectableSymbolManager(
4349
ObjectLinkingLayer &ObjLinkingLayer,
4450
jitlink::AnonymousPointerCreator &AnonymousPtrCreator,
@@ -47,14 +53,6 @@ class JITLinkRedirectableSymbolManager : public RedirectableSymbolManager {
4753
AnonymousPtrCreator(std::move(AnonymousPtrCreator)),
4854
PtrJumpStubCreator(std::move(PtrJumpStubCreator)) {}
4955

50-
ObjectLinkingLayer &getObjectLinkingLayer() const { return ObjLinkingLayer; }
51-
52-
void emitRedirectableSymbols(std::unique_ptr<MaterializationResponsibility> R,
53-
SymbolMap InitialDests) override;
54-
55-
Error redirect(JITDylib &JD, const SymbolMap &NewDests) override;
56-
57-
private:
5856
ObjectLinkingLayer &ObjLinkingLayer;
5957
jitlink::AnonymousPointerCreator AnonymousPtrCreator;
6058
jitlink::PointerJumpStubCreator PtrJumpStubCreator;

0 commit comments

Comments
 (0)