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

Ashwin Poduval via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 5 13:27:07 PDT 2023


ashwin98 added inline comments.


================
Comment at: compiler-rt/lib/xray/xray_trampoline_riscv32.S:54
+	// Handler address will be null if it is not set
+	beq	a2, x0, FunctionEntry_restore
+
----------------
MaskRay wrote:
> This local symbol doesn't seem useful. We can just use numbers (`1f` and `1:`) or `LOCAL_LABEL(...)`, so that the symbol table will not have the unneeded symbol entries.
Done


================
Comment at: compiler-rt/lib/xray/xray_trampoline_riscv32.S:85
+FunctionEntry_end:
+	ASM_SIZE(__xray_FunctionEntry)
+	.cfi_endproc
----------------
MaskRay wrote:
> stray `ASM_SIZE`?
Fixed - I looked at your AArch64 code and tried to follow the same process here


================
Comment at: llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp:185
+    if (F.hasFnAttribute("patchable-function-entry")) {
+      break;
+    }
----------------
MaskRay wrote:
> omit braces for single-line single statement body.
Done


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

https://reviews.llvm.org/D117929



More information about the cfe-commits mailing list