Lines Matching refs:Invokes

2614   static bool shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes);
2639 bool CompatibleSets::shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes) { in shouldBelongToSameSet() argument
2640 assert(Invokes.size() == 2 && "Always called with exactly two candidates."); in shouldBelongToSameSet()
2646 if (any_of(Invokes, IsIllegalToMerge)) in shouldBelongToSameSet()
2652 bool HaveIndirectCalls = any_of(Invokes, IsIndirectCall); in shouldBelongToSameSet()
2653 bool AllCallsAreIndirect = all_of(Invokes, IsIndirectCall); in shouldBelongToSameSet()
2660 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2675 if (any_of(Invokes, HasNormalDest)) { in shouldBelongToSameSet()
2678 if (!all_of(Invokes, HasNormalDest)) in shouldBelongToSameSet()
2683 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2694 SmallPtrSet<Value *, 16> EquivalenceSet(llvm::from_range, Invokes); in shouldBelongToSameSet()
2696 NormalBB, {Invokes[0]->getParent(), Invokes[1]->getParent()}, in shouldBelongToSameSet()
2705 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2718 Invokes.front()->getUnwindDest(), in shouldBelongToSameSet()
2719 {Invokes[0]->getParent(), Invokes[1]->getParent()})) in shouldBelongToSameSet()
2724 const InvokeInst *II0 = Invokes.front(); in shouldBelongToSameSet()
2725 for (auto *II : Invokes.drop_front()) in shouldBelongToSameSet()
2739 assert(Invokes.size() == 2 && "Always called with exactly two candidates."); in shouldBelongToSameSet()
2740 if (any_of(zip(Invokes[0]->data_ops(), Invokes[1]->data_ops()), in shouldBelongToSameSet()
2751 static void mergeCompatibleInvokesImpl(ArrayRef<InvokeInst *> Invokes, in mergeCompatibleInvokesImpl() argument
2753 assert(Invokes.size() >= 2 && "Must have at least two invokes to merge."); in mergeCompatibleInvokesImpl()
2757 Updates.reserve(2 + 3 * Invokes.size()); in mergeCompatibleInvokesImpl()
2760 !isa<UnreachableInst>(Invokes[0]->getNormalDest()->getFirstNonPHIOrDbg()); in mergeCompatibleInvokesImpl()
2764 InvokeInst *MergedInvoke = [&Invokes, HasNormalDest]() { in mergeCompatibleInvokesImpl()
2765 InvokeInst *II0 = Invokes.front(); in mergeCompatibleInvokesImpl()
2797 for (InvokeInst *II : Invokes) in mergeCompatibleInvokesImpl()
2809 for (InvokeInst *II : Invokes) in mergeCompatibleInvokesImpl()
2815 bool IsIndirectCall = Invokes[0]->isIndirectCall(); in mergeCompatibleInvokesImpl()
2827 bool NeedPHI = any_of(Invokes, [&U](InvokeInst *II) { in mergeCompatibleInvokesImpl()
2835 U->getType(), /*NumReservedValues=*/Invokes.size(), "", MergedInvoke->getIterator()); in mergeCompatibleInvokesImpl()
2836 for (InvokeInst *II : Invokes) in mergeCompatibleInvokesImpl()
2847 /*ExistPred=*/Invokes.front()->getParent()); in mergeCompatibleInvokesImpl()
2853 for (InvokeInst *II : Invokes) { in mergeCompatibleInvokesImpl()
2923 for (ArrayRef<InvokeInst *> Invokes : Grouper.Sets) { in mergeCompatibleInvokes()
2924 if (Invokes.size() < 2) in mergeCompatibleInvokes()
2927 mergeCompatibleInvokesImpl(Invokes, DTU); in mergeCompatibleInvokes()