LLVM API Documentation
#include "llvm/Transforms/Scalar.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/PredIteratorCache.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include "llvm/Transforms/Utils/SSAUpdater.h"
Go to the source code of this file.
Defines | |
#define | DEBUG_TYPE "lcssa" |
Functions | |
STATISTIC (NumLCSSA,"Number of live out of a loop variables") | |
static bool | isExitBlock (BasicBlock *BB, const SmallVectorImpl< BasicBlock * > &ExitBlocks) |
Return true if the specified block is in the list. | |
static bool | processInstruction (Loop &L, Instruction &Inst, DominatorTree &DT, const SmallVectorImpl< BasicBlock * > &ExitBlocks, PredIteratorCache &PredCache) |
static bool | blockDominatesAnExit (BasicBlock *BB, DominatorTree &DT, const SmallVectorImpl< BasicBlock * > &ExitBlocks) |
static void | verifyLoop (Loop &L, DominatorTree &DT) |
#define DEBUG_TYPE "lcssa" |
static bool blockDominatesAnExit | ( | BasicBlock * | BB, |
DominatorTree & | DT, | ||
const SmallVectorImpl< BasicBlock * > & | ExitBlocks | ||
) | [static] |
Return true if the specified block dominates at least one of the blocks in the specified list.
Definition at line 172 of file LCSSA.cpp.
References llvm::DominatorTree::dominates(), llvm::DominatorTreeBase< NodeT >::getNode(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by llvm::formLCSSA().
static bool isExitBlock | ( | BasicBlock * | BB, |
const SmallVectorImpl< BasicBlock * > & | ExitBlocks | ||
) | [static] |
Return true if the specified block is in the list.
Definition at line 51 of file LCSSA.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::size().
Referenced by processInstruction().
static bool processInstruction | ( | Loop & | L, |
Instruction & | Inst, | ||
DominatorTree & | DT, | ||
const SmallVectorImpl< BasicBlock * > & | ExitBlocks, | ||
PredIteratorCache & | PredCache | ||
) | [static] |
Given an instruction in the loop, check to see if it has any uses that are outside the current loop. If so, insert LCSSA PHI nodes and rewrite the uses.
Definition at line 62 of file LCSSA.cpp.
References llvm::SSAUpdater::AddAvailableValue(), llvm::PHINode::addIncoming(), llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T >::begin(), llvm::BasicBlock::begin(), llvm::LoopBase< BlockT, LoopT >::contains(), llvm::PHINode::Create(), llvm::DominatorTree::dominates(), llvm::SmallVectorBase::empty(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::Value::getName(), llvm::DominatorTreeBase< NodeT >::getNode(), llvm::PHINode::getNumIncomingValues(), llvm::PredIteratorCache::GetNumPreds(), llvm::PHINode::getOperandNumForIncomingValue(), llvm::User::getOperandUse(), llvm::Instruction::getParent(), llvm::PredIteratorCache::GetPreds(), llvm::Value::getType(), llvm::SSAUpdater::HasValueForBlock(), llvm::SSAUpdater::Initialize(), isExitBlock(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SSAUpdater::RewriteUse(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::Value::uses(), and llvm::ValueHandleBase::ValueIsRAUWd().
Referenced by llvm::formLCSSA().
STATISTIC | ( | NumLCSSA | , |
"Number of live out of a loop variables" | |||
) |
static void verifyLoop | ( | Loop & | L, |
DominatorTree & | DT | ||
) | [static] |
Definition at line 299 of file LCSSA.cpp.
References llvm::LoopBase< BlockT, LoopT >::begin(), llvm::LoopBase< BlockT, LoopT >::end(), llvm::AArch64CC::LE, and LI.
Referenced by llvm::LoopBase< BlockT, LoopT >::verifyLoopNest().