[PATCH] D98232: [regalloc] Ensure Query::collectInterferringVregs is called before interval iteration

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 25 14:39:21 PDT 2021


nikic added a comment.

In D98232#2650231 <https://reviews.llvm.org/D98232#2650231>, @dmgreen wrote:

> I'm worried that this comes up in a lot of places. Perhaps rare still, but important cases. The aarch64 example we have is just a matrix multiply, and is 25% slower with all the cascading spills, https://bugs.llvm.org/show_bug.cgi?id=26810 quotes the same. Like I said before though, the option didn't fix some examples of the same thing that we were seeing in ARM, so I'm not sure how reliably better it is.
>
> @aditya_nandakumar @qcolombet any idea when a better fix for that issue might be available?
>
> Could we just make `consider-local-interval-cost` -O3 only in the meantime? That should alleviate some of the compile time worries, as we have genuine examples of where it is hurting performance.

This would be really bad for us, because rust effectively always uses `O3`, and we expect reasonable compile-time tradeoffs to be made for it as well.

Worth noting that D35816 <https://reviews.llvm.org/D35816> discussed a number of alternatives to this, one being to handle this in machine copy propagation instead, which should be both much less complex and not have compile-time concerns. The cited disadvantage is that it would only work inside a block. From the examples I've seen long eviction chains inside a single BB seem to be the main problem, so maybe it would be worthwhile to go back to that option. I don't really have a good view on this topic though.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98232



More information about the llvm-commits mailing list