LLVM  8.0.1
Macros | Functions
BreakCriticalEdges.cpp File Reference
#include "llvm/Transforms/Utils/BreakCriticalEdges.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/BlockFrequencyInfo.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/CFG.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/MemorySSAUpdater.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/Utils.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/Transforms/Utils/Cloning.h"
#include "llvm/Transforms/Utils/ValueMapper.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...
 
static BasicBlockfindIBRPredecessor (BasicBlock *BB, SmallVectorImpl< BasicBlock *> &OtherPreds)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "break-crit-edges"

Definition at line 38 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 102 of file BreakCriticalEdges.cpp.

References llvm::PHINode::addIncoming(), assert(), llvm::PHINode::Create(), llvm::BasicBlock::front(), llvm::BasicBlock::getFirstNonPHI(), llvm::BasicBlock::getTerminator(), llvm::BasicBlock::isLandingPad(), llvm::BasicBlock::phis(), and llvm::ArrayRef< T >::size().

Referenced by llvm::SplitCriticalEdge().

◆ findIBRPredecessor()

static BasicBlock* findIBRPredecessor ( BasicBlock BB,
SmallVectorImpl< BasicBlock *> &  OtherPreds 
)
static

◆ STATISTIC()

STATISTIC ( NumBroken  ,
"Number of blocks inserted"   
)