aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineBasicBlock.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2017-05-31 20:30:22 +0000
committerMatthias Braun <matze@braunis.de>2017-05-31 20:30:22 +0000
commitac4beccaca713c8500afc8abb9630b8b38564e36 (patch)
tree609f05b2f57aa8ebf8ba7d906f692514fc704b92 /llvm/lib/CodeGen/MachineBasicBlock.cpp
parent43692a2245e68648dfb11fd551066deda8c5ab28 (diff)
downloadllvm-ac4beccaca713c8500afc8abb9630b8b38564e36.zip
llvm-ac4beccaca713c8500afc8abb9630b8b38564e36.tar.gz
llvm-ac4beccaca713c8500afc8abb9630b8b38564e36.tar.bz2
X86FloatingPoint: Fix livein lists
After transforming FP to ST registers: - Do not add the ST register to the livein lists, they are reserved so we do not need to track their liveness. - Remove the FP registers from the livein lists, they don't have defs or uses anymore and so are not live. - (The setKillFlags() call is moved to an earlier place as it relies on the FP registers still being present in the livein list.) llvm-svn: 304342
Diffstat (limited to 'llvm/lib/CodeGen/MachineBasicBlock.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBasicBlock.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineBasicBlock.cpp b/llvm/lib/CodeGen/MachineBasicBlock.cpp
index 0611272..2a2b43b 100644
--- a/llvm/lib/CodeGen/MachineBasicBlock.cpp
+++ b/llvm/lib/CodeGen/MachineBasicBlock.cpp
@@ -350,6 +350,11 @@ void MachineBasicBlock::removeLiveIn(MCPhysReg Reg, LaneBitmask LaneMask) {
LiveIns.erase(I);
}
+MachineBasicBlock::livein_iterator
+MachineBasicBlock::removeLiveIn(MachineBasicBlock::livein_iterator I) {
+ return LiveIns.erase(I);
+}
+
bool MachineBasicBlock::isLiveIn(MCPhysReg Reg, LaneBitmask LaneMask) const {
livein_iterator I = find_if(
LiveIns, [Reg](const RegisterMaskPair &LI) { return LI.PhysReg == Reg; });