Lines Matching refs:Term

78   bool openIf(BranchInst *Term);
80 bool insertElse(BranchInst *Term);
84 BranchInst *Term);
86 bool handleLoop(BranchInst *Term);
205 bool SIAnnotateControlFlow::openIf(BranchInst *Term) { in openIf() argument
206 if (isUniform(Term)) in openIf()
209 Value *Ret = CallInst::Create(If, Term->getCondition(), "", Term); in openIf()
210 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term)); in openIf()
211 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term)); in openIf()
216 bool SIAnnotateControlFlow::insertElse(BranchInst *Term) { in insertElse() argument
217 if (isUniform(Term)) { in insertElse()
220 Value *Ret = CallInst::Create(Else, popSaved(), "", Term); in insertElse()
221 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term)); in insertElse()
222 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term)); in insertElse()
228 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) { in handleLoopCondition() argument
245 Term : L->getHeader()->getTerminator(); in handleLoopCondition()
261 bool SIAnnotateControlFlow::handleLoop(BranchInst *Term) { in handleLoop() argument
262 if (isUniform(Term)) in handleLoop()
265 BasicBlock *BB = Term->getParent(); in handleLoop()
270 BasicBlock *Target = Term->getSuccessor(1); in handleLoop()
273 Value *Cond = Term->getCondition(); in handleLoop()
274 Term->setCondition(BoolTrue); in handleLoop()
275 Value *Arg = handleLoopCondition(Cond, Broken, L, Term); in handleLoop()
289 Term->setCondition(CallInst::Create(Loop, Arg, "", Term)); in handleLoop()
291 push(Term->getSuccessor(0), Arg); in handleLoop()
348 BranchInst *Term = dyn_cast<BranchInst>(BB->getTerminator()); in runOnFunction() local
350 if (!Term || Term->isUnconditional()) { in runOnFunction()
357 if (I.nodeVisited(Term->getSuccessor(1))) { in runOnFunction()
361 if (DT->dominates(Term->getSuccessor(1), BB)) in runOnFunction()
362 Changed |= handleLoop(Term); in runOnFunction()
367 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
369 Changed |= insertElse(Term); in runOnFunction()
377 Changed |= openIf(Term); in runOnFunction()