llvm.org GIT mirror llvm / 7f8082c
fix documentation comments; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265855 91177308-0d34-0410-b5e6-96231b3b80d8 Sanjay Patel 4 years ago
1 changed file(s) with 23 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
4343 public:
4444 MachineLoop();
4545
46 /// getTopBlock - Return the "top" block in the loop, which is the first
47 /// block in the linear layout, ignoring any parts of the loop not
48 /// contiguous with the part the contains the header.
46 /// Return the "top" block in the loop, which is the first block in the linear
47 /// layout, ignoring any parts of the loop not contiguous with the part that
48 /// contains the header.
4949 MachineBasicBlock *getTopBlock();
5050
51 /// getBottomBlock - Return the "bottom" block in the loop, which is the last
52 /// block in the linear layout, ignoring any parts of the loop not
53 /// contiguous with the part the contains the header.
51 /// Return the "bottom" block in the loop, which is the last block in the
52 /// linear layout, ignoring any parts of the loop not contiguous with the part
53 /// that contains the header.
5454 MachineBasicBlock *getBottomBlock();
5555
5656 void dump() const;
8080
8181 LoopInfoBase& getBase() { return LI; }
8282
83 /// iterator/begin/end - The interface to the top-level loops in the current
84 /// function.
85 ///
83 /// The iterator interface to the top-level loops in the current function.
8684 typedef LoopInfoBase::iterator iterator;
8785 inline iterator begin() const { return LI.begin(); }
8886 inline iterator end() const { return LI.end(); }
8987 bool empty() const { return LI.empty(); }
9088
91 /// getLoopFor - Return the inner most loop that BB lives in. If a basic
92 /// block is in no loop (for example the entry node), null is returned.
93 ///
89 /// Return the innermost loop that BB lives in. If a basic block is in no loop
90 /// (for example the entry node), null is returned.
9491 inline MachineLoop *getLoopFor(const MachineBasicBlock *BB) const {
9592 return LI.getLoopFor(BB);
9693 }
9794
98 /// operator[] - same as getLoopFor...
99 ///
95 /// Same as getLoopFor.
10096 inline const MachineLoop *operator[](const MachineBasicBlock *BB) const {
10197 return LI.getLoopFor(BB);
10298 }
10399
104 /// getLoopDepth - Return the loop nesting level of the specified block...
105 ///
100 /// Return the loop nesting level of the specified block.
106101 inline unsigned getLoopDepth(const MachineBasicBlock *BB) const {
107102 return LI.getLoopDepth(BB);
108103 }
109104
110 // isLoopHeader - True if the block is a loop header node
105 /// True if the block is a loop header node.
111106 inline bool isLoopHeader(const MachineBasicBlock *BB) const {
112107 return LI.isLoopHeader(BB);
113108 }
114109
115 /// runOnFunction - Calculate the natural loop information.
116 ///
110 /// Calculate the natural loop information.
117111 bool runOnMachineFunction(MachineFunction &F) override;
118112
119113 void releaseMemory() override { LI.releaseMemory(); }
120114
121115 void getAnalysisUsage(AnalysisUsage &AU) const override;
122116
123 /// removeLoop - This removes the specified top-level loop from this loop info
124 /// object. The loop is not deleted, as it will presumably be inserted into
125 /// another loop.
117 /// This removes the specified top-level loop from this loop info object. The
118 /// loop is not deleted, as it will presumably be inserted into another loop.
126119 inline MachineLoop *removeLoop(iterator I) { return LI.removeLoop(I); }
127120
128 /// changeLoopFor - Change the top-level loop that contains BB to the
129 /// specified loop. This should be used by transformations that restructure
130 /// the loop hierarchy tree.
121 /// Change the top-level loop that contains BB to the specified loop. This
122 /// should be used by transformations that restructure the loop hierarchy
123 /// tree.
131124 inline void changeLoopFor(MachineBasicBlock *BB, MachineLoop *L) {
132125 LI.changeLoopFor(BB, L);
133126 }
134127
135 /// changeTopLevelLoop - Replace the specified loop in the top-level loops
136 /// list with the indicated loop.
128 /// Replace the specified loop in the top-level loops list with the indicated
129 /// loop.
137130 inline void changeTopLevelLoop(MachineLoop *OldLoop, MachineLoop *NewLoop) {
138131 LI.changeTopLevelLoop(OldLoop, NewLoop);
139132 }
140133
141 /// addTopLevelLoop - This adds the specified loop to the collection of
142 /// top-level loops.
134 /// This adds the specified loop to the collection of top-level loops.
143135 inline void addTopLevelLoop(MachineLoop *New) {
144136 LI.addTopLevelLoop(New);
145137 }
146138
147 /// removeBlock - This method completely removes BB from all data structures,
148 /// including all of the Loop objects it is nested in and our mapping from
139 /// This method completely removes BB from all data structures, including all
140 /// of the Loop objects it is nested in and our mapping from
149141 /// MachineBasicBlocks to loops.
150142 void removeBlock(MachineBasicBlock *BB) {
151143 LI.removeBlock(BB);