Lines Matching defs:Term

94   void openIf(BranchInst *Term);
96 void insertElse(BranchInst *Term);
100 BranchInst *Term);
102 void handleLoop(BranchInst *Term);
210 void SIAnnotateControlFlow::openIf(BranchInst *Term) {
211 if (isUniform(Term))
214 Value *Ret = CallInst::Create(If, Term->getCondition(), "", Term);
215 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term));
216 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term));
220 void SIAnnotateControlFlow::insertElse(BranchInst *Term) {
221 if (isUniform(Term)) {
224 Value *Ret = CallInst::Create(Else, popSaved(), "", Term);
225 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term));
226 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term));
231 Value *Cond, PHINode *Broken, llvm::Loop *L, BranchInst *Term) {
248 Term : L->getHeader()->getTerminator();
258 void SIAnnotateControlFlow::handleLoop(BranchInst *Term) {
259 if (isUniform(Term))
262 BasicBlock *BB = Term->getParent();
267 BasicBlock *Target = Term->getSuccessor(1);
270 Value *Cond = Term->getCondition();
271 Term->setCondition(BoolTrue);
272 Value *Arg = handleLoopCondition(Cond, Broken, L, Term);
286 Term->setCondition(CallInst::Create(Loop, Arg, "", Term));
288 push(Term->getSuccessor(0), Arg);
334 BranchInst *Term = dyn_cast<BranchInst>(BB->getTerminator());
336 if (!Term || Term->isUnconditional()) {
343 if (I.nodeVisited(Term->getSuccessor(1))) {
347 handleLoop(Term);
352 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition());
354 insertElse(Term);
362 openIf(Term);