This patch unify optimizeELF_x86_64_GOTAndStubs and optimizeMachO_x86_64_GOTAndStubs into a pure optimize_x86_64_GOTAndStubs
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Hi Stephen,
Please address the inline comments before committing. Otherwise LGTM. Thank you very much for this work!
- Lang.
llvm/lib/ExecutionEngine/JITLink/x86_64.cpp | ||
---|---|---|
80–83 | This should assert, rather than silently continuing -- a graph with an invalid edge is malformed. | |
96–97 | This can use the x86_64::isInRangeForImmS32 function now (the original optimize functions predate the utility, which is why it wasn't used before). | |
109 | This should use x86_64::getEdgeKindName(E.getKind()). | |
131–132 | This can also use isInRangeForImmS32. | |
137 | This should also use x86_64::getEdgeKindName(E.getKind()). |
Stephen and I discussed this further on discord and realized that some generic x86-64 edge kinds needed to be renamed to avoid confusion (ELF allows several relaxations that aren't possible in MachO).
The necessary renames have been made in 632135acae2 and 27ea3f16072.
Stephen -- You'll need to rebase to account for the renames, but otherwise this should be good to land now.
This should assert, rather than silently continuing -- a graph with an invalid edge is malformed.