summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2016-07-09 01:31:36 +0000
committerMatthias Braun <matze@braunis.de>2016-07-09 01:31:36 +0000
commit3f80043224472bb91971dd3f987a1c212c711376 (patch)
tree29bc6a0fab46ba55d9cc562223b994155335f203
parent1322b6f8bbf39db37ffc717c9fd208f2726ede38 (diff)
downloadbcm5719-llvm-3f80043224472bb91971dd3f987a1c212c711376.tar.gz
bcm5719-llvm-3f80043224472bb91971dd3f987a1c212c711376.zip
LivePhysRegs: addLiveOuts() can skip addPristines() in ret block
Drive-by improvement: We would 1) add CSRs, 2) remove callee saved CSRs and 3) add all CSRs again for the return block. Just adding CSRs once obviously gives the same results. llvm-svn: 274955
-rw-r--r--llvm/lib/CodeGen/LivePhysRegs.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp
index 57faef3c297..4e2528f4756 100644
--- a/llvm/lib/CodeGen/LivePhysRegs.cpp
+++ b/llvm/lib/CodeGen/LivePhysRegs.cpp
@@ -167,12 +167,13 @@ void LivePhysRegs::addLiveOuts(const MachineBasicBlock &MBB) {
const MachineFunction &MF = *MBB.getParent();
const MachineFrameInfo &MFI = *MF.getFrameInfo();
if (MFI.isCalleeSavedInfoValid()) {
- addPristines(*this, MF, MFI, *TRI);
if (MBB.isReturnBlock()) {
// The return block has no successors whose live-ins we could merge
// below. So instead we add the callee saved registers manually.
for (const MCPhysReg *I = TRI->getCalleeSavedRegs(&MF); *I; ++I)
addReg(*I);
+ } else {
+ addPristines(*this, MF, MFI, *TRI);
}
}
OpenPOWER on IntegriCloud