17#ifndef LLVM_TRANSFORMS_UTILS_CODEMOVERUTILS_H
18#define LLVM_TRANSFORMS_UTILS_CODEMOVERUTILS_H
28class PostDominatorTree;
34 const Instruction &I1,
35 const DominatorTree &DT,
36 const PostDominatorTree &PDT);
42 const BasicBlock &BB1,
43 const DominatorTree &DT,
44 const PostDominatorTree &PDT);
49 const PostDominatorTree *PDT =
nullptr,
50 DependenceInfo *DI =
nullptr,
51 bool CheckForEntireBlock =
false);
57 const PostDominatorTree *PDT =
nullptr,
58 DependenceInfo *DI =
nullptr);
65 const PostDominatorTree &PDT,
72 const PostDominatorTree &PDT,
80 const BasicBlock *OtherBlock,
81 const DominatorTree *DT,
82 const PostDominatorTree *PDT);
86 const DominatorTree *DT,
87 const PostDominatorTree *PDT);
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void moveInstructionsToTheEnd(BasicBlock &FromBB, BasicBlock &ToBB, DominatorTree &DT, const PostDominatorTree &PDT, DependenceInfo &DI)
Move instructions, in an order-preserving manner, from FromBB to the end of ToBB when proven safe.
LLVM_ABI bool isReachedBefore(const Instruction *I0, const Instruction *I1, const DominatorTree *DT, const PostDominatorTree *PDT)
LLVM_ABI bool isControlFlowEquivalent(const Instruction &I0, const Instruction &I1, const DominatorTree &DT, const PostDominatorTree &PDT)
Return true if I0 and I1 are control flow equivalent.
LLVM_ABI bool nonStrictlyPostDominate(const BasicBlock *ThisBlock, const BasicBlock *OtherBlock, const DominatorTree *DT, const PostDominatorTree *PDT)
In case that two BBs ThisBlock and OtherBlock are control flow equivalent but they do not strictly do...
LLVM_ABI void moveInstructionsToTheBeginning(BasicBlock &FromBB, BasicBlock &ToBB, DominatorTree &DT, const PostDominatorTree &PDT, DependenceInfo &DI)
Move instructions, in an order-preserving manner, from FromBB to the beginning of ToBB when proven sa...
LLVM_ABI bool isSafeToMoveBefore(Instruction &I, Instruction &InsertPoint, DominatorTree &DT, const PostDominatorTree *PDT=nullptr, DependenceInfo *DI=nullptr, bool CheckForEntireBlock=false)
Return true if I can be safely moved before InsertPoint.