Modernize naming convention for class members.

No functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157079 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2012-05-18 22:10:15 +00:00
parent b3776d33cf
commit c696c8bd35
2 changed files with 45 additions and 45 deletions

View File

@ -55,29 +55,29 @@ public:
}; };
private: private:
LiveInterval &parent_; LiveInterval &Parent;
SmallVectorImpl<LiveInterval*> &newRegs_; SmallVectorImpl<LiveInterval*> &NewRegs;
MachineRegisterInfo &MRI; MachineRegisterInfo &MRI;
LiveIntervals &LIS; LiveIntervals &LIS;
VirtRegMap *VRM; VirtRegMap *VRM;
const TargetInstrInfo &TII; const TargetInstrInfo &TII;
Delegate *const delegate_; Delegate *const TheDelegate;
/// firstNew_ - Index of the first register added to newRegs_. /// FirstNew - Index of the first register added to NewRegs.
const unsigned firstNew_; const unsigned FirstNew;
/// scannedRemattable_ - true when remattable values have been identified. /// ScannedRemattable - true when remattable values have been identified.
bool scannedRemattable_; bool ScannedRemattable;
/// remattable_ - Values defined by remattable instructions as identified by /// Remattable - Values defined by remattable instructions as identified by
/// tii.isTriviallyReMaterializable(). /// tii.isTriviallyReMaterializable().
SmallPtrSet<const VNInfo*,4> remattable_; SmallPtrSet<const VNInfo*,4> Remattable;
/// rematted_ - Values that were actually rematted, and so need to have their /// Rematted - Values that were actually rematted, and so need to have their
/// live range trimmed or entirely removed. /// live range trimmed or entirely removed.
SmallPtrSet<const VNInfo*,4> rematted_; SmallPtrSet<const VNInfo*,4> Rematted;
/// scanRemattable - Identify the parent_ values that may rematerialize. /// scanRemattable - Identify the Parent values that may rematerialize.
void scanRemattable(AliasAnalysis *aa); void scanRemattable(AliasAnalysis *aa);
/// allUsesAvailableAt - Return true if all registers used by OrigMI at /// allUsesAvailableAt - Return true if all registers used by OrigMI at
@ -105,26 +105,26 @@ public:
LiveIntervals &lis, LiveIntervals &lis,
VirtRegMap *vrm, VirtRegMap *vrm,
Delegate *delegate = 0) Delegate *delegate = 0)
: parent_(parent), newRegs_(newRegs), : Parent(parent), NewRegs(newRegs),
MRI(MF.getRegInfo()), LIS(lis), VRM(vrm), MRI(MF.getRegInfo()), LIS(lis), VRM(vrm),
TII(*MF.getTarget().getInstrInfo()), TII(*MF.getTarget().getInstrInfo()),
delegate_(delegate), TheDelegate(delegate),
firstNew_(newRegs.size()), FirstNew(newRegs.size()),
scannedRemattable_(false) {} ScannedRemattable(false) {}
LiveInterval &getParent() const { return parent_; } LiveInterval &getParent() const { return Parent; }
unsigned getReg() const { return parent_.reg; } unsigned getReg() const { return Parent.reg; }
/// Iterator for accessing the new registers added by this edit. /// Iterator for accessing the new registers added by this edit.
typedef SmallVectorImpl<LiveInterval*>::const_iterator iterator; typedef SmallVectorImpl<LiveInterval*>::const_iterator iterator;
iterator begin() const { return newRegs_.begin()+firstNew_; } iterator begin() const { return NewRegs.begin()+FirstNew; }
iterator end() const { return newRegs_.end(); } iterator end() const { return NewRegs.end(); }
unsigned size() const { return newRegs_.size()-firstNew_; } unsigned size() const { return NewRegs.size()-FirstNew; }
bool empty() const { return size() == 0; } bool empty() const { return size() == 0; }
LiveInterval *get(unsigned idx) const { return newRegs_[idx+firstNew_]; } LiveInterval *get(unsigned idx) const { return NewRegs[idx+FirstNew]; }
ArrayRef<LiveInterval*> regs() const { ArrayRef<LiveInterval*> regs() const {
return makeArrayRef(newRegs_).slice(firstNew_); return makeArrayRef(NewRegs).slice(FirstNew);
} }
/// createFrom - Create a new virtual register based on OldReg. /// createFrom - Create a new virtual register based on OldReg.
@ -174,12 +174,12 @@ public:
/// markRematerialized - explicitly mark a value as rematerialized after doing /// markRematerialized - explicitly mark a value as rematerialized after doing
/// it manually. /// it manually.
void markRematerialized(const VNInfo *ParentVNI) { void markRematerialized(const VNInfo *ParentVNI) {
rematted_.insert(ParentVNI); Rematted.insert(ParentVNI);
} }
/// didRematerialize - Return true if ParentVNI was rematerialized anywhere. /// didRematerialize - Return true if ParentVNI was rematerialized anywhere.
bool didRematerialize(const VNInfo *ParentVNI) const { bool didRematerialize(const VNInfo *ParentVNI) const {
return rematted_.count(ParentVNI); return Rematted.count(ParentVNI);
} }
/// eraseVirtReg - Notify the delegate that Reg is no longer in use, and try /// eraseVirtReg - Notify the delegate that Reg is no longer in use, and try

View File

@ -38,7 +38,7 @@ LiveInterval &LiveRangeEdit::createFrom(unsigned OldReg) {
VRM->setIsSplitFromReg(VReg, VRM->getOriginal(OldReg)); VRM->setIsSplitFromReg(VReg, VRM->getOriginal(OldReg));
} }
LiveInterval &LI = LIS.getOrCreateInterval(VReg); LiveInterval &LI = LIS.getOrCreateInterval(VReg);
newRegs_.push_back(&LI); NewRegs.push_back(&LI);
return LI; return LI;
} }
@ -46,16 +46,16 @@ bool LiveRangeEdit::checkRematerializable(VNInfo *VNI,
const MachineInstr *DefMI, const MachineInstr *DefMI,
AliasAnalysis *aa) { AliasAnalysis *aa) {
assert(DefMI && "Missing instruction"); assert(DefMI && "Missing instruction");
scannedRemattable_ = true; ScannedRemattable = true;
if (!TII.isTriviallyReMaterializable(DefMI, aa)) if (!TII.isTriviallyReMaterializable(DefMI, aa))
return false; return false;
remattable_.insert(VNI); Remattable.insert(VNI);
return true; return true;
} }
void LiveRangeEdit::scanRemattable(AliasAnalysis *aa) { void LiveRangeEdit::scanRemattable(AliasAnalysis *aa) {
for (LiveInterval::vni_iterator I = parent_.vni_begin(), for (LiveInterval::vni_iterator I = Parent.vni_begin(),
E = parent_.vni_end(); I != E; ++I) { E = Parent.vni_end(); I != E; ++I) {
VNInfo *VNI = *I; VNInfo *VNI = *I;
if (VNI->isUnused()) if (VNI->isUnused())
continue; continue;
@ -64,13 +64,13 @@ void LiveRangeEdit::scanRemattable(AliasAnalysis *aa) {
continue; continue;
checkRematerializable(VNI, DefMI, aa); checkRematerializable(VNI, DefMI, aa);
} }
scannedRemattable_ = true; ScannedRemattable = true;
} }
bool LiveRangeEdit::anyRematerializable(AliasAnalysis *aa) { bool LiveRangeEdit::anyRematerializable(AliasAnalysis *aa) {
if (!scannedRemattable_) if (!ScannedRemattable)
scanRemattable(aa); scanRemattable(aa);
return !remattable_.empty(); return !Remattable.empty();
} }
/// allUsesAvailableAt - Return true if all registers used by OrigMI at /// allUsesAvailableAt - Return true if all registers used by OrigMI at
@ -101,10 +101,10 @@ bool LiveRangeEdit::allUsesAvailableAt(const MachineInstr *OrigMI,
bool LiveRangeEdit::canRematerializeAt(Remat &RM, bool LiveRangeEdit::canRematerializeAt(Remat &RM,
SlotIndex UseIdx, SlotIndex UseIdx,
bool cheapAsAMove) { bool cheapAsAMove) {
assert(scannedRemattable_ && "Call anyRematerializable first"); assert(ScannedRemattable && "Call anyRematerializable first");
// Use scanRemattable info. // Use scanRemattable info.
if (!remattable_.count(RM.ParentVNI)) if (!Remattable.count(RM.ParentVNI))
return false; return false;
// No defining instruction provided. // No defining instruction provided.
@ -136,13 +136,13 @@ SlotIndex LiveRangeEdit::rematerializeAt(MachineBasicBlock &MBB,
bool Late) { bool Late) {
assert(RM.OrigMI && "Invalid remat"); assert(RM.OrigMI && "Invalid remat");
TII.reMaterialize(MBB, MI, DestReg, 0, RM.OrigMI, tri); TII.reMaterialize(MBB, MI, DestReg, 0, RM.OrigMI, tri);
rematted_.insert(RM.ParentVNI); Rematted.insert(RM.ParentVNI);
return LIS.getSlotIndexes()->insertMachineInstrInMaps(--MI, Late) return LIS.getSlotIndexes()->insertMachineInstrInMaps(--MI, Late)
.getRegSlot(); .getRegSlot();
} }
void LiveRangeEdit::eraseVirtReg(unsigned Reg) { void LiveRangeEdit::eraseVirtReg(unsigned Reg) {
if (delegate_ && delegate_->LRE_CanEraseVirtReg(Reg)) if (TheDelegate && TheDelegate->LRE_CanEraseVirtReg(Reg))
LIS.removeInterval(Reg); LIS.removeInterval(Reg);
} }
@ -242,8 +242,8 @@ void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead,
// Remove defined value. // Remove defined value.
if (MOI->isDef()) { if (MOI->isDef()) {
if (VNInfo *VNI = LI.getVNInfoAt(Idx)) { if (VNInfo *VNI = LI.getVNInfoAt(Idx)) {
if (delegate_) if (TheDelegate)
delegate_->LRE_WillShrinkVirtReg(LI.reg); TheDelegate->LRE_WillShrinkVirtReg(LI.reg);
LI.removeValNo(VNI); LI.removeValNo(VNI);
if (LI.empty()) { if (LI.empty()) {
ToShrink.remove(&LI); ToShrink.remove(&LI);
@ -253,8 +253,8 @@ void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead,
} }
} }
if (delegate_) if (TheDelegate)
delegate_->LRE_WillEraseInstruction(MI); TheDelegate->LRE_WillEraseInstruction(MI);
LIS.RemoveMachineInstrFromMaps(MI); LIS.RemoveMachineInstrFromMaps(MI);
MI->eraseFromParent(); MI->eraseFromParent();
++NumDCEDeleted; ++NumDCEDeleted;
@ -268,8 +268,8 @@ void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead,
ToShrink.pop_back(); ToShrink.pop_back();
if (foldAsLoad(LI, Dead)) if (foldAsLoad(LI, Dead))
continue; continue;
if (delegate_) if (TheDelegate)
delegate_->LRE_WillShrinkVirtReg(LI->reg); TheDelegate->LRE_WillShrinkVirtReg(LI->reg);
if (!LIS.shrinkToUses(LI, &Dead)) if (!LIS.shrinkToUses(LI, &Dead))
continue; continue;
@ -304,8 +304,8 @@ void LiveRangeEdit::eliminateDeadDefs(SmallVectorImpl<MachineInstr*> &Dead,
// interval must contain all the split products, and LI doesn't. // interval must contain all the split products, and LI doesn't.
if (IsOriginal) if (IsOriginal)
VRM->setIsSplitFromReg(Dups.back()->reg, 0); VRM->setIsSplitFromReg(Dups.back()->reg, 0);
if (delegate_) if (TheDelegate)
delegate_->LRE_DidCloneVirtReg(Dups.back()->reg, LI->reg); TheDelegate->LRE_DidCloneVirtReg(Dups.back()->reg, LI->reg);
} }
ConEQ.Distribute(&Dups[0], MRI); ConEQ.Distribute(&Dups[0], MRI);
} }