llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[experimental] Ask copilot to check perf profile degradation

Open mtrofin opened this issue 6 months ago • 1 comments

We can optionally add copilot as a reviewer. As per documentation, 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 sample profiling, result in poor profiles by dropping debug info.

mtrofin avatar Jun 29 '25 15:06 mtrofin

Note to reviewers: I didn't want to make the prompt too stuffy, in some local experiments, something this short ended up being reasonably good. I'd rather get going, start experimenting with this for a while by selectively adding it to PRs and seeing what mileage we get, and we can wordsmith it if needed.

mtrofin avatar Jun 29 '25 15:06 mtrofin

(It looks like you meant to request reviewers rather than assign people to the PR?)

Ugh. yes, fixed.

This seems reasonable enough to me. This does seem a bit specific to one specific problem though. I'm hoping Copilot is good enough to ignore these instructions when analyzing changes that don't modify function control flow?

That's what I'm reading from the example in the documentation, yes - I'm guessing whatever we place in this file is appended to a base prompt. Let's see.

mtrofin avatar Jun 30 '25 14:06 mtrofin

I'll land it, and if folks don't mind trying to ask copilot to review on various PRs they see - let's get a feel for its usefulness?

mtrofin avatar Jun 30 '25 15:06 mtrofin