|
LLVM
4.0.0
|
#include <LoopDeletion.h>
Public Member Functions | |
| LoopDeletionPass () | |
| PreservedAnalyses | run (Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U) |
| bool | runImpl (Loop *L, DominatorTree &DT, ScalarEvolution &SE, LoopInfo &loopInfo) |
| Remove dead loops, by which we mean loops that do not impact the observable behavior of the program other than finite running time. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::PassInfoMixin< LoopDeletionPass > | |
| static StringRef | name () |
| Gets the name of the pass we are mixed into. More... | |
Definition at line 24 of file LoopDeletion.h.
|
inline |
Definition at line 26 of file LoopDeletion.h.
| PreservedAnalyses LoopDeletionPass::run | ( | Loop & | L, |
| LoopAnalysisManager & | AM, | ||
| LoopStandardAnalysisResults & | AR, | ||
| LPMUpdater & | U | ||
| ) |
Definition at line 218 of file LoopDeletion.cpp.
References llvm::PreservedAnalyses::all(), llvm::LoopStandardAnalysisResults::DT, llvm::getLoopPassPreservedAnalyses(), llvm::LoopStandardAnalysisResults::LI, runImpl(), and llvm::LoopStandardAnalysisResults::SE.
| bool LoopDeletionPass::runImpl | ( | Loop * | L, |
| DominatorTree & | DT, | ||
| ScalarEvolution & | SE, | ||
| LoopInfo & | loopInfo | ||
| ) |
Remove dead loops, by which we mean loops that do not impact the observable behavior of the program other than finite running time.
Note we do ensure that this never remove a loop that might be infinite, as doing so could change the halting/non-halting nature of a program. NOTE: This entire process relies pretty heavily on LoopSimplify and LCSSA in order to make various safety checks work.
Definition at line 100 of file LoopDeletion.cpp.
References assert(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::LoopBase< N, M >::begin(), llvm::BasicBlock::begin(), llvm::LoopBase< N, M >::block_begin(), llvm::LoopBase< N, M >::block_end(), llvm::DominatorTreeBase< N >::changeImmediateDominator(), llvm::LoopBase< N, M >::end(), llvm::DominatorTreeBase< N >::eraseNode(), llvm::ScalarEvolution::forgetLoop(), llvm::LoopBase< N, M >::getExitingBlocks(), llvm::LoopBase< N, M >::getHeader(), llvm::LoopBase< N, M >::getLoopPreheader(), llvm::ScalarEvolution::getMaxBackedgeTakenCount(), llvm::Loop::getUniqueExitBlocks(), llvm::Loop::hasDedicatedExits(), i, llvm::SmallPtrSetImpl< PtrType >::insert(), llvm::SmallVectorImpl< T >::insert(), llvm::Loop::isLCSSAForm(), llvm::AArch64CC::LE, llvm::LoopInfo::markAsRemoved(), P, preheader(), llvm::LoopInfoBase< N, M >::removeBlock(), llvm::User::replaceUsesOfWith(), and llvm::SmallVectorTemplateCommon< T >::size().
Referenced by run().
1.8.6