Home | History | Annotate | Download | only in AMDGPU

Lines Matching refs:Term

84   void openIf(BranchInst *Term);
86 void insertElse(BranchInst *Term);
89 llvm::Loop *L, BranchInst *Term);
91 void handleLoop(BranchInst *Term);
215 void SIAnnotateControlFlow::openIf(BranchInst *Term) {
216 if (isUniform(Term)) {
219 Value *Ret = CallInst::Create(If, Term->getCondition(), "", Term);
220 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term));
221 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term));
225 void SIAnnotateControlFlow::insertElse(BranchInst *Term) {
226 if (isUniform(Term)) {
229 Value *Ret = CallInst::Create(Else, popSaved(), "", Term);
230 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term));
231 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term));
236 llvm::Loop *L, BranchInst *Term) {
260 Value *PhiArg = handleLoopCondition(Incoming, Broken, L, Term);
315 // Insert IfBreak before TERM for constant COND.
318 return CallInst::Create(IfBreak, Args, "", Term);
327 void SIAnnotateControlFlow::handleLoop(BranchInst *Term) {
328 if (isUniform(Term)) {
332 BasicBlock *BB = Term->getParent();
334 BasicBlock *Target = Term->getSuccessor(1);
337 Value *Cond = Term->getCondition();
338 Term->setCondition(BoolTrue);
339 Value *Arg = handleLoopCondition(Cond, Broken, L, Term);
347 Term->setCondition(CallInst::Create(Loop, Arg, "", Term));
348 push(Term->getSuccessor(0), Arg);
386 BranchInst *Term = dyn_cast<BranchInst>((*I)->getTerminator());
388 if (!Term || Term->isUnconditional()) {
395 if (I.nodeVisited(Term->getSuccessor(1))) {
399 handleLoop(Term);
404 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition());
406 insertElse(Term);
412 openIf(Term);