[PATCH] D137813: [RegAlloc Greedy]Account statepoints while splitting single basic block

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 13 19:44:23 PST 2022


skatkov added inline comments.


================
Comment at: llvm/lib/CodeGen/StackMaps.cpp:154
+      break;
+    if (MO.isReg() && MO.getReg() == Reg)
+      return false;
----------------
skatkov wrote:
> arsenm wrote:
> > skatkov wrote:
> > > arsenm wrote:
> > > > Do you need to account for subregisters?
> > > It is about virtual registers. I think no.
> > Only virtual registers have subregisters 
> Well, I go to learn about statepoint and sub-registers. Still think I do not need but need to prove :)
Returned back. 
If foldable area contains a use of a reg or its subreg - we will spill it (see InlineSpiller::foldMemoryOperand).
If non-foldable area contains a use of reg or its subreg, there are two cases:
1) subreg is undef
2) subreg has a valid def.

For the second case we definitely want to report false.
For the first case - it should be probably replaced earlier to undef, but for simplicity let's just report false as well.

So in my understanding I do not need to account for subregisters.


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

https://reviews.llvm.org/D137813



More information about the llvm-commits mailing list