Go to the documentation of this file.
14 #ifndef LLVM_TRANSFORMS_UTILS_CODEMOVERUTILS_H
15 #define LLVM_TRANSFORMS_UTILS_CODEMOVERUTILS_H
23 class PostDominatorTree;
29 const DominatorTree &DT,
30 const PostDominatorTree &PDT);
36 const DominatorTree &DT,
37 const PostDominatorTree &PDT);
42 const PostDominatorTree *PDT =
nullptr,
43 DependenceInfo *DI =
nullptr,
44 bool CheckForEntireBlock =
false);
50 const PostDominatorTree *PDT =
nullptr,
51 DependenceInfo *DI =
nullptr);
57 const PostDominatorTree &PDT,
63 DominatorTree &DT,
const PostDominatorTree &PDT,
72 const DominatorTree *DT,
73 const PostDominatorTree *PDT);
77 const DominatorTree *DT,
const PostDominatorTree *PDT);
81 #endif // LLVM_TRANSFORMS_UTILS_CODEMOVERUTILS_H
This is an optimization pass for GlobalISel generic memory operations.
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 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.
@ BasicBlock
Various leaf nodes.
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...
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
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.