17#ifndef LLVM_TRANSFORMS_UTILS_CODEMOVERUTILS_H
18#define LLVM_TRANSFORMS_UTILS_CODEMOVERUTILS_H
26class PostDominatorTree;
32 const DominatorTree &DT,
33 const PostDominatorTree &PDT);
39 const DominatorTree &DT,
40 const PostDominatorTree &PDT);
45 const PostDominatorTree *PDT =
nullptr,
46 DependenceInfo *DI =
nullptr,
47 bool CheckForEntireBlock =
false);
53 const PostDominatorTree *PDT =
nullptr,
54 DependenceInfo *DI =
nullptr);
60 const PostDominatorTree &PDT,
66 DominatorTree &DT,
const PostDominatorTree &PDT,
74 const BasicBlock *OtherBlock,
75 const DominatorTree *DT,
76 const PostDominatorTree *PDT);
80 const DominatorTree *DT,
const PostDominatorTree *PDT);
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.
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.
bool isReachedBefore(const Instruction *I0, const Instruction *I1, const DominatorTree *DT, const PostDominatorTree *PDT)
bool isControlFlowEquivalent(const Instruction &I0, const Instruction &I1, const DominatorTree &DT, const PostDominatorTree &PDT)
Return true if I0 and I1 are control flow equivalent.
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...
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...
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.