• Home
  • Raw
  • Download

Lines Matching refs:Term

82   void openIf(BranchInst *Term);
84 void insertElse(BranchInst *Term);
88 void handleLoop(BranchInst *Term);
196 void SIAnnotateControlFlow::openIf(BranchInst *Term) { in openIf() argument
197 Value *Ret = CallInst::Create(If, Term->getCondition(), "", Term); in openIf()
198 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term)); in openIf()
199 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term)); in openIf()
203 void SIAnnotateControlFlow::insertElse(BranchInst *Term) { in insertElse() argument
204 Value *Ret = CallInst::Create(Else, popSaved(), "", Term); in insertElse()
205 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term)); in insertElse()
206 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term)); in insertElse()
281 void SIAnnotateControlFlow::handleLoop(BranchInst *Term) { in handleLoop() argument
282 BasicBlock *BB = Term->getParent(); in handleLoop()
284 BasicBlock *Target = Term->getSuccessor(1); in handleLoop()
287 Value *Cond = Term->getCondition(); in handleLoop()
288 Term->setCondition(BoolTrue); in handleLoop()
297 Term->setCondition(CallInst::Create(Loop, Arg, "", Term)); in handleLoop()
298 push(Term->getSuccessor(0), Arg); in handleLoop()
330 BranchInst *Term = dyn_cast<BranchInst>((*I)->getTerminator()); in runOnFunction() local
332 if (!Term || Term->isUnconditional()) { in runOnFunction()
338 if (I.nodeVisited(Term->getSuccessor(1))) { in runOnFunction()
341 handleLoop(Term); in runOnFunction()
346 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition()); in runOnFunction()
348 insertElse(Term); in runOnFunction()
354 openIf(Term); in runOnFunction()