|
LLVM
7.0.0
|
#include "llvm/Analysis/MustExecute.h"#include "llvm/Analysis/InstructionSimplify.h"#include "llvm/Analysis/LoopInfo.h"#include "llvm/Analysis/Passes.h"#include "llvm/Analysis/ValueTracking.h"#include "llvm/IR/AssemblyAnnotationWriter.h"#include "llvm/IR/DataLayout.h"#include "llvm/IR/InstIterator.h"#include "llvm/IR/LLVMContext.h"#include "llvm/IR/Module.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/FormattedStream.h"#include "llvm/Support/raw_ostream.h"Go to the source code of this file.
Functions | |
| static bool | CanProveNotTakenFirstIteration (BasicBlock *ExitBlock, const DominatorTree *DT, const Loop *CurLoop) |
| Return true if we can prove that the given ExitBlock is not reached on the first iteration of the given loop. More... | |
| INITIALIZE_PASS_BEGIN (MustExecutePrinter, "print-mustexecute", "Instructions which execute on loop entry", false, true) INITIALIZE_PASS_END(MustExecutePrinter | |
| static bool | isMustExecuteIn (const Instruction &I, Loop *L, DominatorTree *DT) |
Variables | |
| mustexecute | |
| print Instructions which execute on loop | entry |
| print Instructions which execute on loop | false |
|
static |
Return true if we can prove that the given ExitBlock is not reached on the first iteration of the given loop.
That is, the backedge of the loop must be executed before the ExitBlock is executed in any dynamic execution trace.
Definition at line 62 of file MustExecute.cpp.
References assert(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::dyn_cast(), llvm::Module::getDataLayout(), llvm::LoopBase< BlockT, LoopT >::getHeader(), llvm::LoopBase< BlockT, LoopT >::getLoopPreheader(), llvm::BasicBlock::getModule(), llvm::User::getOperand(), llvm::BasicBlock::getSinglePredecessor(), llvm::BranchInst::getSuccessor(), and llvm::SimplifyCmpInst().
Referenced by llvm::isGuaranteedToExecute().
| INITIALIZE_PASS_BEGIN | ( | MustExecutePrinter | , |
| "print-mustexecute" | , | ||
| "Instructions which execute on loop entry" | , | ||
| false | , | ||
| true | |||
| ) |
Referenced by llvm::isGuaranteedToExecute().
|
static |
Definition at line 194 of file MustExecute.cpp.
References llvm::computeLoopSafetyInfo(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::dbgs(), F(), first, llvm::LoopInfoBase< BlockT, LoopT >::getLoopFor(), llvm::LoopBase< BlockT, LoopT >::getParentLoop(), I, llvm::instructions(), llvm::isGuaranteedToExecute(), llvm::isGuaranteedToExecuteForEveryIteration(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), Loops, llvm::Function::print(), and runOnFunction().
| print Instructions which execute on loop entry |
Definition at line 187 of file MustExecute.cpp.
Referenced by llvm::RegionBase< RegionTraits< Function > >::clearNodeCache(), llvm::RegionBase< RegionTraits< Function > >::contains(), llvm::SlotIndexes::eraseIndex(), llvm::ImutAVLFactory< ImutInfo >::getCanonicalTree(), llvm::RegionBase< RegionTraits< Function > >::getEnteringBlock(), llvm::object::ExportDirectoryEntryRef::getExportRVA(), llvm::RegionBase< RegionTraits< Function > >::getNameStr(), isSourceDefinedByImplicitDef(), llvm::RegionBase< RegionTraits< Function > >::replaceEntry(), SortNonLocalDepInfoCache(), and llvm::RegionInfoBase< RegionTraits< Function > >::updateRegionTree().
| print Instructions which execute on loop false |
Definition at line 187 of file MustExecute.cpp.
| print mustexecute |
Definition at line 187 of file MustExecute.cpp.
1.8.13