Lines Matching defs:PHINode
236 using SwitchCaseResultsTy = SmallVector<std::pair<PHINode *, Constant *>, 4>;
341 return all_of(BB->phis(), [IncomingBlocks, EquivalenceSet](PHINode &PN) {
391 for (PHINode &PN : Succ->phis())
1155 auto *PN = dyn_cast<PHINode>(UI);
1438 for (const PHINode &PN : Succ->phis()) {
1712 PHINode *PN = nullptr;
1716 if ((PN = dyn_cast<PHINode>(U))) {
1877 if (isa<PHINode>(*SuccItr))
2095 for (PHINode &PN : Succ->phis()) {
2146 for (PHINode &PN : Succ->phis()) {
2227 if (isa<PHINode>(I) || I->isEHPad() || isa<AllocaInst>(I) ||
2383 PHINode::Create(Op->getType(), Insts.size(), Op->getName() + ".sink");
2423 auto *PN = cast<PHINode>(U);
2505 for (PHINode &PN : BB->phis()) {
2926 PHINode *PN = PHINode::Create(
3152 for (PHINode &PN : EndBB->phis()) {
3472 for (PHINode &PN : EndBB->phis()) {
3523 if (!EphTracker.track(&I) && !isa<PHINode>(I)) {
3532 if (UI->getParent() != BB || isa<PHINode>(UI))
3570 PHINode *PN = dyn_cast<PHINode>(Cond);
3643 if (PHINode *PN = dyn_cast<PHINode>(BBI)) {
3737 static bool foldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI,
3795 if (auto *IfCondPhiInst = dyn_cast<PHINode>(IfCond))
3805 for (BasicBlock::iterator I = BB->begin(); isa<PHINode>(I); ++NumPhis, ++I)
3820 for (BasicBlock::iterator II = BB->begin(); isa<PHINode>(II);) {
3821 PHINode *PN = cast<PHINode>(II++);
3838 PN = dyn_cast<PHINode>(BB->begin());
3899 while (PHINode *PN = dyn_cast<PHINode>(BB->begin())) {
4236 if (auto *PN = dyn_cast<PHINode>(UI))
4293 PHINode *PHI = nullptr;
4296 for (auto I = Succ->begin(); isa<PHINode>(I); ++I)
4297 if (cast<PHINode>(I)->getIncomingValueForBlock(BB) == V) {
4298 PHI = cast<PHINode>(I);
4317 PHI = PHINode::Create(V->getType(), 2, "simplifycfg.merge");
4733 for (BasicBlock::iterator II = CommonDest->begin(); isa<PHINode>(II);
4827 for (PHINode &PN : CommonDest->phis()) {
5029 if (isa<PHINode>(BB->begin()) || !ICI->hasOneUse())
5081 PHINode *PHIUse = dyn_cast<PHINode>(ICI->user_back());
5083 isa<PHINode>(++BasicBlock::iterator(PHIUse)))
5246 for (BasicBlock::iterator BBI = EdgeBB->begin(); isa<PHINode>(BBI); ++BBI) {
5247 PHINode *PN = cast<PHINode>(BBI);
5263 if (isa<PHINode>(RI->getValue()))
5305 auto *PhiLPInst = cast<PHINode>(RI->getValue());
5424 for (PHINode &DestPN : UnwindDest->phis()) {
5430 // value is in the cleanup pad, it must be a PHINode (because we
5440 PHINode *SrcPN = dyn_cast<PHINode>(SrcVal);
5452 for (PHINode &PN : make_early_inc_range(BB->phis())) {
5869 for (auto BBI = ContiguousDest->begin(); isa<PHINode>(BBI); ++BBI) {
5874 cast<PHINode>(BBI)->removeIncomingValue(SI->getParent());
5876 for (auto BBI = OtherDest->begin(); isa<PHINode>(BBI); ++BBI) {
5881 cast<PHINode>(BBI)->removeIncomingValue(SI->getParent());
6004 static PHINode *findPHIForConditionForwarding(ConstantInt *CaseValue,
6017 for (PHINode &PHI : Succ->phis()) {
6036 using ForwardingNodesMap = DenseMap<PHINode *, SmallVector<int, 4>>;
6056 for (PHINode &Phi : CaseDest->phis()) {
6077 PHINode *Phi = ForwardingNode.first;
6164 SmallVectorImpl<std::pair<PHINode *, Constant *>> &Res,
6191 if (PHINode *Phi = dyn_cast<PHINode>(User))
6211 for (PHINode &PHI : (*CommonDest)->phis()) {
6251 static bool initializeUniqueCases(SwitchInst *SI, PHINode *&PHI,
6290 SmallVector<std::pair<PHINode *, Constant *>, 1> DefaultResults;
6384 static void removeSwitchAfterSelectFold(SwitchInst *SI, PHINode *PHI,
6425 PHINode *PHI = nullptr;
6774 const SmallDenseMap<PHINode *, Type *> &ResultTypes) {
6811 bool HasDefaultResults, const SmallDenseMap<PHINode *, Type *> &ResultTypes,
6946 SmallDenseMap<PHINode *, ResultListTy> ResultLists;
6948 SmallDenseMap<PHINode *, Constant *> DefaultResults;
6949 SmallDenseMap<PHINode *, Type *> ResultTypes;
6950 SmallVector<PHINode *, 4> PHIs;
6960 using ResultsTy = SmallVector<std::pair<PHINode *, Constant *>, 4>;
6968 PHINode *PHI = I.first;
6977 for (PHINode *PHI : PHIs) {
6985 SmallVector<std::pair<PHINode *, Constant *>, 4> DefaultResultsList;
6991 PHINode *PHI = I.first;
7165 for (PHINode *PHI : PHIs) {
7494 /// PHINode::getIncomingValueForBlock is O(|Preds|), so we'd like to avoid
7497 /// times. To do this, we can precompute a map of PHINode -> Pred BasicBlock ->
7502 DenseMap<PHINode *, SmallDenseMap<BasicBlock *, Value *, 8>> *PhiPredIVs;
7534 for (PHINode &Phi : BB->phis())
7566 for (PHINode &Phi : Succ->phis()) {
7584 SmallPtrSet<PHINode *, 8> Phis;
7586 DenseMap<PHINode *, SmallDenseMap<BasicBlock *, Value *, 8>> PhiPredIVs;
7615 for (PHINode &Phi : Succ->phis())
7627 for (PHINode *Phi : Phis) {
7811 if (isa<PHINode>(*Succ->begin()))
7969 !isa<PHINode>(Succ1->front()) && !isa<PHINode>(Succ2->front());
8312 for (PHINode &PHI : BB->phis())
8421 if (auto *PN = dyn_cast<PHINode>(BB->begin()))