ΒΆllvm::MachineBasicBlock* PeelSingleBlockLoop(
    llvm::LoopPeelDirection Direction,
    llvm::MachineBasicBlock* Loop,
    llvm::MachineRegisterInfo& MRI,
    const llvm::TargetInstrInfo* TII)

Description

Peels a single block loop. Loop must have two successors, one of which must be itself. Similarly it must have two predecessors, one of which must be itself. The loop block is copied and inserted into the CFG such that two copies of the loop follow on from each other. The copy is inserted either before or after the loop based on Direction. Phis are updated and an unconditional branch inserted at the end of the clone so as to execute a single iteration. The trip count of Loop is not updated.

Declared at: llvm/include/llvm/CodeGen/MachineLoopUtils.h:35

Parameters

llvm::LoopPeelDirection Direction
llvm::MachineBasicBlock* Loop
llvm::MachineRegisterInfo& MRI
const llvm::TargetInstrInfo* TII