ΒΆbool canSinkOrHoistInst(
    llvm::Instruction& I,
    llvm::AAResults* AA,
    llvm::DominatorTree* DT,
    llvm::Loop* CurLoop,
    llvm::AliasSetTracker* CurAST,
    llvm::MemorySSAUpdater* MSSAU,
    bool TargetExecutesOncePerLoop,
    llvm::SinkAndHoistLICMFlags* LICMFlags =
        nullptr,
    llvm::OptimizationRemarkEmitter* ORE =
        nullptr)

Description

Returns true if is legal to hoist or sink this instruction disregarding the possible introduction of faults. Reasoning about potential faulting instructions is the responsibility of the caller since it is challenging to do efficiently from within this routine.\p TargetExecutesOncePerLoop is true only when it is guaranteed that the target executes at most once per execution of the loop body. This is used to assess the legality of duplicating atomic loads. Generally, this is true when moving out of loop and not true when moving into loops. If \p ORE is set use it to emit optimization remarks.

Declared at: llvm/include/llvm/Transforms/Utils/LoopUtils.h:290

Parameters

llvm::Instruction& I
llvm::AAResults* AA
llvm::DominatorTree* DT
llvm::Loop* CurLoop
llvm::AliasSetTracker* CurAST
llvm::MemorySSAUpdater* MSSAU
bool TargetExecutesOncePerLoop
llvm::SinkAndHoistLICMFlags* LICMFlags = nullptr
llvm::OptimizationRemarkEmitter* ORE = nullptr