Lines Matching refs:Invokes
2426 static bool shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes);
2451 bool CompatibleSets::shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes) { in shouldBelongToSameSet() argument
2452 assert(Invokes.size() == 2 && "Always called with exactly two candidates."); in shouldBelongToSameSet()
2458 if (any_of(Invokes, IsIllegalToMerge)) in shouldBelongToSameSet()
2464 bool HaveIndirectCalls = any_of(Invokes, IsIndirectCall); in shouldBelongToSameSet()
2465 bool AllCallsAreIndirect = all_of(Invokes, IsIndirectCall); in shouldBelongToSameSet()
2472 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2487 if (any_of(Invokes, HasNormalDest)) { in shouldBelongToSameSet()
2490 if (!all_of(Invokes, HasNormalDest)) in shouldBelongToSameSet()
2495 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2506 SmallPtrSet<Value *, 16> EquivalenceSet(Invokes.begin(), Invokes.end()); in shouldBelongToSameSet()
2508 NormalBB, {Invokes[0]->getParent(), Invokes[1]->getParent()}, in shouldBelongToSameSet()
2517 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2530 Invokes.front()->getUnwindDest(), in shouldBelongToSameSet()
2531 {Invokes[0]->getParent(), Invokes[1]->getParent()})) in shouldBelongToSameSet()
2536 const InvokeInst *II0 = Invokes.front(); in shouldBelongToSameSet()
2537 for (auto *II : Invokes.drop_front()) in shouldBelongToSameSet()
2551 assert(Invokes.size() == 2 && "Always called with exactly two candidates."); in shouldBelongToSameSet()
2552 if (any_of(zip(Invokes[0]->data_ops(), Invokes[1]->data_ops()), in shouldBelongToSameSet()
2563 static void MergeCompatibleInvokesImpl(ArrayRef<InvokeInst *> Invokes, in MergeCompatibleInvokesImpl() argument
2565 assert(Invokes.size() >= 2 && "Must have at least two invokes to merge."); in MergeCompatibleInvokesImpl()
2569 Updates.reserve(2 + 3 * Invokes.size()); in MergeCompatibleInvokesImpl()
2572 !isa<UnreachableInst>(Invokes[0]->getNormalDest()->getFirstNonPHIOrDbg()); in MergeCompatibleInvokesImpl()
2576 InvokeInst *MergedInvoke = [&Invokes, HasNormalDest]() { in MergeCompatibleInvokesImpl()
2577 InvokeInst *II0 = Invokes.front(); in MergeCompatibleInvokesImpl()
2608 for (InvokeInst *II : Invokes) in MergeCompatibleInvokesImpl()
2620 for (InvokeInst *II : Invokes) in MergeCompatibleInvokesImpl()
2626 bool IsIndirectCall = Invokes[0]->isIndirectCall(); in MergeCompatibleInvokesImpl()
2638 bool NeedPHI = any_of(Invokes, [&U](InvokeInst *II) { in MergeCompatibleInvokesImpl()
2646 U->getType(), /*NumReservedValues=*/Invokes.size(), "", MergedInvoke); in MergeCompatibleInvokesImpl()
2647 for (InvokeInst *II : Invokes) in MergeCompatibleInvokesImpl()
2658 /*ExistPred=*/Invokes.front()->getParent()); in MergeCompatibleInvokesImpl()
2664 for (InvokeInst *II : Invokes) { in MergeCompatibleInvokesImpl()
2727 for (ArrayRef<InvokeInst *> Invokes : Grouper.Sets) { in MergeCompatibleInvokes()
2728 if (Invokes.size() < 2) in MergeCompatibleInvokes()
2731 MergeCompatibleInvokesImpl(Invokes, DTU); in MergeCompatibleInvokes()