llvm::hoistAllInstructionsInto

Hoist all instructions from a block into a dominating insertion point.

Synopsis

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

void
hoistAllInstructionsInto(
    BasicBlock* DomBlock,
    Instruction* InsertPt,
    BasicBlock* BB);

Description

Hoist all of the instructions in the IfBlock to the dominant block DomBlock, by moving its instructions to the insertion point InsertPt.

The moved instructions receive the insertion point debug location values (DILocations) and their debug intrinsic instructions are removed.

Parameters

NameDescription
DomBlockDominating block that receives the hoisted instructions.
InsertPtInsertion point within DomBlock.
BBBlock whose instructions are hoisted.