diff options
author | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
commit | dce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch) | |
tree | dcebc53f2b182f145a2e659393bf9a0472cedf23 /include/llvm/CodeGen/MachineRegisterInfo.h | |
parent | 220b921aed042f9e520c26cffd8282a94c66c3d5 (diff) | |
download | external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2 |
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'include/llvm/CodeGen/MachineRegisterInfo.h')
-rw-r--r-- | include/llvm/CodeGen/MachineRegisterInfo.h | 66 |
1 files changed, 41 insertions, 25 deletions
diff --git a/include/llvm/CodeGen/MachineRegisterInfo.h b/include/llvm/CodeGen/MachineRegisterInfo.h index 2285130..51139f7 100644 --- a/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/include/llvm/CodeGen/MachineRegisterInfo.h @@ -135,7 +135,7 @@ public: // notifications, we will need to change to using a list. assert(TheDelegate == delegate && "Only the current delegate can perform reset!"); - TheDelegate = 0; + TheDelegate = nullptr; } void setDelegate(Delegate *delegate) { @@ -223,7 +223,7 @@ public: reg_iterator reg_begin(unsigned RegNo) const { return reg_iterator(getRegUseDefListHead(RegNo)); } - static reg_iterator reg_end() { return reg_iterator(0); } + static reg_iterator reg_end() { return reg_iterator(nullptr); } inline iterator_range<reg_iterator> reg_operands(unsigned Reg) const { return iterator_range<reg_iterator>(reg_begin(Reg), reg_end()); @@ -236,7 +236,9 @@ public: reg_instr_iterator reg_instr_begin(unsigned RegNo) const { return reg_instr_iterator(getRegUseDefListHead(RegNo)); } - static reg_instr_iterator reg_instr_end() { return reg_instr_iterator(0); } + static reg_instr_iterator reg_instr_end() { + return reg_instr_iterator(nullptr); + } inline iterator_range<reg_instr_iterator> reg_instructions(unsigned Reg) const { @@ -251,7 +253,9 @@ public: reg_bundle_iterator reg_bundle_begin(unsigned RegNo) const { return reg_bundle_iterator(getRegUseDefListHead(RegNo)); } - static reg_bundle_iterator reg_bundle_end() { return reg_bundle_iterator(0); } + static reg_bundle_iterator reg_bundle_end() { + return reg_bundle_iterator(nullptr); + } inline iterator_range<reg_bundle_iterator> reg_bundles(unsigned Reg) const { return iterator_range<reg_bundle_iterator>(reg_bundle_begin(Reg), @@ -269,7 +273,9 @@ public: reg_nodbg_iterator reg_nodbg_begin(unsigned RegNo) const { return reg_nodbg_iterator(getRegUseDefListHead(RegNo)); } - static reg_nodbg_iterator reg_nodbg_end() { return reg_nodbg_iterator(0); } + static reg_nodbg_iterator reg_nodbg_end() { + return reg_nodbg_iterator(nullptr); + } inline iterator_range<reg_nodbg_iterator> reg_nodbg_operands(unsigned Reg) const { @@ -286,7 +292,7 @@ public: return reg_instr_nodbg_iterator(getRegUseDefListHead(RegNo)); } static reg_instr_nodbg_iterator reg_instr_nodbg_end() { - return reg_instr_nodbg_iterator(0); + return reg_instr_nodbg_iterator(nullptr); } inline iterator_range<reg_instr_nodbg_iterator> @@ -304,7 +310,7 @@ public: return reg_bundle_nodbg_iterator(getRegUseDefListHead(RegNo)); } static reg_bundle_nodbg_iterator reg_bundle_nodbg_end() { - return reg_bundle_nodbg_iterator(0); + return reg_bundle_nodbg_iterator(nullptr); } inline iterator_range<reg_bundle_nodbg_iterator> @@ -325,7 +331,7 @@ public: def_iterator def_begin(unsigned RegNo) const { return def_iterator(getRegUseDefListHead(RegNo)); } - static def_iterator def_end() { return def_iterator(0); } + static def_iterator def_end() { return def_iterator(nullptr); } inline iterator_range<def_iterator> def_operands(unsigned Reg) const { return iterator_range<def_iterator>(def_begin(Reg), def_end()); @@ -338,7 +344,9 @@ public: def_instr_iterator def_instr_begin(unsigned RegNo) const { return def_instr_iterator(getRegUseDefListHead(RegNo)); } - static def_instr_iterator def_instr_end() { return def_instr_iterator(0); } + static def_instr_iterator def_instr_end() { + return def_instr_iterator(nullptr); + } inline iterator_range<def_instr_iterator> def_instructions(unsigned Reg) const { @@ -353,7 +361,9 @@ public: def_bundle_iterator def_bundle_begin(unsigned RegNo) const { return def_bundle_iterator(getRegUseDefListHead(RegNo)); } - static def_bundle_iterator def_bundle_end() { return def_bundle_iterator(0); } + static def_bundle_iterator def_bundle_end() { + return def_bundle_iterator(nullptr); + } inline iterator_range<def_bundle_iterator> def_bundles(unsigned Reg) const { return iterator_range<def_bundle_iterator>(def_bundle_begin(Reg), @@ -379,7 +389,7 @@ public: use_iterator use_begin(unsigned RegNo) const { return use_iterator(getRegUseDefListHead(RegNo)); } - static use_iterator use_end() { return use_iterator(0); } + static use_iterator use_end() { return use_iterator(nullptr); } inline iterator_range<use_iterator> use_operands(unsigned Reg) const { return iterator_range<use_iterator>(use_begin(Reg), use_end()); @@ -392,7 +402,9 @@ public: use_instr_iterator use_instr_begin(unsigned RegNo) const { return use_instr_iterator(getRegUseDefListHead(RegNo)); } - static use_instr_iterator use_instr_end() { return use_instr_iterator(0); } + static use_instr_iterator use_instr_end() { + return use_instr_iterator(nullptr); + } inline iterator_range<use_instr_iterator> use_instructions(unsigned Reg) const { @@ -407,7 +419,9 @@ public: use_bundle_iterator use_bundle_begin(unsigned RegNo) const { return use_bundle_iterator(getRegUseDefListHead(RegNo)); } - static use_bundle_iterator use_bundle_end() { return use_bundle_iterator(0); } + static use_bundle_iterator use_bundle_end() { + return use_bundle_iterator(nullptr); + } inline iterator_range<use_bundle_iterator> use_bundles(unsigned Reg) const { return iterator_range<use_bundle_iterator>(use_bundle_begin(Reg), @@ -434,7 +448,9 @@ public: use_nodbg_iterator use_nodbg_begin(unsigned RegNo) const { return use_nodbg_iterator(getRegUseDefListHead(RegNo)); } - static use_nodbg_iterator use_nodbg_end() { return use_nodbg_iterator(0); } + static use_nodbg_iterator use_nodbg_end() { + return use_nodbg_iterator(nullptr); + } inline iterator_range<use_nodbg_iterator> use_nodbg_operands(unsigned Reg) const { @@ -451,7 +467,7 @@ public: return use_instr_nodbg_iterator(getRegUseDefListHead(RegNo)); } static use_instr_nodbg_iterator use_instr_nodbg_end() { - return use_instr_nodbg_iterator(0); + return use_instr_nodbg_iterator(nullptr); } inline iterator_range<use_instr_nodbg_iterator> @@ -469,7 +485,7 @@ public: return use_bundle_nodbg_iterator(getRegUseDefListHead(RegNo)); } static use_bundle_nodbg_iterator use_bundle_nodbg_end() { - return use_bundle_nodbg_iterator(0); + return use_bundle_nodbg_iterator(nullptr); } inline iterator_range<use_bundle_nodbg_iterator> @@ -779,7 +795,7 @@ public: if (!ReturnUses) { if (Op) { if (Op->isUse()) - Op = 0; + Op = nullptr; else assert(!Op->isDebug() && "Can't have debug defs"); } @@ -797,7 +813,7 @@ public: MachineInstr, ptrdiff_t>::pointer pointer; defusechain_iterator(const defusechain_iterator &I) : Op(I.Op) {} - defusechain_iterator() : Op(0) {} + defusechain_iterator() : Op(nullptr) {} bool operator==(const defusechain_iterator &x) const { return Op == x.Op; @@ -807,7 +823,7 @@ public: } /// atEnd - return true if this iterator is equal to reg_end() on the value. - bool atEnd() const { return Op == 0; } + bool atEnd() const { return Op == nullptr; } // Iterator traversal: forward iteration only defusechain_iterator &operator++() { // Preincrement @@ -882,7 +898,7 @@ public: if (!ReturnUses) { if (Op) { if (Op->isUse()) - Op = 0; + Op = nullptr; else assert(!Op->isDebug() && "Can't have debug defs"); } @@ -900,7 +916,7 @@ public: MachineInstr, ptrdiff_t>::pointer pointer; defusechain_instr_iterator(const defusechain_instr_iterator &I) : Op(I.Op){} - defusechain_instr_iterator() : Op(0) {} + defusechain_instr_iterator() : Op(nullptr) {} bool operator==(const defusechain_instr_iterator &x) const { return Op == x.Op; @@ -910,7 +926,7 @@ public: } /// atEnd - return true if this iterator is equal to reg_end() on the value. - bool atEnd() const { return Op == 0; } + bool atEnd() const { return Op == nullptr; } // Iterator traversal: forward iteration only defusechain_instr_iterator &operator++() { // Preincrement @@ -957,7 +973,7 @@ class PSetIterator { const int *PSet; unsigned Weight; public: - PSetIterator(): PSet(0), Weight(0) {} + PSetIterator(): PSet(nullptr), Weight(0) {} PSetIterator(unsigned RegUnit, const MachineRegisterInfo *MRI) { const TargetRegisterInfo *TRI = MRI->getTargetRegisterInfo(); if (TargetRegisterInfo::isVirtualRegister(RegUnit)) { @@ -970,7 +986,7 @@ public: Weight = TRI->getRegUnitWeight(RegUnit); } if (*PSet == -1) - PSet = 0; + PSet = nullptr; } bool isValid() const { return PSet; } @@ -982,7 +998,7 @@ public: assert(isValid() && "Invalid PSetIterator."); ++PSet; if (*PSet == -1) - PSet = 0; + PSet = nullptr; } }; |