llvm::applyDebugifyMetadataToMachineFunction

Add synthesized debug information to a MachineFunction.

Synopsis

Declared in <llvm/CodeGen/MachineDebugify.h>

bool
applyDebugifyMetadataToMachineFunction(
    DIBuilder& DIB,
    Function& F,
    llvm::function_ref<MachineFunction*(Function&)> GetMF);

Description

Assigns sequential debug locations to each machine instruction and inserts DBG_VALUE instructions after non-terminator instructions, using IR-level debugify variables. Used by both the legacy and the new pass manager.

Return Value

True if synthetic debug info was applied; false if GetMF returned nullptr.

Parameters

NameDescription
DIBBuilder for constructing debug info metadata.
FFunction whose MachineFunction receives the synthetic debug info. Must already have a DISubprogram from IR-level debugify.
GetMFCallback that returns the MachineFunction for a Function, or nullptr if none exists.