[PATCH] D117929: [XRay] Add support for RISCV

Ashwin Poduval via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 21 14:39:58 PST 2022


ashwin98 created this revision.
ashwin98 added reviewers: dberris, asb.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, mgorny.
ashwin98 requested review of this revision.
Herald added subscribers: llvm-commits, Sanitizers, cfe-commits, eopXD, MaskRay.
Herald added projects: clang, Sanitizers, LLVM.

Adds XRay support for RISCV. Currently, only RISCV64 has been tested. Changes required to add support for RISCV32 are present, but are commented out.

The modifications (as in the case of RISCVAsmPrinter) were made with the intention of making as few changes/touching as few files as possible to reduce the possibility of breaking any other functionality.

The double precision floating point extension was assumed to be part of the ISA while designing the trampolines (and this has been enforced in the Subtarget file). This implementation currently does not support compressed instructions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117929

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_riscv32.cpp
  compiler-rt/lib/xray/xray_riscv64.cpp
  compiler-rt/lib/xray/xray_trampoline_riscv32.S
  compiler-rt/lib/xray/xray_trampoline_riscv64.S
  compiler-rt/lib/xray/xray_tsc.h
  llvm/lib/CodeGen/XRayInstrumentation.cpp
  llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
  llvm/lib/Target/RISCV/RISCVSubtarget.h
  llvm/test/CodeGen/RISCV/xray-attribute-instrumentation.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117929.402107.patch
Type: text/x-patch
Size: 42180 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220121/d2e41069/attachment-0001.bin>


More information about the cfe-commits mailing list