summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-05-03 00:08:46 +0000
committerMatthias Braun <matze@braunis.de>2016-05-03 00:08:46 +0000
commit24f26e6d91733d90ae24c8bbc95e052928b44bff (patch)
treeb642e96287223d7ee80594f5068c3a9e866a1136 /llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp
parent1a55a99362ac63b2a07d360dca07076c938a446d (diff)
downloadbcm5719-llvm-24f26e6d91733d90ae24c8bbc95e052928b44bff.tar.gz
bcm5719-llvm-24f26e6d91733d90ae24c8bbc95e052928b44bff.zip
LivePhysRegs: Automatically determine presence of pristine regs.
Remove the AddPristinesAndCSRs parameters from addLiveIns()/addLiveOuts(). We need to respect pristine registers after prologue epilogue insertion, Seeing that we got this wrong in at least two commits already, we should rather pay the small price to query MachineFrameInfo for it. There are three cases that did not set AddPristineAndCSRs to true even after register allocation: - ExecutionDepsFix: live-out registers are used as a hint that the register is used soon. This is not true for pristine registers so use the new addLiveOutsNoPristines() to maintain this behaviour. - SystemZShortenInst: Not setting AddPristineAndCSRs to true looks like a bug, should do the right thing automatically now. - StackMapLivenessAnalysis: Not adding pristine registers looks like a bug to me. Added a FIXME comment but maintain the current behaviour as a change may need to get coordinated with GC runtimes. llvm-svn: 268336
Diffstat (limited to 'llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp')
-rw-r--r--llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp b/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp
index fd571de86de..0d09c2375dc 100644
--- a/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp
+++ b/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp
@@ -127,7 +127,8 @@ bool StackMapLiveness::calculateLiveness(MachineFunction &MF) {
for (auto &MBB : MF) {
DEBUG(dbgs() << "****** BB " << MBB.getName() << " ******\n");
LiveRegs.init(TRI);
- LiveRegs.addLiveOuts(&MBB);
+ // FIXME: This should probably be addLiveOuts().
+ LiveRegs.addLiveOutsNoPristines(&MBB);
bool HasStackMap = false;
// Reverse iterate over all instructions and add the current live register
// set to an instruction if we encounter a patchpoint instruction.
OpenPOWER on IntegriCloud