ΒΆbool replaceAllDbgUsesWith(
    llvm::Instruction& From,
    llvm::Value& To,
    llvm::Instruction& DomPoint,
    llvm::DominatorTree& DT)

Description

Point debug users of \p From to \p To or salvage them. Use this function only when replacing all uses of \p From with \p To, with a guarantee that\p From is going to be deleted. Follow these rules to prevent use-before-def of \p To: . If \p To is a linked Instruction, set \p DomPoint to \p To. . If \p To is an unlinked Instruction, set \p DomPoint to the Instruction\p To will be inserted after. . If \p To is not an Instruction (e.g a Constant), the choice of\p DomPoint is arbitrary. Pick \p From for simplicity. If a debug user cannot be preserved without reordering variable updates or introducing a use-before-def, it is either salvaged (\ref salvageDebugInfo) or deleted. Returns true if any debug users were updated.

Declared at: llvm/include/llvm/Transforms/Utils/Local.h:333

Parameters

llvm::Instruction& From
llvm::Value& To
llvm::Instruction& DomPoint
llvm::DominatorTree& DT