llvm.org GIT mirror llvm / 01b50ca
Delete dead code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163735 91177308-0d34-0410-b5e6-96231b3b80d8 Jakob Stoklund Olesen 7 years ago
2 changed file(s) with 0 addition(s) and 47 deletion(s). Raw diff Collapse all Expand all
275275 void MergeValueInAsValue(const LiveInterval &RHS,
276276 const VNInfo *RHSValNo, VNInfo *LHSValNo);
277277
278 /// Copy - Copy the specified live interval. This copies all the fields
279 /// except for the register of the interval.
280 void Copy(const LiveInterval &RHS, MachineRegisterInfo *MRI,
281 VNInfo::Allocator &VNInfoAllocator);
282
283278 bool empty() const { return ranges.empty(); }
284279
285280 /// beginIndex - Return the lowest numbered slot covered by interval.
311306 const_iterator r = find(index.getRegSlot(true));
312307 return r != end() && r->end == index;
313308 }
314
315 /// killedInRange - Return true if the interval has kills in [Start,End).
316 /// Note that the kill point is considered the end of a live range, so it is
317 /// not contained in the live range. If a live range ends at End, it won't
318 /// be counted as a kill by this method.
319 bool killedInRange(SlotIndex Start, SlotIndex End) const;
320309
321310 /// getLiveRangeContaining - Return the live range that contains the
322311 /// specified index, or null if there is none.
6666 VNInfo *VNI = getNextValue(Def, VNInfoAllocator);
6767 ranges.insert(I, LiveRange(Def, Def.getDeadSlot(), VNI));
6868 return VNI;
69 }
70
71 /// killedInRange - Return true if the interval has kills in [Start,End).
72 bool LiveInterval::killedInRange(SlotIndex Start, SlotIndex End) const {
73 Ranges::const_iterator r =
74 std::lower_bound(ranges.begin(), ranges.end(), End);
75
76 // Now r points to the first interval with start >= End, or ranges.end().
77 if (r == ranges.begin())
78 return false;
79
80 --r;
81 // Now r points to the last interval with end <= End.
82 // r->end is the kill point.
83 return r->end >= Start && r->end < End;
8469 }
8570
8671 // overlaps - Return true if the intersection of the two live intervals is
715700 return V2;
716701 }
717702
718 void LiveInterval::Copy(const LiveInterval &RHS,
719 MachineRegisterInfo *MRI,
720 VNInfo::Allocator &VNInfoAllocator) {
721 ranges.clear();
722 valnos.clear();
723 std::pair Hint = MRI->getRegAllocationHint(RHS.reg);
724 MRI->setRegAllocationHint(reg, Hint.first, Hint.second);
725
726 weight = RHS.weight;
727 for (unsigned i = 0, e = RHS.getNumValNums(); i != e; ++i) {
728 const VNInfo *VNI = RHS.getValNumInfo(i);
729 createValueCopy(VNI, VNInfoAllocator);
730 }
731 for (unsigned i = 0, e = RHS.ranges.size(); i != e; ++i) {
732 const LiveRange &LR = RHS.ranges[i];
733 addRange(LiveRange(LR.start, LR.end, getValNumInfo(LR.valno->id)));
734 }
735
736 verify();
737 }
738
739703 unsigned LiveInterval::getSize() const {
740704 unsigned Sum = 0;
741705 for (const_iterator I = begin(), E = end(); I != E; ++I)