Lines Matching refs:Loop

40 class Loop {
42 using ChildrenList = std::vector<Loop*>;
49 explicit Loop(IRContext* context)
59 Loop(IRContext* context, DominatorAnalysis* analysis, BasicBlock* header,
151 // Returns true if the loop is in a Loop Closed SSA form.
160 for (const Loop* loop = GetParent(); loop; loop = loop->GetParent()) lvl++;
169 inline void AddNestedLoop(Loop* nested) {
175 inline Loop* GetParent() { return parent_; }
176 inline const Loop* GetParent() const { return parent_; }
208 for (Loop* loop = this; loop != nullptr; loop = loop->parent_) {
217 for (Loop* loop = this; loop != nullptr; loop = loop->parent_) {
253 // Returns the value of the OpLoopMerge control operand as a bool. Loop
268 inline void RemoveChildLoop(Loop* loop) {
283 for (const Loop* child : nested_loops_) {
297 inline void SetParent(Loop* parent) { parent_ = parent; }
375 Loop* parent_;
416 // Loop descriptions class for a given function.
422 using iterator = PostOrderTreeDFIterator<Loop>;
423 using const_iterator = PostOrderTreeDFIterator<const Loop>;
425 using pre_iterator = TreeDFIterator<Loop>;
426 using const_pre_iterator = TreeDFIterator<const Loop>;
435 // We need to take ownership of the Loop objects in the other
452 inline Loop& GetLoopByIndex(size_t index) const {
460 std::vector<Loop*> GetLoopsInBinaryLayoutOrder();
463 inline Loop* operator[](uint32_t block_id) const {
468 inline Loop* operator[](const BasicBlock* bb) const {
499 inline void SetBasicBlockToLoop(uint32_t bb_id, Loop* loop) {
505 inline void AddLoop(std::unique_ptr<Loop>&& loop_to_add, Loop* parent) {
524 Loop* AddLoopNest(std::unique_ptr<Loop> new_loop);
527 void RemoveLoop(Loop* loop);
529 void SetAsTopLoop(Loop* loop) {
536 Loop* GetPlaceholderRootLoop() { return &placeholder_top_loop_; }
537 const Loop* GetPlaceholderRootLoop() const { return &placeholder_top_loop_; }
542 using LoopContainerType = std::vector<Loop*>;
545 std::vector<std::pair<Loop*, std::unique_ptr<Loop>>>;
551 inline Loop* FindLoopForBasicBlock(uint32_t block_id) const {
552 std::unordered_map<uint32_t, Loop*>::const_iterator it =
560 // A list of all the loops in the function. This variable owns the Loop
565 Loop placeholder_top_loop_;
567 std::unordered_map<uint32_t, Loop*> basic_block_to_loop_;