LLVM  14.0.0git
Classes | Namespaces | Macros | Functions | Variables
FixIrreducible.cpp File Reference
#include "llvm/Transforms/Utils/FixIrreducible.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/Analysis/LoopIterator.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Transforms/Utils.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
Include dependency graph for FixIrreducible.cpp:

Go to the source code of this file.

Classes

struct  llvm::GraphTraits< Loop >
 

Namespaces

 llvm
 ---------------------— PointerInfo ------------------------------------—
 

Macros

#define DEBUG_TYPE   "fix-irreducible"
 

Functions

 INITIALIZE_PASS_BEGIN (FixIrreducible, "fix-irreducible", "Convert irreducible control-flow into natural loops", false, false) INITIALIZE_PASS_END(FixIrreducible
 
fix Convert irreducible control flow into natural static false void reconnectChildLoops (LoopInfo &LI, Loop *ParentLoop, Loop *NewLoop, SetVector< BasicBlock * > &Blocks, SetVector< BasicBlock * > &Headers)
 
static void createNaturalLoopInternal (LoopInfo &LI, DominatorTree &DT, Loop *ParentLoop, SetVector< BasicBlock * > &Blocks, SetVector< BasicBlock * > &Headers)
 
static BasicBlockunwrapBlock (BasicBlock *B)
 
static BasicBlockunwrapBlock (LoopBodyTraits::NodeRef &N)
 
static void createNaturalLoop (LoopInfo &LI, DominatorTree &DT, Function *F, SetVector< BasicBlock * > &Blocks, SetVector< BasicBlock * > &Headers)
 
static void createNaturalLoop (LoopInfo &LI, DominatorTree &DT, Loop &L, SetVector< BasicBlock * > &Blocks, SetVector< BasicBlock * > &Headers)
 
template<class Graph >
static bool makeReducible (LoopInfo &LI, DominatorTree &DT, Graph &&G)
 
static bool FixIrreducibleImpl (Function &F, LoopInfo &LI, DominatorTree &DT)
 

Variables

fix irreducible
 
fix Convert irreducible control flow into natural loops
 
fix Convert irreducible control flow into natural false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "fix-irreducible"

Definition at line 77 of file FixIrreducible.cpp.

Function Documentation

◆ createNaturalLoop() [1/2]

static void createNaturalLoop ( LoopInfo LI,
DominatorTree DT,
Function F,
SetVector< BasicBlock * > &  Blocks,
SetVector< BasicBlock * > &  Headers 
)
static

Definition at line 247 of file FixIrreducible.cpp.

References createNaturalLoopInternal().

Referenced by makeReducible().

◆ createNaturalLoop() [2/2]

static void createNaturalLoop ( LoopInfo LI,
DominatorTree DT,
Loop L,
SetVector< BasicBlock * > &  Blocks,
SetVector< BasicBlock * > &  Headers 
)
static

Definition at line 253 of file FixIrreducible.cpp.

References createNaturalLoopInternal().

◆ createNaturalLoopInternal()

static void createNaturalLoopInternal ( LoopInfo LI,
DominatorTree DT,
Loop ParentLoop,
SetVector< BasicBlock * > &  Blocks,
SetVector< BasicBlock * > &  Headers 
)
static

◆ FixIrreducibleImpl()

static bool FixIrreducibleImpl ( Function F,
LoopInfo LI,
DominatorTree DT 
)
static

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( FixIrreducible  ,
"fix-irreducible ,
"Convert irreducible control-flow into natural loops ,
false  ,
false   
)

◆ makeReducible()

template<class Graph >
static bool makeReducible ( LoopInfo LI,
DominatorTree DT,
Graph &&  G 
)
static

◆ reconnectChildLoops()

fix Convert irreducible control flow into natural static false void reconnectChildLoops ( LoopInfo LI,
Loop ParentLoop,
Loop NewLoop,
SetVector< BasicBlock * > &  Blocks,
SetVector< BasicBlock * > &  Headers 
)
static

Definition at line 117 of file FixIrreducible.cpp.

References BB, llvm::dbgs(), LLVM_DEBUG, and llvm::partition().

Referenced by createNaturalLoopInternal().

◆ unwrapBlock() [1/2]

static BasicBlock* unwrapBlock ( BasicBlock B)
static

Definition at line 244 of file FixIrreducible.cpp.

References B.

Referenced by makeReducible().

◆ unwrapBlock() [2/2]

static BasicBlock* unwrapBlock ( LoopBodyTraits::NodeRef N)
static

Definition at line 245 of file FixIrreducible.cpp.

References N.

Variable Documentation

◆ false

fix Convert irreducible control flow into natural false

Definition at line 113 of file FixIrreducible.cpp.

◆ irreducible

fix irreducible

Definition at line 111 of file FixIrreducible.cpp.

◆ loops

fix Convert irreducible control flow into natural loops

Definition at line 112 of file FixIrreducible.cpp.