[llvm] r257835 - remove duplicate documentation comments (already in the header file) ; NFC
Sanjay Patel via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 14 15:23:13 PST 2016
Author: spatel
Date: Thu Jan 14 17:23:04 2016
New Revision: 257835
URL: http://llvm.org/viewvc/llvm-project?rev=257835&view=rev
Log:
remove duplicate documentation comments (already in the header file) ; NFC
Modified:
llvm/trunk/lib/Analysis/LoopInfo.cpp
Modified: llvm/trunk/lib/Analysis/LoopInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopInfo.cpp?rev=257835&r1=257834&r2=257835&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopInfo.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopInfo.cpp Thu Jan 14 17:23:04 2016
@@ -54,29 +54,16 @@ static const char *const LoopMDName = "l
// Loop implementation
//
-/// isLoopInvariant - Return true if the specified value is loop invariant
-///
bool Loop::isLoopInvariant(const Value *V) const {
if (const Instruction *I = dyn_cast<Instruction>(V))
return !contains(I);
return true; // All non-instructions are loop invariant
}
-/// hasLoopInvariantOperands - Return true if all the operands of the
-/// specified instruction are loop invariant.
bool Loop::hasLoopInvariantOperands(const Instruction *I) const {
return all_of(I->operands(), [this](Value *V) { return isLoopInvariant(V); });
}
-/// makeLoopInvariant - If the given value is an instruciton inside of the
-/// loop and it can be hoisted, do so to make it trivially loop-invariant.
-/// Return true if the value after any hoisting is loop invariant. This
-/// function can be used as a slightly more aggressive replacement for
-/// isLoopInvariant.
-///
-/// If InsertPt is specified, it is the point to hoist instructions to.
-/// If null, the terminator of the loop preheader is used.
-///
bool Loop::makeLoopInvariant(Value *V, bool &Changed,
Instruction *InsertPt) const {
if (Instruction *I = dyn_cast<Instruction>(V))
@@ -84,15 +71,6 @@ bool Loop::makeLoopInvariant(Value *V, b
return true; // All non-instructions are loop-invariant.
}
-/// makeLoopInvariant - If the given instruction is inside of the
-/// loop and it can be hoisted, do so to make it trivially loop-invariant.
-/// Return true if the instruction after any hoisting is loop invariant. This
-/// function can be used as a slightly more aggressive replacement for
-/// isLoopInvariant.
-///
-/// If InsertPt is specified, it is the point to hoist instructions to.
-/// If null, the terminator of the loop preheader is used.
-///
bool Loop::makeLoopInvariant(Instruction *I, bool &Changed,
Instruction *InsertPt) const {
// Test if the value is already loop-invariant.
@@ -131,14 +109,6 @@ bool Loop::makeLoopInvariant(Instruction
return true;
}
-/// getCanonicalInductionVariable - Check to see if the loop has a canonical
-/// induction variable: an integer recurrence that starts at 0 and increments
-/// by one each time through the loop. If so, return the phi node that
-/// corresponds to it.
-///
-/// The IndVarSimplify pass transforms loops to have a canonical induction
-/// variable.
-///
PHINode *Loop::getCanonicalInductionVariable() const {
BasicBlock *H = getHeader();
@@ -175,7 +145,6 @@ PHINode *Loop::getCanonicalInductionVari
return nullptr;
}
-/// isLCSSAForm - Return true if the Loop is in LCSSA form
bool Loop::isLCSSAForm(DominatorTree &DT) const {
for (block_iterator BI = block_begin(), E = block_end(); BI != E; ++BI) {
BasicBlock *BB = *BI;
@@ -216,17 +185,13 @@ bool Loop::isRecursivelyLCSSAForm(Domina
});
}
-/// isLoopSimplifyForm - Return true if the Loop is in the form that
-/// the LoopSimplify form transforms loops to, which is sometimes called
-/// normal form.
bool Loop::isLoopSimplifyForm() const {
// Normal-form loops have a preheader, a single backedge, and all of their
// exits have all their predecessors inside the loop.
return getLoopPreheader() && getLoopLatch() && hasDedicatedExits();
}
-/// isSafeToClone - Return true if the loop body is safe to clone in practice.
-/// Routines that reform the loop CFG and split edges often fail on indirectbr.
+// Routines that reform the loop CFG and split edges often fail on indirectbr.
bool Loop::isSafeToClone() const {
// Return false if any loop blocks contain indirectbrs, or there are any calls
// to noduplicate functions.
@@ -353,9 +318,6 @@ bool Loop::isAnnotatedParallel() const {
return true;
}
-
-/// hasDedicatedExits - Return true if no exit block for the loop
-/// has a predecessor that is outside the loop.
bool Loop::hasDedicatedExits() const {
// Each predecessor of each exit block of a normal loop is contained
// within the loop.
@@ -370,10 +332,6 @@ bool Loop::hasDedicatedExits() const {
return true;
}
-/// getUniqueExitBlocks - Return all unique successor blocks of this loop.
-/// These are the blocks _outside of the current loop_ which are branched to.
-/// This assumes that loop exits are in canonical form.
-///
void
Loop::getUniqueExitBlocks(SmallVectorImpl<BasicBlock *> &ExitBlocks) const {
assert(hasDedicatedExits() &&
@@ -421,8 +379,6 @@ Loop::getUniqueExitBlocks(SmallVectorImp
}
}
-/// getUniqueExitBlock - If getUniqueExitBlocks would return exactly one
-/// block, return that block. Otherwise return null.
BasicBlock *Loop::getUniqueExitBlock() const {
SmallVector<BasicBlock *, 8> UniqueExitBlocks;
getUniqueExitBlocks(UniqueExitBlocks);
@@ -475,8 +431,8 @@ protected:
};
} // end anonymous namespace
-/// updateBlockParents - Update the parent loop for all blocks that are directly
-/// contained within the original "unloop".
+/// Update the parent loop for all blocks that are directly contained within the
+/// original "unloop".
void UnloopUpdater::updateBlockParents() {
if (Unloop->getNumBlocks()) {
// Perform a post order CFG traversal of all blocks within this loop,
@@ -525,8 +481,7 @@ void UnloopUpdater::updateBlockParents()
}
}
-/// removeBlocksFromAncestors - Remove unloop's blocks from all ancestors below
-/// their new parents.
+/// Remove unloop's blocks from all ancestors below their new parents.
void UnloopUpdater::removeBlocksFromAncestors() {
// Remove all unloop's blocks (including those in nested subloops) from
// ancestors below the new parent loop.
@@ -548,8 +503,7 @@ void UnloopUpdater::removeBlocksFromAnce
}
}
-/// updateSubloopParents - Update the parent loop for all subloops directly
-/// nested within unloop.
+/// Update the parent loop for all subloops directly nested within unloop.
void UnloopUpdater::updateSubloopParents() {
while (!Unloop->empty()) {
Loop *Subloop = *std::prev(Unloop->end());
@@ -563,9 +517,9 @@ void UnloopUpdater::updateSubloopParents
}
}
-/// getNearestLoop - Return the nearest parent loop among this block's
-/// successors. If a successor is a subloop header, consider its parent to be
-/// the nearest parent of the subloop's exits.
+/// Return the nearest parent loop among this block's successors. If a successor
+/// is a subloop header, consider its parent to be the nearest parent of the
+/// subloop's exits.
///
/// For subloop blocks, simply update SubloopParents and return NULL.
Loop *UnloopUpdater::getNearestLoop(BasicBlock *BB, Loop *BBLoop) {
More information about the llvm-commits
mailing list