Lines Matching full:ctr

1 //===-- PPCCTRLoops.cpp - Generate CTR loops ------------------------------===//
9 // This pass generates machine instructions for the CTR loops related pseudos:
13 // If a CTR loop can be generated:
18 // If a CTR loop can not be generated due to clobber of CTR:
24 // register allocator to allocate register for DecreaseCTRloop if a CTR can be
25 // generated or if a CTR loop can not be generated, we don't have any condition
54 STATISTIC(NumCTRLoops, "Number of CTR loops generated");
87 INITIALIZE_PASS_BEGIN(PPCCTRLoops, DEBUG_TYPE, "PowerPC CTR loops generation",
90 INITIALIZE_PASS_END(PPCCTRLoops, DEBUG_TYPE, "PowerPC CTR loops generation", in INITIALIZE_PASS_DEPENDENCY()
112 "CTR loop pseudo is not expanded!"); in runOnMachineFunction()
123 // CTR defination inside the callee of a call instruction will not impact in isCTRClobber()
126 return MI->definesRegister(PPC::CTR, /*TRI=*/nullptr) || in isCTRClobber()
130 if (MI->modifiesRegister(PPC::CTR, /*TRI=*/nullptr) || in isCTRClobber()
137 // We define the CTR in the loop preheader, so if there is any CTR reader in in isCTRClobber()
138 // the loop, we also can not use CTR loop form. in isCTRClobber()
139 if (MI->readsRegister(PPC::CTR, /*TRI=*/nullptr) || in isCTRClobber()
183 // This is not a CTR loop candidate. in processLoop()
187 // If CTR is live to the preheader, we can not redefine the CTR register. in processLoop()
188 if (Preheader->isLiveIn(PPC::CTR) || Preheader->isLiveIn(PPC::CTR8)) in processLoop()
191 // Make sure there is also no CTR clobber in the block preheader between the in processLoop()
196 // Only check the definitions of CTR. If there is non-dead definition for in processLoop()
197 // the CTR, we conservatively don't generate a CTR loop. in processLoop()
203 // Make sure there is also no CTR clobber/user in the block preheader between in processLoop()
212 // Find the CTR loop components and decide whether or not to fall back to a in processLoop()
220 // If any instruction clobber CTR, then we can not generate a CTR loop. in processLoop()
227 assert(Dec && "CTR loop is not complete!"); in processLoop()
248 "Preheader and exiting should exist for CTR loop!"); in expandNormalLoops()
297 "CTR loop should not be generated for irreducible loop!"); in expandNormalLoops()
327 "Preheader and exiting should exist for CTR loop!"); in expandCTRLoops()
343 "Invalid ctr loop!"); in expandCTRLoops()
348 "Invalid ctr loop!"); in expandCTRLoops()