Home | History | Annotate | Download | only in R600

Lines Matching full:term

82   void openIf(BranchInst *Term);
84 void insertElse(BranchInst *Term);
88 void handleLoop(BranchInst *Term);
196 void SIAnnotateControlFlow::openIf(BranchInst *Term) {
197 Value *Ret = CallInst::Create(If, Term->getCondition(), "", Term);
198 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term));
199 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term));
203 void SIAnnotateControlFlow::insertElse(BranchInst *Term) {
204 Value *Ret = CallInst::Create(Else, popSaved(), "", Term);
205 Term->setCondition(ExtractValueInst::Create(Ret, 0, "", Term));
206 push(Term->getSuccessor(1), ExtractValueInst::Create(Ret, 1, "", Term));
273 void SIAnnotateControlFlow::handleLoop(BranchInst *Term) {
274 BasicBlock *BB = Term->getParent();
276 BasicBlock *Target = Term->getSuccessor(1);
279 Value *Cond = Term->getCondition();
280 Term->setCondition(BoolTrue);
289 Term->setCondition(CallInst::Create(Loop, Arg, "", Term));
290 push(Term->getSuccessor(0), Arg);
323 BranchInst *Term = dyn_cast<BranchInst>((*I)->getTerminator());
325 if (!Term || Term->isUnconditional()) {
331 if (I.nodeVisited(Term->getSuccessor(1))) {
334 handleLoop(Term);
339 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition());
341 insertElse(Term);
347 openIf(Term);