Lines Matching refs:Loop
11 // loop instruction. The hardware loop can perform loop branches with a
16 // normalizes induction variables, and the Loop Strength Reduction pass
118 /// \brief Find the register that contains the loop controlling
124 /// loop:
127 /// if (R.next < #N) goto loop
133 /// \brief Analyze the statements in a loop to determine if the loop
140 /// a loop iterates. The function takes the operands that represent the
141 /// loop start value, loop end value, and induction value. Based upon
145 /// to the loop's preheader.
146 CountValue *computeCount(MachineLoop *Loop,
154 /// loop.
157 /// \brief Return true if the loop contains an instruction that inhibits
158 /// using the hardware loop.
161 /// \brief Given a loop, check if we can convert it to a hardware loop.
203 /// i.e. the comparison that controls the loop execution may be using
206 /// Return true if the loop's flow is the desired one (i.e. it's
213 /// \brief Given a loop, if it does not have a preheader, create one.
223 /// \brief Abstraction for a trip count of a loop. A smaller vesrsion
285 /// \brief Returns true if the instruction is a hardware loop instruction.
331 // value that will be added to it in each loop iteration.
423 /// \brief Analyze the statements in a loop to determine if the loop has
427 /// This function iterates over the phi nodes in the loop to check for
429 /// the number of time the loop is executed.
435 "Loop must have more than one incoming edge!");
437 if (PI == TopMBB->pred_end()) // dead loop?
488 // the header. Otherwise, branch to TB could be exiting the loop, and
511 // The comparison operator type determines how we compute the loop
609 /// number of times a loop iterates. The function takes the operands that
610 /// represent the loop start value, loop end value, and induction value.
612 CountValue *HexagonHardwareLoops::computeCount(MachineLoop *Loop,
643 // If loop executes while iv is "less" with the iv value going down, then
647 // If loop executes while iv is "greater" with the iv value going up, then
675 assert ((!CmpLess || Dist > 0) && "Loop should never iterate!");
677 assert ((!CmpGreater || Dist < 0) && "Loop should never iterate!");
701 MachineBasicBlock *PH = Loop->getLoopPreheader();
711 // If the loop IV is going downwards, i.e. if the bump is negative,
845 /// \brief Return true if the operation is invalid within hardware loop.
849 // call is not allowed because the callee may use a hardware loop
857 // check if the instruction defines a hardware loop register
871 /// \brief - Return true if the loop contains an instruction that inhibits
872 /// the use of the hardware loop function.
976 /// \brief Check if the loop is a candidate for converting to a hardware
977 /// loop. If so, then perform the transformation.
979 /// This function works on innermost loops first. A loop can be converted
980 /// if it is a counting loop; either a register value or an immediate.
982 /// The code makes several assumptions about the representation of the loop
986 assert(L->getHeader() && "Loop without a header?");
993 // If a nested loop has been converted, then we can't convert this loop.
1007 // Does the loop contain any invalid instructions?
1016 // Don't generate hw loop if the loop has more than one exit.
1024 // Ensure the loop has a preheader: the loop instruction will be
1037 // Are we able to determine the trip count for the loop?
1060 // Determine the loop start.
1065 // The loop start address is used only after the 1st iteration, and the
1066 // loop latch may contains instrs. that need to be executed after the
1074 // Convert the loop to a hardware loop.
1075 DEBUG(dbgs() << "Change to hardware loop at "; L->dump());
1081 // Create a copy of the loop count register.
1085 // Add the Loop instruction to the beginning of the loop.
1091 // Add the Loop immediate instruction to the beginning of the loop,
1106 // Make sure the loop start always has a reference in the CFG. We need
1114 // Replace the loop branch with an endloop instruction.
1119 // The loop ends with either:
1121 // - a conditional branch to the loop start.
1124 // Delete one and change/add an uncond. branch to out of the loop.
1134 // Conditional branch to loop start; just delete it.
1412 /// \brief Create a preheader for a given loop.
1452 // the loop latch. Any additional predecessors of the header should