diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-09-02 19:48:55 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2016-09-02 19:48:55 +0000 |
commit | 3bf4aeccd607fbc86429f3b26e18c1f1cdfda77c (patch) | |
tree | a137a1faa25bebb727d1a42f2102f1e6ac504b17 /llvm/lib/CodeGen/SplitKit.cpp | |
parent | 70277411d3dd780ae794da3621204823bb9344f8 (diff) | |
download | bcm5719-llvm-3bf4aeccd607fbc86429f3b26e18c1f1cdfda77c.tar.gz bcm5719-llvm-3bf4aeccd607fbc86429f3b26e18c1f1cdfda77c.zip |
Do not consider subreg defs as reads when computing subrange liveness
Subregister definitions are considered uses for the purpose of tracking
liveness of the whole register. At the same time, when calculating live
interval subranges, subregister defs should not be treated as uses.
Differential Revision: https://reviews.llvm.org/D24190
llvm-svn: 280532
Diffstat (limited to 'llvm/lib/CodeGen/SplitKit.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SplitKit.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/SplitKit.cpp b/llvm/lib/CodeGen/SplitKit.cpp index 6d59f85d35f..e06bc4a3614 100644 --- a/llvm/lib/CodeGen/SplitKit.cpp +++ b/llvm/lib/CodeGen/SplitKit.cpp @@ -1206,7 +1206,8 @@ void SplitEditor::rewriteAssigned(bool ExtendRanges) { // defining the register. This is because a <def,read-undef> operand // will create an "undef" point, and we cannot extend any subranges // until all of them have been accounted for. - ExtPoints.push_back(ExtPoint(MO, RegIdx, Next)); + if (MO.isUse()) + ExtPoints.push_back(ExtPoint(MO, RegIdx, Next)); } else { LiveRangeCalc &LRC = getLRCalc(RegIdx); LRC.extend(LI, Next, 0, ArrayRef<SlotIndex>()); @@ -1221,10 +1222,6 @@ void SplitEditor::rewriteAssigned(bool ExtendRanges) { unsigned Reg = EP.MO.getReg(), Sub = EP.MO.getSubReg(); LaneBitmask LM = Sub != 0 ? TRI.getSubRegIndexLaneMask(Sub) : MRI.getMaxLaneMaskForVReg(Reg); - // If this is a non-read-undef definition of a sub-register, extend - // subranges for everything except that sub-register. - if (Sub != 0 && EP.MO.isDef()) - LM = MRI.getMaxLaneMaskForVReg(Reg) & ~LM; for (LiveInterval::SubRange &S : LI.subranges()) { if (!(S.LaneMask & LM)) continue; |