[PATCH] D99284: [RegAllocFast] properly handle STATEPOINT instruction.

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 31 23:04:45 PDT 2021


skatkov requested changes to this revision.
skatkov added a comment.
This revision now requires changes to proceed.

I believe this is not right fix for general problem of handling tied-defs wrt reg mask.

Firs of all, running your test I see that tied def/use now uses the same register rax but it is clabbered by the call. So compilation is not correct at all.
As I said before for statepoint instruction you can rely on post fix-up of this case but it is better to get a full support in fast regalloc itself.

I guess that the right way to fix this should look as follows:

1. defineLiveThroughVirtReg for tied-def should check not only whether the register is used in instruction but also it is not in regmask.
2. allocVirtReg should be aware about reg mask and tied operands to avoid allocation of register which is in reg mask.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99284



More information about the llvm-commits mailing list