13 #ifndef LLVM_LIB_EXECUTIONENGINE_JITLINK_BASICGOTANDSTUBSBUILDER_H 14 #define LLVM_LIB_EXECUTIONENGINE_JITLINK_BASICGOTANDSTUBSBUILDER_H 30 for (
auto *
B : Blocks)
31 for (
auto &
E :
B->edges())
32 if (impl().isGOTEdge(
E))
34 else if (impl().isExternalBranchEdge(
E))
40 assert(Target.
hasName() &&
"GOT edge cannot point to anonymous target");
42 auto GOTEntryI = GOTEntries.find(Target.
getName());
45 if (GOTEntryI == GOTEntries.end()) {
46 auto &GOTEntry = impl().createGOTEntry(Target);
48 GOTEntries.insert(std::make_pair(Target.
getName(), &GOTEntry)).first;
51 assert(GOTEntryI != GOTEntries.end() &&
"Could not get GOT entry symbol");
52 return *GOTEntryI->second;
57 "External branch edge can not point to an anonymous target");
58 auto StubI = Stubs.find(Target.
getName());
60 if (StubI == Stubs.end()) {
61 auto &StubSymbol = impl().createStub(Target);
62 StubI = Stubs.insert(std::make_pair(Target.
getName(), &StubSymbol)).first;
65 assert(StubI != Stubs.end() &&
"Count not get stub symbol");
66 return *StubI->second;
72 BuilderImpl &impl() {
return static_cast<BuilderImpl &
>(*this); }
81 #endif // LLVM_LIB_EXECUTIONENGINE_JITLINK_BASICGOTANDSTUBSBUILDER_H
This class represents lattice values for constants.
StringRef getName() const
Returns the name of this symbol (empty if the symbol is anonymous).
iterator_range< block_iterator > blocks()
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
Symbol & getStubSymbol(Symbol &Target)
Symbol & getGOTEntrySymbol(Symbol &Target)
BasicGOTAndStubsBuilder(LinkGraph &G)
Target - Wrapper for Target specific information.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool hasName() const
Returns true if this symbol has a name.