[all-commits] [llvm/llvm-project] ecf646: [JITLink][MachO][x86-64] Introduce generic x86-64 ...

lhames via All-commits all-commits at lists.llvm.org
Mon Mar 15 16:01:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ecf6466f01c52ebd8c86575dfdc03fe08ad1b2e0
      https://github.com/llvm/llvm-project/commit/ecf6466f01c52ebd8c86575dfdc03fe08ad1b2e0
  Author: Lang Hames <lhames at gmail.com>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M llvm/include/llvm/ExecutionEngine/JITLink/ELF_x86_64.h
    M llvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
    M llvm/include/llvm/ExecutionEngine/JITLink/MachO_arm64.h
    M llvm/include/llvm/ExecutionEngine/JITLink/MachO_x86_64.h
    A llvm/include/llvm/ExecutionEngine/JITLink/x86_64.h
    M llvm/lib/ExecutionEngine/JITLink/BasicGOTAndStubsBuilder.h
    M llvm/lib/ExecutionEngine/JITLink/CMakeLists.txt
    M llvm/lib/ExecutionEngine/JITLink/ELF_x86_64.cpp
    M llvm/lib/ExecutionEngine/JITLink/JITLink.cpp
    M llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.cpp
    M llvm/lib/ExecutionEngine/JITLink/JITLinkGeneric.h
    M llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.cpp
    M llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h
    M llvm/lib/ExecutionEngine/JITLink/MachO_arm64.cpp
    M llvm/lib/ExecutionEngine/JITLink/MachO_x86_64.cpp
    A llvm/lib/ExecutionEngine/JITLink/x86_64.cpp
    M llvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp

  Log Message:
  -----------
  [JITLink][MachO][x86-64] Introduce generic x86-64 support.

This patch introduces generic x86-64 edge kinds, and refactors the MachO/x86-64
backend to use these edge kinds. This simplifies the implementation of the
MachO/x86-64 backend and makes it possible to write generic x86-64 passes and
utilities.

The new edge kinds are different from the original set used in the MachO/x86-64
backend. Several edge kinds that were not meaningfully distinguished in that
backend (e.g. the PCRelMinusN edges) have been merged into single edge kinds in
the new scheme (these edge kinds can be reintroduced later if we find a use for
them). At the same time, new edge kinds have been introduced to convey extra
information about the state of the graph. E.g. The Request*AndTransformTo**
edges represent GOT/TLVP relocations prior to synthesis of the GOT/TLVP
entries, and the 'Relaxable' suffix distinguishes edges that are candidates for
optimization from edges which should be left as-is (e.g. to enable runtime
redirection).

ELF/x86-64 will be refactored to use these generic edges at some point in the
future, and I anticipate a similar refactor to create a generic arm64 support
header too.

Differential Revision: https://reviews.llvm.org/D98305




More information about the All-commits mailing list