llvm::getExtDivCycle

Return the outermost cycle made divergent by branch outside it.

Synopsis

Declared in <llvm/ADT/GenericUniformityImpl.h>

template<
    typename CycleInfoT,
    typename BlockT>
CycleRef
getExtDivCycle(
    CycleInfoT const& CI,
    CycleRef Cycle,
    BlockT const* DivTermBlock,
    BlockT const* JoinBlock);

Description

If two paths that diverged outside an irreducible cycle join inside that cycle, then that whole cycle is assumed to be divergent. This does not apply if the cycle is reducible.

Return Value

Outermost irreducible cycle made divergent by an external branch, or null if none.

Parameters

NameDescription
CICycle information for the function.
CycleCycle containing JoinBlock to expand from.
DivTermBlockBlock of the divergent terminator outside the cycle.
JoinBlockBlock where diverged paths join inside the cycle.