Lines Matching refs:Invokes

2247   static bool shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes);
2272 bool CompatibleSets::shouldBelongToSameSet(ArrayRef<InvokeInst *> Invokes) { in shouldBelongToSameSet() argument
2273 assert(Invokes.size() == 2 && "Always called with exactly two candidates."); in shouldBelongToSameSet()
2279 if (any_of(Invokes, IsIllegalToMerge)) in shouldBelongToSameSet()
2285 bool HaveIndirectCalls = any_of(Invokes, IsIndirectCall); in shouldBelongToSameSet()
2286 bool AllCallsAreIndirect = all_of(Invokes, IsIndirectCall); in shouldBelongToSameSet()
2293 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2308 if (any_of(Invokes, HasNormalDest)) { in shouldBelongToSameSet()
2311 if (!all_of(Invokes, HasNormalDest)) in shouldBelongToSameSet()
2316 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2327 SmallPtrSet<Value *, 16> EquivalenceSet(Invokes.begin(), Invokes.end()); in shouldBelongToSameSet()
2329 NormalBB, {Invokes[0]->getParent(), Invokes[1]->getParent()}, in shouldBelongToSameSet()
2338 for (InvokeInst *II : Invokes) { in shouldBelongToSameSet()
2351 Invokes.front()->getUnwindDest(), in shouldBelongToSameSet()
2352 {Invokes[0]->getParent(), Invokes[1]->getParent()})) in shouldBelongToSameSet()
2357 const InvokeInst *II0 = Invokes.front(); in shouldBelongToSameSet()
2358 for (auto *II : Invokes.drop_front()) in shouldBelongToSameSet()
2368 assert(Invokes.size() == 2 && "Always called with exactly two candidates."); in shouldBelongToSameSet()
2369 if (any_of(zip(Invokes[0]->data_ops(), Invokes[1]->data_ops()), in shouldBelongToSameSet()
2380 static void MergeCompatibleInvokesImpl(ArrayRef<InvokeInst *> Invokes, in MergeCompatibleInvokesImpl() argument
2382 assert(Invokes.size() >= 2 && "Must have at least two invokes to merge."); in MergeCompatibleInvokesImpl()
2386 Updates.reserve(2 + 3 * Invokes.size()); in MergeCompatibleInvokesImpl()
2389 !isa<UnreachableInst>(Invokes[0]->getNormalDest()->getFirstNonPHIOrDbg()); in MergeCompatibleInvokesImpl()
2393 InvokeInst *MergedInvoke = [&Invokes, HasNormalDest]() { in MergeCompatibleInvokesImpl()
2394 InvokeInst *II0 = Invokes.front(); in MergeCompatibleInvokesImpl()
2425 for (InvokeInst *II : Invokes) in MergeCompatibleInvokesImpl()
2437 for (InvokeInst *II : Invokes) in MergeCompatibleInvokesImpl()
2443 bool IsIndirectCall = Invokes[0]->isIndirectCall(); in MergeCompatibleInvokesImpl()
2455 bool NeedPHI = any_of(Invokes, [&U](InvokeInst *II) { in MergeCompatibleInvokesImpl()
2463 U->getType(), /*NumReservedValues=*/Invokes.size(), "", MergedInvoke); in MergeCompatibleInvokesImpl()
2464 for (InvokeInst *II : Invokes) in MergeCompatibleInvokesImpl()
2475 /*ExistPred=*/Invokes.front()->getParent()); in MergeCompatibleInvokesImpl()
2481 for (InvokeInst *II : Invokes) { in MergeCompatibleInvokesImpl()
2544 for (ArrayRef<InvokeInst *> Invokes : Grouper.Sets) { in MergeCompatibleInvokes()
2545 if (Invokes.size() < 2) in MergeCompatibleInvokes()
2548 MergeCompatibleInvokesImpl(Invokes, DTU); in MergeCompatibleInvokes()