From 08bac7b901744c044b36ff17b5791a7faacd7586 Mon Sep 17 00:00:00 2001 From: Sanjay Patel Date: Fri, 22 May 2015 15:38:24 +0000 Subject: [PATCH] remove names from comments, fix typos; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238027 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/RegisterScavenging.h | 37 ++++++++++------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h index 90093951ff0..df3fd34e0af 100644 --- a/include/llvm/CodeGen/RegisterScavenging.h +++ b/include/llvm/CodeGen/RegisterScavenging.h @@ -36,8 +36,7 @@ class RegScavenger { MachineBasicBlock::iterator MBBI; unsigned NumRegUnits; - /// Tracking - True if RegScavenger is currently tracking the liveness of - /// registers. + /// True if RegScavenger is currently tracking the liveness of registers. bool Tracking; /// Information on scavenged registers (held in a spill slot). @@ -58,8 +57,8 @@ class RegScavenger { /// A vector of information on scavenged registers. SmallVector Scavenged; - /// RegUnitsAvailable - The current state of each reg unit immediatelly - /// before MBBI. One bit per register unit. If bit is not set it means any + /// The current state of each reg unit immediately before MBBI. + /// One bit per register unit. If bit is not set it means any /// register containing that register unit is currently being used. BitVector RegUnitsAvailable; @@ -72,18 +71,17 @@ public: RegScavenger() : MBB(nullptr), NumRegUnits(0), Tracking(false) {} - /// enterBasicBlock - Start tracking liveness from the begin of the specific - /// basic block. + /// Start tracking liveness from the begin of the specific basic block. void enterBasicBlock(MachineBasicBlock *mbb); - /// initRegState - allow resetting register state info for multiple + /// Allow resetting register state info for multiple /// passes over/within the same function. void initRegState(); - /// forward - Move the internal MBB iterator and update register states. + /// Move the internal MBB iterator and update register states. void forward(); - /// forward - Move the internal MBB iterator and update register states until + /// Move the internal MBB iterator and update register states until /// it has processed the specific iterator. void forward(MachineBasicBlock::iterator I) { if (!Tracking && MBB->begin() != I) forward(); @@ -99,7 +97,7 @@ public: while (MBBI != I) unprocess(); } - /// skipTo - Move the internal MBB iterator but do not update register states. + /// Move the internal MBB iterator but do not update register states. void skipTo(MachineBasicBlock::iterator I) { if (I == MachineBasicBlock::iterator(nullptr)) Tracking = false; @@ -110,14 +108,13 @@ public: return MBBI; } - /// isRegUsed - return if a specific register is currently used. + /// Return if a specific register is currently used. bool isRegUsed(unsigned Reg, bool includeReserved = true) const; - /// getRegsAvailable - Return all available registers in the register class - /// in Mask. + /// Return all available registers in the register class in Mask. BitVector getRegsAvailable(const TargetRegisterClass *RC); - /// FindUnusedReg - Find a unused register of the specified register class. + /// Find an unused register of the specified register class. /// Return 0 if none is found. unsigned FindUnusedReg(const TargetRegisterClass *RegClass) const; @@ -144,7 +141,7 @@ public: A.push_back(I->FrameIndex); } - /// scavengeRegister - Make a register of the specific register class + /// Make a register of the specific register class /// available and do the appropriate bookkeeping. SPAdj is the stack /// adjustment due to call frame, it's passed along to eliminateFrameIndex(). /// Returns the scavenged register. @@ -154,11 +151,10 @@ public: return scavengeRegister(RegClass, MBBI, SPAdj); } - /// setRegUsed - Tell the scavenger a register is used. - /// + /// Tell the scavenger a register is used. void setRegUsed(unsigned Reg); private: - /// isReserved - Returns true if a register is reserved. It is never "unused". + /// Returns true if a register is reserved. It is never "unused". bool isReserved(unsigned Reg) const { return MRI->isReserved(Reg); } /// setUsed / setUnused - Mark the state of one or a number of register units. @@ -177,9 +173,8 @@ private: /// Add all Reg Units that Reg contains to BV. void addRegUnits(BitVector &BV, unsigned Reg); - /// findSurvivorReg - Return the candidate register that is unused for the - /// longest after StartMI. UseMI is set to the instruction where the search - /// stopped. + /// Return the candidate register that is unused for the longest after + /// StartMI. UseMI is set to the instruction where the search stopped. /// /// No more than InstrLimit instructions are inspected. unsigned findSurvivorReg(MachineBasicBlock::iterator StartMI,