[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
Sat Jan 27 06:14:57 PST 2018


thegameg added inline comments.


================
Comment at: lib/Target/PowerPC/PPCFrameLowering.cpp:1990
+            MachineBasicBlock *BB = &*I;
+            BB->addLiveIn(VolatileVFRegNo[i]);
+          }
----------------
syzaara wrote:
> thegameg wrote:
> > I may be missing something, but why is this needed? Won't it be def'd anyway?
> Without this, we will get machine verify errors in the epilogue that we are using an undefined physical register. This can be fixed by adding the register as live into the block. However, adding it to only the epilogue isn't enough since other blocks may clobber the register in between the prologue and epilogue.
Ah, right, I see. There is a function called `updateLiveness` in PrologEpilogInserter, which propagates the liveness of CSRs. You might want to look into that.


https://reviews.llvm.org/D39386





More information about the llvm-commits mailing list