LLVM  6.0.0svn
Macros | Functions
BreakCriticalEdges.cpp File Reference
#include "llvm/Transforms/Utils/BreakCriticalEdges.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Transforms/Scalar.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)
 When a loop exit edge is split, LCSSA form may require new PHIs in the new exit block. More...
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "break-crit-edges"

Definition at line 33 of file BreakCriticalEdges.cpp.

Function Documentation

◆ createPHIsForSplitLoopExit()

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

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 97 of file BreakCriticalEdges.cpp.

References llvm::PHINode::addIncoming(), assert(), llvm::BasicBlock::begin(), llvm::PHINode::Create(), llvm::dyn_cast(), llvm::BasicBlock::front(), 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()

STATISTIC ( NumBroken  ,
"Number of blocks inserted"   
)