[llvm] [experimental] Ask copilot to check perf profile degradation (PR #146271)

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 30 08:04:06 PDT 2025


https://github.com/mtrofin updated https://github.com/llvm/llvm-project/pull/146271

>From 191e59eec5b548ad981597bdc09022eae20f1b14 Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Sun, 29 Jun 2025 08:09:41 -0700
Subject: [PATCH 1/2] [experimental] Ask copilot to check perf profile
 degradation

We can optionally add copilot as a reviewer. As per
[documentation](https://docs.github.com/en/copilot/how-tos/agents/copilot-code-review/using-copilot-code-review#customizing-copilots-reviews-with-custom-instructions),
we can customize the review. This PR asks it to pay attention to the
kind of code that might corrupt performance data, or, in the case of
sampel profiling, result in poor profiles by dropping debug info.
---
 .github/copilot-instructions.md | 4 ++++
 1 file changed, 4 insertions(+)
 create mode 100644 .github/copilot-instructions.md

diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
new file mode 100644
index 0000000000000..e84d99307deda
--- /dev/null
+++ b/.github/copilot-instructions.md
@@ -0,0 +1,4 @@
+When performing a code review, pay close attention to code modifying a function
+control flow. Could the change result in the corruption of performance profile
+data? Could the change result in invalid debug information, in particular for
+branches and calls?

>From 8913cd5279be5c8f4afe0722988a39a4d736232e Mon Sep 17 00:00:00 2001
From: Mircea Trofin <mtrofin at google.com>
Date: Mon, 30 Jun 2025 08:03:57 -0700
Subject: [PATCH 2/2] Update copilot-instructions.md

---
 .github/copilot-instructions.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
index e84d99307deda..03748938700e3 100644
--- a/.github/copilot-instructions.md
+++ b/.github/copilot-instructions.md
@@ -1,4 +1,4 @@
-When performing a code review, pay close attention to code modifying a function
+When performing a code review, pay close attention to code modifying a function's
 control flow. Could the change result in the corruption of performance profile
 data? Could the change result in invalid debug information, in particular for
 branches and calls?



More information about the llvm-commits mailing list