Lines Matching refs:PHI
14 // analysis reports the PHI in join block of divergent branch as uniform if
16 // value. That is to say the later compiler pipeline will ensure such PHI always
41 // in this pass. So the scalar register allocated for such PHI will get correct
80 return "AMDGPU Rewrite Undef for PHI";
96 "Rewrite undef for PHI", false, false)
100 "Rewrite undef for PHI", false, false)
106 for (auto &PHI : BB.phis()) {
107 if (UA.isDivergent(&PHI))
110 // The unique incoming value except undef/poison for the PHI node.
118 for (unsigned i = 0; i < PHI.getNumIncomingValues(); i++) {
119 Value *Incoming = PHI.getIncomingValue(i);
120 BasicBlock *IncomingBB = PHI.getIncomingBlock(i);
122 if (Incoming == &PHI)
144 // We only need to replace the undef for the PHI which is merging
159 PHI.replaceAllUsesWith(UniqueDefinedIncoming);
160 ToBeDeleted.push_back(&PHI);
166 for (auto *PHI : ToBeDeleted)
167 PHI->eraseFromParent();