Home | History | Annotate | Download | only in R600

Lines Matching defs:Phi

78   bool isElse(PHINode *Phi);
80 void eraseIfUnused(PHINode *Phi);
170 /// \brief Can the condition represented by this PHI node treated like
172 bool SIAnnotateControlFlow::isElse(PHINode *Phi) {
173 BasicBlock *IDom = DT->getNode(Phi->getParent())->getIDom()->getBlock();
174 for (unsigned i = 0, e = Phi->getNumIncomingValues(); i != e; ++i) {
175 if (Phi->getIncomingBlock(i) == IDom) {
177 if (Phi->getIncomingValue(i) != BoolTrue)
181 if (Phi->getIncomingValue(i) != BoolFalse)
189 // \brief Erase "Phi" if it is not used any more
190 void SIAnnotateControlFlow::eraseIfUnused(PHINode *Phi) {
191 if (!Phi->hasNUsesOrMore(1))
192 Phi->eraseFromParent();
212 if (PHINode *Phi = dyn_cast<PHINode>(Cond)) {
213 BasicBlock *Parent = Phi->getParent();
218 for (unsigned i = 0, e = Phi->getNumIncomingValues(); i != e; ++i) {
219 Value *Incoming = Phi->getIncomingValue(i);
220 BasicBlock *From = Phi->getIncomingBlock(i);
226 Phi->setIncomingValue(i, BoolFalse);
233 for (unsigned i = 0, e = Phi->getNumIncomingValues(); i != e; ++i) {
235 Value *Incoming = Phi->getIncomingValue(i);
239 BasicBlock *From = Phi->getIncomingBlock(i);
252 eraseIfUnused(Phi);
339 PHINode *Phi = dyn_cast<PHINode>(Term->getCondition());
340 if (Phi && Phi->getParent() == *I && isElse(Phi)) {
342 eraseIfUnused(Phi);