[PATCH] D13034: Do not mark CSRs as pristine in functions that have been shrink wrapped

Kit Barton via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 21 15:13:35 PDT 2015

kbarton created this revision.
kbarton added reviewers: qcolombet, MatzeB.
kbarton added subscribers: seurer, hfinkel, wschmidt, llvm-commits.

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.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13034.35312.patch
Type: text/x-patch
Size: 12575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150921/7b3e1bfb/attachment-0001.bin>

More information about the llvm-commits mailing list