Lines Matching refs:Invokes

2484   static bool shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes);
2509 bool CompatibleSets::shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes) { in shouldBelongToSameSet() argument
2510 assert(Invokes.size() == 2 && "Always called with exactly two candidates."); in shouldBelongToSameSet()
2516 if (any_of(Invokes, IsIllegalToMerge)) in shouldBelongToSameSet()
2522 bool HaveIndirectCalls = any_of(Invokes, IsIndirectCall); in shouldBelongToSameSet()
2523 bool AllCallsAreIndirect = all_of(Invokes, IsIndirectCall); in shouldBelongToSameSet()
2530 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2545 if (any_of(Invokes, HasNormalDest)) { in shouldBelongToSameSet()
2548 if (!all_of(Invokes, HasNormalDest)) in shouldBelongToSameSet()
2553 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2564 SmallPtrSet<Value *, 16> EquivalenceSet(Invokes.begin(), Invokes.end()); in shouldBelongToSameSet()
2566 NormalBB, {Invokes[0]->getParent(), Invokes[1]->getParent()}, in shouldBelongToSameSet()
2575 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2588 Invokes.front()->getUnwindDest(), in shouldBelongToSameSet()
2589 {Invokes[0]->getParent(), Invokes[1]->getParent()})) in shouldBelongToSameSet()
2594 const InvokeInst *II0 = Invokes.front(); in shouldBelongToSameSet()
2595 for (auto *II : Invokes.drop_front()) in shouldBelongToSameSet()
2609 assert(Invokes.size() == 2 && "Always called with exactly two candidates."); in shouldBelongToSameSet()
2610 if (any_of(zip(Invokes[0]->data_ops(), Invokes[1]->data_ops()), in shouldBelongToSameSet()
2621 static void MergeCompatibleInvokesImpl(ArrayRef<InvokeInst *> Invokes, in MergeCompatibleInvokesImpl() argument
2623 assert(Invokes.size() >= 2 && "Must have at least two invokes to merge."); in MergeCompatibleInvokesImpl()
2627 Updates.reserve(2 + 3 * Invokes.size()); in MergeCompatibleInvokesImpl()
2630 !isa<UnreachableInst>(Invokes[0]->getNormalDest()->getFirstNonPHIOrDbg()); in MergeCompatibleInvokesImpl()
2634 InvokeInst *MergedInvoke = [&Invokes, HasNormalDest]() { in MergeCompatibleInvokesImpl()
2635 InvokeInst *II0 = Invokes.front(); in MergeCompatibleInvokesImpl()
2666 for (InvokeInst *II : Invokes) in MergeCompatibleInvokesImpl()
2678 for (InvokeInst *II : Invokes) in MergeCompatibleInvokesImpl()
2684 bool IsIndirectCall = Invokes[0]->isIndirectCall(); in MergeCompatibleInvokesImpl()
2696 bool NeedPHI = any_of(Invokes, [&U](InvokeInst *II) { in MergeCompatibleInvokesImpl()
2704 U->getType(), /*NumReservedValues=*/Invokes.size(), "", MergedInvoke->getIterator()); in MergeCompatibleInvokesImpl()
2705 for (InvokeInst *II : Invokes) in MergeCompatibleInvokesImpl()
2716 /*ExistPred=*/Invokes.front()->getParent()); in MergeCompatibleInvokesImpl()
2722 for (InvokeInst *II : Invokes) { in MergeCompatibleInvokesImpl()
2785 for (ArrayRef<InvokeInst *> Invokes : Grouper.Sets) { in MergeCompatibleInvokes()
2786 if (Invokes.size() < 2) in MergeCompatibleInvokes()
2789 MergeCompatibleInvokesImpl(Invokes, DTU); in MergeCompatibleInvokes()