• Home
  • Raw
  • Download

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