Lines Matching defs:Invokes
2707 static bool shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes);
2732 bool CompatibleSets::shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes) {
2733 assert(Invokes.size() == 2 && "Always called with exactly two candidates.");
2739 if (any_of(Invokes, IsIllegalToMerge))
2745 bool HaveIndirectCalls = any_of(Invokes, IsIndirectCall);
2746 bool AllCallsAreIndirect = all_of(Invokes, IsIndirectCall);
2753 for (InvokeInst *II : Invokes) {
2768 if (any_of(Invokes, HasNormalDest)) {
2771 if (!all_of(Invokes, HasNormalDest))
2776 for (InvokeInst *II : Invokes) {
2787 SmallPtrSet<Value *, 16> EquivalenceSet(Invokes.begin(), Invokes.end());
2789 NormalBB, {Invokes[0]->getParent(), Invokes[1]->getParent()},
2798 for (InvokeInst *II : Invokes) {
2811 Invokes.front()->getUnwindDest(),
2812 {Invokes[0]->getParent(), Invokes[1]->getParent()}))
2817 const InvokeInst *II0 = Invokes.front();
2818 for (auto *II : Invokes.drop_front())
2832 assert(Invokes.size() == 2 && "Always called with exactly two candidates.");
2833 if (any_of(zip(Invokes[0]->data_ops(), Invokes[1]->data_ops()),
2844 static void mergeCompatibleInvokesImpl(ArrayRef<InvokeInst *> Invokes,
2846 assert(Invokes.size() >= 2 && "Must have at least two invokes to merge.");
2850 Updates.reserve(2 + 3 * Invokes.size());
2853 !isa<UnreachableInst>(Invokes[0]->getNormalDest()->getFirstNonPHIOrDbg());
2857 InvokeInst *MergedInvoke = [&Invokes, HasNormalDest]() {
2858 InvokeInst *II0 = Invokes.front();
2889 for (InvokeInst *II : Invokes)
2901 for (InvokeInst *II : Invokes)
2907 bool IsIndirectCall = Invokes[0]->isIndirectCall();
2919 bool NeedPHI = any_of(Invokes, [&U](InvokeInst *II) {
2927 U->getType(), /*NumReservedValues=*/Invokes.size(), "", MergedInvoke->getIterator());
2928 for (InvokeInst *II : Invokes)
2939 /*ExistPred=*/Invokes.front()->getParent());
2945 for (InvokeInst *II : Invokes) {
3015 for (ArrayRef<InvokeInst *> Invokes : Grouper.Sets) {
3016 if (Invokes.size() < 2)
3019 mergeCompatibleInvokesImpl(Invokes, DTU);