[llvm] [SystemZ][XRay] Implement XRay instrumentation for SystemZ (PR #113253)

via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 21 19:48:19 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff b5bcdb5cfae452da30a699d7967cc1e0800ca997 51ae69ce7fee155317db2a5f4c06e50cbd2b4dc9 --extensions h,cpp -- llvm/lib/CodeGen/XRayInstrumentation.cpp llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp llvm/lib/Target/SystemZ/SystemZAsmPrinter.h llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp llvm/lib/Target/SystemZ/SystemZSubtarget.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
index dbb21d30ed..7f3e07384b 100644
--- a/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp
@@ -664,11 +664,11 @@ void SystemZAsmPrinter::emitInstruction(const MachineInstr *MI) {
 
   case TargetOpcode::PATCHABLE_FUNCTION_ENTER:
     LowerPATCHABLE_FUNCTION_ENTER(*MI, Lower);
-    return ;
+    return;
 
   case TargetOpcode::PATCHABLE_RET:
     LowerPATCHABLE_RET(*MI, Lower);
-    return ;
+    return;
 
   case TargetOpcode::PATCHABLE_FUNCTION_EXIT:
     llvm_unreachable("PATCHABLE_FUNCTION_EXIT should never be emitted");
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
index d3de2c9cda..d553c72589 100644
--- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
@@ -1796,8 +1796,7 @@ unsigned SystemZInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const {
   if (MI.getOpcode() == TargetOpcode::PATCHABLE_FUNCTION_ENTER)
     return 18;
   if (MI.getOpcode() == TargetOpcode::PATCHABLE_RET)
-    return 18 +
-           (MI.getOperand(0).getImm() == SystemZ::CondReturn ? 4 : 0);
+    return 18 + (MI.getOperand(0).getImm() == SystemZ::CondReturn ? 4 : 0);
 
   return MI.getDesc().getSize();
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/113253


More information about the llvm-commits mailing list