[PATCH] D39386: [Power9] Allow gpr callee saved spills in prologue to vector registers rather than stack
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 30 13:54:13 PST 2018
thegameg added inline comments.
================
Comment at: lib/CodeGen/PrologEpilogInserter.cpp:464
+ if (CSI[i].isSpilledToReg()) {
+ for (MachineBasicBlock &MBB : MF) {
+ MCPhysReg DstReg = CSI[i].getDstReg();
----------------
I agree that in the general case all the basic blocks need to have this register as live in, but if the prologue/epilogue of the function is shrink-wrapped, only the blocks between the prologue and the epilogue need to have this as live-in.
I think at this point in the function the `Visited` set contains all the blocks *outside* the prologue/epilogue region. Correct me if I'm wrong but I think you're missing a:
```
if (Visited.count(&MBB))
continue;
```
https://reviews.llvm.org/D39386
More information about the llvm-commits
mailing list