[PATCH] D144083: [JITLink] Initial AArch32 backend
Stefan Gränitz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 13 02:22:11 PDT 2023
sgraenitz added inline comments.
================
Comment at: llvm/lib/ExecutionEngine/JITLink/ELF_aarch32.cpp:78-89
+const char *getEdgeKindName(Edge::Kind Kind) {
+ auto ELFType = getELFRelocationType(Kind);
+ if (!ELFType)
+ return getGenericEdgeKindName(Kind);
+ StringRef Name = object::getELFRelocationTypeName(ELF::EM_ARM, *ELFType);
+
+ // FIXME: In order to match the LinkGraph::GetEdgeKindNameFunction interface,
----------------
lhames wrote:
> This should return the name of the JITLink edge enum, rather than the ELF relocation. That's not a blocker for landing though.
Do we need the name of the internal edge-kind? I moved the function here from `aarch32.h` to allow format-specific output. (I still have to see how it works out with intermediate edge kinds.)
================
Comment at: llvm/lib/ExecutionEngine/JITLink/aarch32.cpp:133
+/// followed by bytes A+3, A+2 in the second halfword (Lo).
+class ThumbRelocation {
+public:
----------------
lhames wrote:
> Could this be two types -- `ThumbRelocation` and `MutableThumbRelocation`, with `ThumbRelocation`s constructible from `MutableThumbRelocation`s?
Yes, it's cleaner like that and it could be structs not classes
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144083/new/
https://reviews.llvm.org/D144083
More information about the llvm-commits
mailing list