mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-13 22:26:11 +00:00
Oops. Renamed remaining MachineInstrIndex references.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83255 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cc3b0650f1
commit
6cc91e39c0
@ -131,7 +131,7 @@ bool LiveInterval::overlapsFrom(const LiveInterval& other,
|
|||||||
|
|
||||||
/// overlaps - Return true if the live interval overlaps a range specified
|
/// overlaps - Return true if the live interval overlaps a range specified
|
||||||
/// by [Start, End).
|
/// by [Start, End).
|
||||||
bool LiveInterval::overlaps(LiveIndex Start, MachineInstrIndex End) const {
|
bool LiveInterval::overlaps(LiveIndex Start, LiveIndex End) const {
|
||||||
assert(Start < End && "Invalid range");
|
assert(Start < End && "Invalid range");
|
||||||
const_iterator I = begin();
|
const_iterator I = begin();
|
||||||
const_iterator E = end();
|
const_iterator E = end();
|
||||||
@ -268,7 +268,7 @@ LiveInterval::addRangeFrom(LiveRange LR, iterator From) {
|
|||||||
|
|
||||||
/// isInOneLiveRange - Return true if the range specified is entirely in
|
/// isInOneLiveRange - Return true if the range specified is entirely in
|
||||||
/// a single LiveRange of the live interval.
|
/// a single LiveRange of the live interval.
|
||||||
bool LiveInterval::isInOneLiveRange(LiveIndex Start, MachineInstrIndex End) {
|
bool LiveInterval::isInOneLiveRange(LiveIndex Start, LiveIndex End) {
|
||||||
Ranges::iterator I = std::upper_bound(ranges.begin(), ranges.end(), Start);
|
Ranges::iterator I = std::upper_bound(ranges.begin(), ranges.end(), Start);
|
||||||
if (I == ranges.begin())
|
if (I == ranges.begin())
|
||||||
return false;
|
return false;
|
||||||
@ -279,7 +279,7 @@ bool LiveInterval::isInOneLiveRange(LiveIndex Start, MachineInstrIndex End) {
|
|||||||
|
|
||||||
/// removeRange - Remove the specified range from this interval. Note that
|
/// removeRange - Remove the specified range from this interval. Note that
|
||||||
/// the range must be in a single LiveRange in its entirety.
|
/// the range must be in a single LiveRange in its entirety.
|
||||||
void LiveInterval::removeRange(LiveIndex Start, MachineInstrIndex End,
|
void LiveInterval::removeRange(LiveIndex Start, LiveIndex End,
|
||||||
bool RemoveDeadValNo) {
|
bool RemoveDeadValNo) {
|
||||||
// Find the LiveRange containing this span.
|
// Find the LiveRange containing this span.
|
||||||
Ranges::iterator I = std::upper_bound(ranges.begin(), ranges.end(), Start);
|
Ranges::iterator I = std::upper_bound(ranges.begin(), ranges.end(), Start);
|
||||||
|
@ -292,7 +292,7 @@ void LiveIntervals::computeNumbering() {
|
|||||||
// Number MachineInstrs and MachineBasicBlocks.
|
// Number MachineInstrs and MachineBasicBlocks.
|
||||||
// Initialize MBB indexes to a sentinal.
|
// Initialize MBB indexes to a sentinal.
|
||||||
MBB2IdxMap.resize(mf_->getNumBlockIDs(),
|
MBB2IdxMap.resize(mf_->getNumBlockIDs(),
|
||||||
std::make_pair(LiveIndex(),MachineInstrIndex()));
|
std::make_pair(LiveIndex(),LiveIndex()));
|
||||||
|
|
||||||
LiveIndex MIIndex;
|
LiveIndex MIIndex;
|
||||||
for (MachineFunction::iterator MBB = mf_->begin(), E = mf_->end();
|
for (MachineFunction::iterator MBB = mf_->begin(), E = mf_->end();
|
||||||
@ -406,7 +406,7 @@ void LiveIntervals::computeNumbering() {
|
|||||||
(idx == index ? offset : LiveIndex::LOAD));
|
(idx == index ? offset : LiveIndex::LOAD));
|
||||||
else
|
else
|
||||||
LI->end =
|
LI->end =
|
||||||
LiveIndex(MachineInstrIndex::NUM * i2miMap_.size());
|
LiveIndex(LiveIndex::NUM * i2miMap_.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -485,7 +485,7 @@ void LiveIntervals::scaleNumbering(int factor) {
|
|||||||
Idx2MBBMap.clear();
|
Idx2MBBMap.clear();
|
||||||
for (MachineFunction::iterator MBB = mf_->begin(), MBBE = mf_->end();
|
for (MachineFunction::iterator MBB = mf_->begin(), MBBE = mf_->end();
|
||||||
MBB != MBBE; ++MBB) {
|
MBB != MBBE; ++MBB) {
|
||||||
std::pair<LiveIndex, MachineInstrIndex> &mbbIndices = MBB2IdxMap[MBB->getNumber()];
|
std::pair<LiveIndex, LiveIndex> &mbbIndices = MBB2IdxMap[MBB->getNumber()];
|
||||||
mbbIndices.first = mbbIndices.first.scale(factor);
|
mbbIndices.first = mbbIndices.first.scale(factor);
|
||||||
mbbIndices.second = mbbIndices.second.scale(factor);
|
mbbIndices.second = mbbIndices.second.scale(factor);
|
||||||
Idx2MBBMap.push_back(std::make_pair(mbbIndices.first, MBB));
|
Idx2MBBMap.push_back(std::make_pair(mbbIndices.first, MBB));
|
||||||
@ -1283,7 +1283,7 @@ void LiveIntervals::computeIntervals() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool LiveIntervals::findLiveInMBBs(
|
bool LiveIntervals::findLiveInMBBs(
|
||||||
LiveIndex Start, MachineInstrIndex End,
|
LiveIndex Start, LiveIndex End,
|
||||||
SmallVectorImpl<MachineBasicBlock*> &MBBs) const {
|
SmallVectorImpl<MachineBasicBlock*> &MBBs) const {
|
||||||
std::vector<IdxMBBPair>::const_iterator I =
|
std::vector<IdxMBBPair>::const_iterator I =
|
||||||
std::lower_bound(Idx2MBBMap.begin(), Idx2MBBMap.end(), Start);
|
std::lower_bound(Idx2MBBMap.begin(), Idx2MBBMap.end(), Start);
|
||||||
@ -1300,7 +1300,7 @@ bool LiveIntervals::findLiveInMBBs(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool LiveIntervals::findReachableMBBs(
|
bool LiveIntervals::findReachableMBBs(
|
||||||
LiveIndex Start, MachineInstrIndex End,
|
LiveIndex Start, LiveIndex End,
|
||||||
SmallVectorImpl<MachineBasicBlock*> &MBBs) const {
|
SmallVectorImpl<MachineBasicBlock*> &MBBs) const {
|
||||||
std::vector<IdxMBBPair>::const_iterator I =
|
std::vector<IdxMBBPair>::const_iterator I =
|
||||||
std::lower_bound(Idx2MBBMap.begin(), Idx2MBBMap.end(), Start);
|
std::lower_bound(Idx2MBBMap.begin(), Idx2MBBMap.end(), Start);
|
||||||
@ -1700,7 +1700,7 @@ void LiveIntervals::rewriteImplicitOps(const LiveInterval &li,
|
|||||||
/// for addIntervalsForSpills to rewrite uses / defs for the given live range.
|
/// for addIntervalsForSpills to rewrite uses / defs for the given live range.
|
||||||
bool LiveIntervals::
|
bool LiveIntervals::
|
||||||
rewriteInstructionForSpills(const LiveInterval &li, const VNInfo *VNI,
|
rewriteInstructionForSpills(const LiveInterval &li, const VNInfo *VNI,
|
||||||
bool TrySplit, LiveIndex index, MachineInstrIndex end,
|
bool TrySplit, LiveIndex index, LiveIndex end,
|
||||||
MachineInstr *MI,
|
MachineInstr *MI,
|
||||||
MachineInstr *ReMatOrigDefMI, MachineInstr *ReMatDefMI,
|
MachineInstr *ReMatOrigDefMI, MachineInstr *ReMatDefMI,
|
||||||
unsigned Slot, int LdSlot,
|
unsigned Slot, int LdSlot,
|
||||||
@ -2732,12 +2732,12 @@ LiveRange LiveIntervals::addLiveRangeToEndOfBlock(unsigned reg,
|
|||||||
MachineInstr* startInst) {
|
MachineInstr* startInst) {
|
||||||
LiveInterval& Interval = getOrCreateInterval(reg);
|
LiveInterval& Interval = getOrCreateInterval(reg);
|
||||||
VNInfo* VN = Interval.getNextValue(
|
VNInfo* VN = Interval.getNextValue(
|
||||||
LiveIndex(getInstructionIndex(startInst), MachineInstrIndex::DEF),
|
LiveIndex(getInstructionIndex(startInst), LiveIndex::DEF),
|
||||||
startInst, true, getVNInfoAllocator());
|
startInst, true, getVNInfoAllocator());
|
||||||
VN->setHasPHIKill(true);
|
VN->setHasPHIKill(true);
|
||||||
VN->kills.push_back(terminatorGaps[startInst->getParent()]);
|
VN->kills.push_back(terminatorGaps[startInst->getParent()]);
|
||||||
LiveRange LR(
|
LiveRange LR(
|
||||||
LiveIndex(getInstructionIndex(startInst), MachineInstrIndex::DEF),
|
LiveIndex(getInstructionIndex(startInst), LiveIndex::DEF),
|
||||||
getNextSlot(getMBBEndIdx(startInst->getParent())), VN);
|
getNextSlot(getMBBEndIdx(startInst->getParent())), VN);
|
||||||
Interval.addRange(LR);
|
Interval.addRange(LR);
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ namespace {
|
|||||||
DenseMap<unsigned, int> IntervalSSMap;
|
DenseMap<unsigned, int> IntervalSSMap;
|
||||||
|
|
||||||
// Def2SpillMap - A map from a def instruction index to spill index.
|
// Def2SpillMap - A map from a def instruction index to spill index.
|
||||||
DenseMap<LiveIndex, MachineInstrIndex> Def2SpillMap;
|
DenseMap<LiveIndex, LiveIndex> Def2SpillMap;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static char ID;
|
static char ID;
|
||||||
@ -142,10 +142,10 @@ namespace {
|
|||||||
int CreateSpillStackSlot(unsigned, const TargetRegisterClass *);
|
int CreateSpillStackSlot(unsigned, const TargetRegisterClass *);
|
||||||
|
|
||||||
bool IsAvailableInStack(MachineBasicBlock*, unsigned,
|
bool IsAvailableInStack(MachineBasicBlock*, unsigned,
|
||||||
LiveIndex, MachineInstrIndex,
|
LiveIndex, LiveIndex,
|
||||||
LiveIndex&, int&) const;
|
LiveIndex&, int&) const;
|
||||||
|
|
||||||
void UpdateSpillSlotInterval(VNInfo*, LiveIndex, MachineInstrIndex);
|
void UpdateSpillSlotInterval(VNInfo*, LiveIndex, LiveIndex);
|
||||||
|
|
||||||
bool SplitRegLiveInterval(LiveInterval*);
|
bool SplitRegLiveInterval(LiveInterval*);
|
||||||
|
|
||||||
@ -363,7 +363,7 @@ PreAllocSplitting::IsAvailableInStack(MachineBasicBlock *DefMBB,
|
|||||||
DenseMap<unsigned, int>::iterator I = IntervalSSMap.find(Reg);
|
DenseMap<unsigned, int>::iterator I = IntervalSSMap.find(Reg);
|
||||||
if (I == IntervalSSMap.end())
|
if (I == IntervalSSMap.end())
|
||||||
return false;
|
return false;
|
||||||
DenseMap<LiveIndex, MachineInstrIndex>::iterator
|
DenseMap<LiveIndex, LiveIndex>::iterator
|
||||||
II = Def2SpillMap.find(DefIndex);
|
II = Def2SpillMap.find(DefIndex);
|
||||||
if (II == Def2SpillMap.end())
|
if (II == Def2SpillMap.end())
|
||||||
return false;
|
return false;
|
||||||
|
@ -399,7 +399,7 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA,
|
|||||||
bool BHasPHIKill = BValNo->hasPHIKill();
|
bool BHasPHIKill = BValNo->hasPHIKill();
|
||||||
SmallVector<VNInfo*, 4> BDeadValNos;
|
SmallVector<VNInfo*, 4> BDeadValNos;
|
||||||
VNInfo::KillSet BKills;
|
VNInfo::KillSet BKills;
|
||||||
std::map<LiveIndex, MachineInstrIndex> BExtend;
|
std::map<LiveIndex, LiveIndex> BExtend;
|
||||||
|
|
||||||
// If ALR and BLR overlaps and end of BLR extends beyond end of ALR, e.g.
|
// If ALR and BLR overlaps and end of BLR extends beyond end of ALR, e.g.
|
||||||
// A = or A, B
|
// A = or A, B
|
||||||
@ -494,7 +494,7 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA,
|
|||||||
AI != AE; ++AI) {
|
AI != AE; ++AI) {
|
||||||
if (AI->valno != AValNo) continue;
|
if (AI->valno != AValNo) continue;
|
||||||
LiveIndex End = AI->end;
|
LiveIndex End = AI->end;
|
||||||
std::map<LiveIndex, MachineInstrIndex>::iterator
|
std::map<LiveIndex, LiveIndex>::iterator
|
||||||
EI = BExtend.find(End);
|
EI = BExtend.find(End);
|
||||||
if (EI != BExtend.end())
|
if (EI != BExtend.end())
|
||||||
End = EI->second;
|
End = EI->second;
|
||||||
@ -549,7 +549,7 @@ static bool isSameOrFallThroughBB(MachineBasicBlock *MBB,
|
|||||||
/// from a physical register live interval as well as from the live intervals
|
/// from a physical register live interval as well as from the live intervals
|
||||||
/// of its sub-registers.
|
/// of its sub-registers.
|
||||||
static void removeRange(LiveInterval &li,
|
static void removeRange(LiveInterval &li,
|
||||||
LiveIndex Start, MachineInstrIndex End,
|
LiveIndex Start, LiveIndex End,
|
||||||
LiveIntervals *li_, const TargetRegisterInfo *tri_) {
|
LiveIntervals *li_, const TargetRegisterInfo *tri_) {
|
||||||
li.removeRange(Start, End, true);
|
li.removeRange(Start, End, true);
|
||||||
if (TargetRegisterInfo::isPhysicalRegister(li.reg)) {
|
if (TargetRegisterInfo::isPhysicalRegister(li.reg)) {
|
||||||
|
@ -321,7 +321,7 @@ public:
|
|||||||
vrm->assignVirt2StackSlot(li->reg, ss);
|
vrm->assignVirt2StackSlot(li->reg, ss);
|
||||||
|
|
||||||
MachineInstr *mi = 0;
|
MachineInstr *mi = 0;
|
||||||
LiveIndex storeIdx = MachineInstrIndex();
|
LiveIndex storeIdx = LiveIndex();
|
||||||
|
|
||||||
if (valno->isDefAccurate()) {
|
if (valno->isDefAccurate()) {
|
||||||
// If we have an accurate def we can just grab an iterator to the instr
|
// If we have an accurate def we can just grab an iterator to the instr
|
||||||
@ -335,7 +335,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
MachineBasicBlock *defBlock = mi->getParent();
|
MachineBasicBlock *defBlock = mi->getParent();
|
||||||
LiveIndex loadIdx = MachineInstrIndex();
|
LiveIndex loadIdx = LiveIndex();
|
||||||
|
|
||||||
// Now we need to find the load...
|
// Now we need to find the load...
|
||||||
MachineBasicBlock::iterator useItr(mi);
|
MachineBasicBlock::iterator useItr(mi);
|
||||||
|
@ -748,7 +748,7 @@ void StrongPHIElimination::ScheduleCopies(MachineBasicBlock* MBB,
|
|||||||
|
|
||||||
LiveInterval& I = LI.getInterval(curr.second);
|
LiveInterval& I = LI.getInterval(curr.second);
|
||||||
MachineBasicBlock::iterator term = MBB->getFirstTerminator();
|
MachineBasicBlock::iterator term = MBB->getFirstTerminator();
|
||||||
LiveIndex endIdx = MachineInstrIndex();
|
LiveIndex endIdx = LiveIndex();
|
||||||
if (term != MBB->end())
|
if (term != MBB->end())
|
||||||
endIdx = LI.getInstructionIndex(term);
|
endIdx = LI.getInstructionIndex(term);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user