ΒΆbool isPotentiallyReachable(
    llvm::Attributor& A,
    const llvm::Instruction& FromI,
    const llvm::Instruction& ToI,
    const llvm::AbstractAttribute& QueryingAA,
    std::function<bool(const Function&)>
        GoBackwardsCB = nullptr)

Description

Return true if \p ToI is potentially reachable from \p FromI. The two instructions do not need to be in the same function. \p GoBackwardsCB can be provided to convey domain knowledge about the "lifespan" the user is interested in. By default, the callers of \p FromI are checked as well to determine if \p ToI can be reached. If the query is not interested in callers beyond a certain point, e.g., a GPU kernel entry or the function containing an alloca, the \p GoBackwardsCB should return false.

Declared at: llvm/include/llvm/Transforms/IPO/Attributor.h:277

Parameters

llvm::Attributor& A
const llvm::Instruction& FromI
const llvm::Instruction& ToI
const llvm::AbstractAttribute& QueryingAA
std::function<bool(const Function&)> GoBackwardsCB = nullptr