The current definition if a pristine register is:
Pristine registers hold a value that is useless to the current function, but that must be preserved - they are callee saved registers that are not saved.
Before the PrologueEpilogueInserter has placed the CSR spill code, this method always returns an empty set.
There is currently an assumption that once the PrologueEpilogueInserter has run, all CSRs are not pristine because they have been saved in the prologue and restored in the epilogue. However, when shrink wrapping has run and identified new save/restore points, the CSR are still pristine before the save block and after the epilogue block.
This is a problem exposed by the Fhourstones benchmark when shrink wrapping on PPC64 was enabled. A reduced test case that illustrates the problem has been created.