llvm::insertIfNotContained

Add Candidate to Cycles if it is not already contained in Cycles.

Synopsis

Declared in <llvm/ADT/GenericUniformityImpl.h>

template<typename CycleInfoT>
bool
insertIfNotContained(
    CycleInfoT const& CI,
    SmallVector<CycleRef>& Cycles,
    CycleRef Candidate);

Return Value

true iff Candidate was added to Cycles.

Parameters

NameDescription
CyclesForward declaration of SmallVector so that calculateSmallVectorDefaultInlinedElements can reference sizeof(SmallVector<T, 0>).
CandidateOpaque handle to a cycle within a GenericCycleInfo that wraps the cycle's preorder index. Handles remain valid as long as the cycle forest is not recomputed; addBlockToCycle() adds a block but never adds, removes, or reorders cycles, so it leaves every handle valid.