mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 19:25:00 +00:00
[C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -121,7 +121,7 @@ public:
|
||||
|
||||
SibValueInfo(unsigned Reg, VNInfo *VNI)
|
||||
: AllDefsAreReloads(true), DefByOrigPHI(false), KillsSource(false),
|
||||
SpillReg(Reg), SpillVNI(VNI), SpillMBB(0), DefMI(0) {}
|
||||
SpillReg(Reg), SpillVNI(VNI), SpillMBB(nullptr), DefMI(nullptr) {}
|
||||
|
||||
// Returns true when a def has been found.
|
||||
bool hasDef() const { return DefByOrigPHI || DefMI; }
|
||||
@@ -167,7 +167,7 @@ private:
|
||||
|
||||
bool isSibling(unsigned Reg);
|
||||
MachineInstr *traceSiblingValue(unsigned, VNInfo*, VNInfo*);
|
||||
void propagateSiblingValue(SibValueMap::iterator, VNInfo *VNI = 0);
|
||||
void propagateSiblingValue(SibValueMap::iterator, VNInfo *VNI = nullptr);
|
||||
void analyzeSiblingValues();
|
||||
|
||||
bool hoistSpill(LiveInterval &SpillLI, MachineInstr *CopyMI);
|
||||
@@ -179,7 +179,7 @@ private:
|
||||
|
||||
bool coalesceStackAccess(MachineInstr *MI, unsigned Reg);
|
||||
bool foldMemoryOperand(ArrayRef<std::pair<MachineInstr*, unsigned> >,
|
||||
MachineInstr *LoadMI = 0);
|
||||
MachineInstr *LoadMI = nullptr);
|
||||
void insertReload(unsigned VReg, SlotIndex, MachineBasicBlock::iterator MI);
|
||||
void insertSpill(unsigned VReg, bool isKill, MachineBasicBlock::iterator MI);
|
||||
|
||||
@@ -236,7 +236,7 @@ bool InlineSpiller::isSnippet(const LiveInterval &SnipLI) {
|
||||
if (SnipLI.getNumValNums() > 2 || !LIS.intervalIsInOneMBB(SnipLI))
|
||||
return false;
|
||||
|
||||
MachineInstr *UseMI = 0;
|
||||
MachineInstr *UseMI = nullptr;
|
||||
|
||||
// Check that all uses satisfy our criteria.
|
||||
for (MachineRegisterInfo::reg_instr_nodbg_iterator
|
||||
@@ -367,7 +367,7 @@ void InlineSpiller::propagateSiblingValue(SibValueMap::iterator SVIIter,
|
||||
do {
|
||||
SVI = WorkList.pop_back_val();
|
||||
TinyPtrVector<VNInfo*> *Deps = VNI ? &FirstDeps : &SVI->second.Deps;
|
||||
VNI = 0;
|
||||
VNI = nullptr;
|
||||
|
||||
SibValueInfo &SV = SVI->second;
|
||||
if (!SV.SpillMBB)
|
||||
@@ -659,7 +659,7 @@ void InlineSpiller::analyzeSiblingValues() {
|
||||
VNInfo *VNI = *VI;
|
||||
if (VNI->isUnused())
|
||||
continue;
|
||||
MachineInstr *DefMI = 0;
|
||||
MachineInstr *DefMI = nullptr;
|
||||
if (!VNI->isPHIDef()) {
|
||||
DefMI = LIS.getInstructionFromIndex(VNI->def);
|
||||
assert(DefMI && "No defining instruction");
|
||||
@@ -1359,7 +1359,7 @@ void InlineSpiller::spill(LiveRangeEdit &edit) {
|
||||
// Share a stack slot among all descendants of Original.
|
||||
Original = VRM.getOriginal(edit.getReg());
|
||||
StackSlot = VRM.getStackSlot(Original);
|
||||
StackInt = 0;
|
||||
StackInt = nullptr;
|
||||
|
||||
DEBUG(dbgs() << "Inline spilling "
|
||||
<< MRI.getRegClass(edit.getReg())->getName()
|
||||
|
Reference in New Issue
Block a user