llvm::isSafeToMoveBefore

Return true if I can be safely moved before InsertPoint.

Synopsis

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

bool
isSafeToMoveBefore(
    Instruction& I,
    Instruction& InsertPoint,
    DominatorTree& DT,
    PostDominatorTree const* PDT = nullptr,
    DependenceInfo* DI = nullptr,
    bool CheckForEntireBlock = false);

Return Value

True if I can be safely moved before InsertPoint.

Parameters

NameDescription
IInstruction to move.
InsertPointInstruction before which I would be placed.
DTDominator tree for the function.
PDTOptional post-dominator tree; required for a true result.
DIOptional dependence info; required for a true result.
CheckForEntireBlockWhether to relax checks when moving a whole block.