[llvm] b4db2da - [JITLink][AArch64] Remove unused Pointer64Anon edge kind.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 30 11:21:14 PDT 2022
Author: Lang Hames
Date: 2022-10-30T11:21:08-07:00
New Revision: b4db2da420dce3f52e6a003e9a41a68c1747cef4
URL: https://github.com/llvm/llvm-project/commit/b4db2da420dce3f52e6a003e9a41a68c1747cef4
DIFF: https://github.com/llvm/llvm-project/commit/b4db2da420dce3f52e6a003e9a41a68c1747cef4.diff
LOG: [JITLink][AArch64] Remove unused Pointer64Anon edge kind.
Pointer64Anon was lifted out of the MachO backend and into aarch64.h when that
header was created, but Pointer64Anon is really a MachO-specific "normalized"
relocation value, rather than a generic Edge::Kind. Any uses can be safely
replaced with Pointer64.
(Side note: the role of MachOPointer64Anon is to aid MachO relocation parsing:
For MachOPointer64, the target symbol is specified by the r_symbolnum field in
the relocation. For MachOPointer64Anon the address of the anonymous target is
read from the fixup location.)
Added:
Modified:
llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h b/llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
index 9b50fb1ee0301..55ba22a97fd45 100644
--- a/llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
+++ b/llvm/include/llvm/ExecutionEngine/JITLink/aarch64.h
@@ -25,7 +25,6 @@ enum EdgeKind_aarch64 : Edge::Kind {
Branch26 = Edge::FirstRelocation,
Pointer32,
Pointer64,
- Pointer64Anon,
Page21,
PageOffset12,
MoveWide16,
@@ -131,8 +130,7 @@ inline Error applyFixup(LinkGraph &G, Block &B, const Edge &E) {
*(ulittle32_t *)FixupPtr = Value;
break;
}
- case Pointer64:
- case Pointer64Anon: {
+ case Pointer64: {
uint64_t Value = E.getTarget().getAddress().getValue() + E.getAddend();
*(ulittle64_t *)FixupPtr = Value;
break;
diff --git a/llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp b/llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
index d243a1ff01cd9..28beb077318da 100644
--- a/llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
@@ -362,7 +362,7 @@ class MachOLinkGraphBuilder_arm64 : public MachOLinkGraphBuilder {
else
return TargetSymbolOrErr.takeError();
Addend = TargetAddress - TargetSymbol->getAddress();
- Kind = aarch64::Pointer64Anon;
+ Kind = aarch64::Pointer64;
break;
}
case MachOPage21:
diff --git a/llvm/lib/ExecutionEngine/JITLink/aarch64.cpp b/llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
index 1b75e540b0e25..ada92f10203de 100644
--- a/llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
+++ b/llvm/lib/ExecutionEngine/JITLink/aarch64.cpp
@@ -32,8 +32,6 @@ const char *getEdgeKindName(Edge::Kind R) {
return "Branch26";
case Pointer64:
return "Pointer64";
- case Pointer64Anon:
- return "Pointer64Anon";
case Page21:
return "Page21";
case PageOffset12:
More information about the llvm-commits
mailing list