mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Add an optional parameter with a list of undefs to extendToIndices
Reapply r280268, hopefully in a version that MSVC likes. llvm-svn: 280358
This commit is contained in:
parent
4993c81205
commit
d1066659ab
@ -164,14 +164,23 @@ extern cl::opt<bool> UseSegmentSetForPhysRegs;
|
|||||||
void shrinkToUses(LiveInterval::SubRange &SR, unsigned Reg);
|
void shrinkToUses(LiveInterval::SubRange &SR, unsigned Reg);
|
||||||
|
|
||||||
/// Extend the live range @p LR to reach all points in @p Indices. The
|
/// Extend the live range @p LR to reach all points in @p Indices. The
|
||||||
/// points in the @p Indices array must be jointly dominated by existing
|
/// points in the @p Indices array must be jointly dominated by the union
|
||||||
/// defs in @p LR. PHI-defs are added as needed to maintain SSA form.
|
/// of the existing defs in @p LR and points in @p Undefs.
|
||||||
|
///
|
||||||
|
/// PHI-defs are added as needed to maintain SSA form.
|
||||||
///
|
///
|
||||||
/// If a SlotIndex in @p Indices is the end index of a basic block, @p LR
|
/// If a SlotIndex in @p Indices is the end index of a basic block, @p LR
|
||||||
/// will be extended to be live out of the basic block.
|
/// will be extended to be live out of the basic block.
|
||||||
|
/// If a SlotIndex in @p Indices is jointy dominated only by points in
|
||||||
|
/// @p Undefs, the live range will not be extended to that point.
|
||||||
///
|
///
|
||||||
/// See also LiveRangeCalc::extend().
|
/// See also LiveRangeCalc::extend().
|
||||||
void extendToIndices(LiveRange &LR, ArrayRef<SlotIndex> Indices);
|
void extendToIndices(LiveRange &LR, ArrayRef<SlotIndex> Indices,
|
||||||
|
ArrayRef<SlotIndex> Undefs);
|
||||||
|
|
||||||
|
void extendToIndices(LiveRange &LR, ArrayRef<SlotIndex> Indices) {
|
||||||
|
extendToIndices(LR, Indices, /*Undefs=*/{});
|
||||||
|
}
|
||||||
|
|
||||||
/// If @p LR has a live value at @p Kill, prune its live range by removing
|
/// If @p LR has a live value at @p Kill, prune its live range by removing
|
||||||
/// any liveness reachable from Kill. Add live range end points to
|
/// any liveness reachable from Kill. Add live range end points to
|
||||||
|
@ -568,11 +568,12 @@ void LiveIntervals::shrinkToUses(LiveInterval::SubRange &SR, unsigned Reg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void LiveIntervals::extendToIndices(LiveRange &LR,
|
void LiveIntervals::extendToIndices(LiveRange &LR,
|
||||||
ArrayRef<SlotIndex> Indices) {
|
ArrayRef<SlotIndex> Indices,
|
||||||
|
ArrayRef<SlotIndex> Undefs) {
|
||||||
assert(LRCalc && "LRCalc not initialized.");
|
assert(LRCalc && "LRCalc not initialized.");
|
||||||
LRCalc->reset(MF, getSlotIndexes(), DomTree, &getVNInfoAllocator());
|
LRCalc->reset(MF, getSlotIndexes(), DomTree, &getVNInfoAllocator());
|
||||||
for (unsigned i = 0, e = Indices.size(); i != e; ++i)
|
for (unsigned i = 0, e = Indices.size(); i != e; ++i)
|
||||||
LRCalc->extend(LR, Indices[i], /*PhysReg=*/0, /*Undefs=*/{});
|
LRCalc->extend(LR, Indices[i], /*PhysReg=*/0, Undefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LiveIntervals::pruneValue(LiveRange &LR, SlotIndex Kill,
|
void LiveIntervals::pruneValue(LiveRange &LR, SlotIndex Kill,
|
||||||
|
Loading…
Reference in New Issue
Block a user