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

Ashwin Poduval via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 24 08:05:55 PST 2022


ashwin98 updated this revision to Diff 402533.
ashwin98 added a comment.
Herald added a subscriber: pcwang-thead.

Updated the diff, made the following changes:

1. Merged the riscv files into xray_riscv.cpp and removed the if-else code for %hi()
2. Cleaned up the issues related to indenting and comments in RISCVAsmPrinter.cpp
3. Updated the test file to pass -verify-machineinstrs and remove unnecessary attributes as well as {{.*}}s
4. Fixed riscv32 comments - it is now only commented out in cmake/Modules/AllSupportedArchDefs.cmake

I have been testing this patch on qemu using ubuntu for riscv64, the comment that Phabricator detects in the supported architecture definitions cmake file is probably an issue with syntax highlighting. Nevertheless, we could instead comment out riscv32 in clang/lib/Driver/XRayArgs, which would also throw up an error during compilation stating that the target is not supported.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117929/new/

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_riscv.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.402533.patch
Type: text/x-patch
Size: 35158 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220124/b2103ee7/attachment-0001.bin>


More information about the cfe-commits mailing list