Lines Matching refs:Term

78   void openIf(BranchInst *Term);
80 void insertElse(BranchInst *Term);
84 BranchInst *Term);
86 void handleLoop(BranchInst *Term);
204 void SIAnnotateControlFlow::openIf(BranchInst *Term) { in openIf() argument
205 if (isUniform(Term)) in openIf()
208 Value *Ret = CallInst::Create(If, Term->getCondition(), "", Term); in openIf()
209 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term)); in openIf()
210 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term)); in openIf()
214 void SIAnnotateControlFlow::insertElse(BranchInst *Term) { in insertElse() argument
215 if (isUniform(Term)) { in insertElse()
218 Value *Ret = CallInst::Create(Else, popSaved(), "", Term); in insertElse()
219 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term)); in insertElse()
220 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term)); in insertElse()
225 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) { in handleLoopCondition() argument
242 Term : L->getHeader()->getTerminator(); in handleLoopCondition()
252 void SIAnnotateControlFlow::handleLoop(BranchInst *Term) { in handleLoop() argument
253 if (isUniform(Term)) in handleLoop()
256 BasicBlock *BB = Term->getParent(); in handleLoop()
261 BasicBlock *Target = Term->getSuccessor(1); in handleLoop()
264 Value *Cond = Term->getCondition(); in handleLoop()
265 Term->setCondition(BoolTrue); in handleLoop()
266 Value *Arg = handleLoopCondition(Cond, Broken, L, Term); in handleLoop()
280 Term->setCondition(CallInst::Create(Loop, Arg, "", Term)); in handleLoop()
282 push(Term->getSuccessor(0), Arg); in handleLoop()
334 BranchInst *Term = dyn_cast<BranchInst>(BB->getTerminator()); in runOnFunction() local
336 if (!Term || Term->isUnconditional()) { in runOnFunction()
343 if (I.nodeVisited(Term->getSuccessor(1))) { in runOnFunction()
347 if (DT->dominates(Term->getSuccessor(1), BB)) in runOnFunction()
348 handleLoop(Term); in runOnFunction()
353 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
355 insertElse(Term); in runOnFunction()
363 openIf(Term); in runOnFunction()