diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-08-10 16:17:32 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2017-08-10 16:17:32 +0000 |
commit | bea30c62862cd617fe7fd1bf439b434c76168550 (patch) | |
tree | 070669ffcd87acf1be10172f2c3b827ab55d810c /llvm/lib/CodeGen/LivePhysRegs.cpp | |
parent | b88de416367d703eff36c87722537658f2aaee0f (diff) | |
download | bcm5719-llvm-bea30c62862cd617fe7fd1bf439b434c76168550.tar.gz bcm5719-llvm-bea30c62862cd617fe7fd1bf439b434c76168550.zip |
Add "Restored" flag to CalleeSavedInfo
The liveness-tracking code assumes that the registers that were saved
in the function's prolog are live outside of the function. Specifically,
that registers that were saved are also live-on-exit from the function.
This isn't always the case as illustrated by the LR register on ARM.
Differential Revision: https://reviews.llvm.org/D36160
llvm-svn: 310619
Diffstat (limited to 'llvm/lib/CodeGen/LivePhysRegs.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LivePhysRegs.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LivePhysRegs.cpp b/llvm/lib/CodeGen/LivePhysRegs.cpp index cde6ccd29df..870d8cc71c7 100644 --- a/llvm/lib/CodeGen/LivePhysRegs.cpp +++ b/llvm/lib/CodeGen/LivePhysRegs.cpp @@ -192,7 +192,8 @@ void LivePhysRegs::addLiveOutsNoPristines(const MachineBasicBlock &MBB) { const MachineFrameInfo &MFI = MF.getFrameInfo(); if (MFI.isCalleeSavedInfoValid()) { for (const CalleeSavedInfo &Info : MFI.getCalleeSavedInfo()) - addReg(Info.getReg()); + if (Info.isRestored()) + addReg(Info.getReg()); } } } |