[llvm] [RegAlloc] Sort CopyHint by IsCSR (PR #131046)

Michael Maitland via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 13 06:43:18 PDT 2025


michaelmaitland wrote:

> Do we actually see many contexts where registers have multiple hints?

@arsenm I instrumented the code like this:

```
static int I = 0;

weightCalcHelper() {
...
// INSTRUMENT HERE
if (RegHints.size() > 1)
  errs() << "I:" << I++ <"\n";
// END INSTRUMENT
sort(RegHints);
...
```

I ran `llc` on perlbench_r for RISC-V and it looks like we had about 18k+ times there were multiple hints. I hope that helps to answer your question.

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


More information about the llvm-commits mailing list