llvm::canReplaceOperandWithVariable

Return true if an operand may legally be replaced with a variable.

Synopsis

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

bool
canReplaceOperandWithVariable(
    Instruction const* I,
    unsigned int OpIdx);

Description

Given an instruction, is it legal to set operand OpIdx to a non-constant value?

Return Value

True if operand OpIdx may legally be replaced with a variable.

Parameters

NameDescription
IInstruction whose operand is being considered.
OpIdxOperand index that would receive a variable.