[PATCH] D81647: MIR Statepoint refactoring. Part 3: Spill GC Ptr regs.
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 16 00:58:54 PDT 2020
skatkov added a comment.
Hi Denis, after you re-write the patch in this way, I guess we can do it clearly and simply in terms of reading.
Let's add set of reserved frame indices into FrameIndexesPerSize.
In reset method, you clean this new set.
In resetAndPreFill you just add all the reserved FI into this set.
In getFrameIndex you lookup FI in GlobalIndices and then take the first available FI which is not in Reserved set.
This way we can get away from this implicit assumptions that we reserved first n elements, supposing that they will processed first and so on...
What do you think?
================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:261
+ assert(Pos != Line.Slots.end() && "FI must have been allocated");
+ Line.Index = (Pos - Line.Slots.begin()) + 1;
+ }
----------------
It does not look valid to me. You'll set Line.Index to value corresponding to last processed pair from It.
While you need a max in this case...
================
Comment at: llvm/lib/CodeGen/FixupStatepointCallerSaved.cpp:611
SmallVector<MachineInstr *, 16> Statepoints;
- for (MachineBasicBlock &BB : MF)
+ for (MachineBasicBlock &BB : MF) {
for (MachineInstr &I : BB)
----------------
remove redundant {} now.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81647/new/
https://reviews.llvm.org/D81647
More information about the llvm-commits
mailing list