LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
BreakCriticalEdges.cpp File Reference
#include "llvm/Transforms/Scalar.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
Include dependency graph for BreakCriticalEdges.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "break-crit-edges"
 

Functions

 STATISTIC (NumBroken,"Number of blocks inserted")
 
static void createPHIsForSplitLoopExit (ArrayRef< BasicBlock * > Preds, BasicBlock *SplitBB, BasicBlock *DestBB)
 

Macro Definition Documentation

#define DEBUG_TYPE   "break-crit-edges"

Definition at line 18 of file BreakCriticalEdges.cpp.

Function Documentation

static void createPHIsForSplitLoopExit ( ArrayRef< BasicBlock * >  Preds,
BasicBlock SplitBB,
BasicBlock DestBB 
)
static

createPHIsForSplitLoopExit - When a loop exit edge is split, LCSSA form may require new PHIs in the new exit block. This function inserts the new PHIs, as needed. Preds is a list of preds inside the loop, SplitBB is the new loop exit block, and DestBB is the old loop exit, now the successor of SplitBB.

Definition at line 91 of file BreakCriticalEdges.cpp.

References llvm::PHINode::addIncoming(), llvm::BasicBlock::begin(), llvm::PHINode::Create(), llvm::dyn_cast(), llvm::PHINode::getBasicBlockIndex(), llvm::BasicBlock::getFirstNonPHI(), llvm::PHINode::getIncomingValue(), llvm::BasicBlock::getTerminator(), llvm::Value::getType(), I, llvm::BasicBlock::isLandingPad(), llvm::PHINode::setIncomingValue(), and llvm::ArrayRef< T >::size().

Referenced by llvm::SplitCriticalEdge().

STATISTIC ( NumBroken  ,
"Number of blocks inserted"   
)