mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Add clarifying comments defining what a Loop is
Our loop construct is not a way to identify cycles in the CFG. This wasn't immediately obvious from the header, so clarify that fact. The motivation for this was that I just fixed a out of tree bug due to a mistaken assumption (on my part) on what a Loop actually was. While it was fresh in my mind, I wanted to document the key point. llvm-svn: 258154
This commit is contained in:
parent
a46637dede
commit
642c77546e
@ -25,6 +25,12 @@
|
||||
// * the loop depth
|
||||
// * etc...
|
||||
//
|
||||
// Note that this analysis specifically identifies *Loops* not cycles or SCCs
|
||||
// in the CFG. There can be strongly connected compontents in the CFG which
|
||||
// this analysis will not recognize and that will not be represented by a Loop
|
||||
// instance. In particular, a Loop might be inside such a non-loop SCC, or a
|
||||
// non-loop SCC might contain a sub-SCC which is a Loop.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_ANALYSIS_LOOPINFO_H
|
||||
@ -346,6 +352,9 @@ raw_ostream& operator<<(raw_ostream &OS, const LoopBase<BlockT, LoopT> &Loop) {
|
||||
// Implementation in LoopInfoImpl.h
|
||||
extern template class LoopBase<BasicBlock, Loop>;
|
||||
|
||||
|
||||
/// Represents a single loop in the control flow graph. Not that not all SCCs
|
||||
/// in the CFG are neccessarily loops.
|
||||
class Loop : public LoopBase<BasicBlock, Loop> {
|
||||
public:
|
||||
Loop() {}
|
||||
|
Loading…
Reference in New Issue
Block a user