LLVM 20.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/DomTreeUpdater.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"

Go to the source code of this file.

Classes

struct  llvm::GraphTraits< Loop >
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

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 78 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 253 of file FixIrreducible.cpp.

References Blocks, and 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 259 of file FixIrreducible.cpp.

References Blocks, and 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 115 of file FixIrreducible.cpp.

References llvm::dbgs(), LLVM_DEBUG, and std::swap().

Referenced by createNaturalLoopInternal().

◆ unwrapBlock() [1/2]

static BasicBlock * unwrapBlock ( BasicBlock B)
static

Definition at line 250 of file FixIrreducible.cpp.

References B.

Referenced by makeReducible().

◆ unwrapBlock() [2/2]

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

Definition at line 251 of file FixIrreducible.cpp.

References N.

Variable Documentation

◆ false

fix Convert irreducible control flow into natural false

Definition at line 111 of file FixIrreducible.cpp.

◆ irreducible

fix irreducible

Definition at line 109 of file FixIrreducible.cpp.

◆ loops

fix Convert irreducible control flow into natural loops

Definition at line 110 of file FixIrreducible.cpp.