[PATCH] D140727: [XRay] Add initial support for loongarch64

Lu Weining via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 28 06:08:25 PST 2022


SixWeining created this revision.
SixWeining added reviewers: MaskRay, xen0n, xry111.
Herald added subscribers: Enna1, StephenFan, hiraditya, dberris.
Herald added a project: All.
SixWeining requested review of this revision.
Herald added projects: clang, Sanitizers, LLVM.
Herald added subscribers: llvm-commits, Sanitizers, cfe-commits.

Only support patching FunctionEntry/FunctionExit/FunctionTailExit for now.

Currently version 0 (which uses absolute address) is used because
LoongArch doesn't have a single 64bit PC-relative reloction type like
32bit version R_LARCH_32_PCREL.
Perhaps we can use a pair of relocations (R_LARCH_ADD64/R_LARCH_SUB64)
as replacement but that needs some changes to the backend.

Depends on D140725 <https://reviews.llvm.org/D140725>


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D140727

Files:
  clang/lib/Driver/XRayArgs.cpp
  compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
  compiler-rt/lib/xray/CMakeLists.txt
  compiler-rt/lib/xray/xray_interface.cpp
  compiler-rt/lib/xray/xray_loongarch64.cpp
  compiler-rt/lib/xray/xray_trampoline_loongarch64.S
  compiler-rt/lib/xray/xray_tsc.h
  compiler-rt/test/xray/TestCases/Posix/always-never-instrument.cpp
  compiler-rt/test/xray/TestCases/Posix/arg1-arg0-logging.cpp
  compiler-rt/test/xray/TestCases/Posix/arg1-logger.cpp
  compiler-rt/test/xray/TestCases/Posix/arg1-logging-implicit-this.cpp
  compiler-rt/test/xray/TestCases/Posix/basic-filtering.cpp
  compiler-rt/test/xray/TestCases/Posix/c-test.cpp
  compiler-rt/test/xray/TestCases/Posix/clang-no-xray-instrument.cpp
  compiler-rt/test/xray/TestCases/Posix/fdr-mode-inmemory.cpp
  compiler-rt/test/xray/TestCases/Posix/fdr-mode-multiple.cpp
  compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cpp
  compiler-rt/test/xray/TestCases/Posix/fdr-thread-order.cpp
  compiler-rt/test/xray/TestCases/Posix/profiling-multi-threaded.cpp
  compiler-rt/test/xray/TestCases/Posix/profiling-single-threaded.cpp
  compiler-rt/test/xray/TestCases/Posix/quiet-start.cpp
  llvm/lib/CodeGen/XRayInstrumentation.cpp
  llvm/lib/Target/LoongArch/LoongArchAsmPrinter.cpp
  llvm/lib/Target/LoongArch/LoongArchAsmPrinter.h
  llvm/lib/Target/LoongArch/LoongArchInstrInfo.cpp
  llvm/lib/Target/LoongArch/LoongArchInstrInfo.h
  llvm/lib/Target/LoongArch/LoongArchSubtarget.h
  llvm/lib/XRay/InstrumentationMap.cpp
  llvm/test/CodeGen/LoongArch/xray-attribute-instrumentation.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140727.485495.patch
Type: text/x-patch
Size: 31221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221228/11c6ae15/attachment-0001.bin>


More information about the cfe-commits mailing list