llvm::isAlmostDeadIV

Return true if removing exit test Cond would make induction variable IV dead.

Synopsis

Declared in <llvm/Transforms/Utils/LoopUtils.h>

bool
isAlmostDeadIV(
    PHINode* IV,
    BasicBlock* LatchBlock,
    Value* Cond);

Description

Conservatively returns false if analysis is insufficient.

Return Value

True if removing Cond would make IV dead.

Parameters

NameDescription
IVInduction-variable PHI in the loop.
LatchBlockLatch block of the loop containing IV.
CondExit-test condition that would be removed.