LLVM 19.0.0git
Namespaces | Macros | Functions | Variables
UnifyLoopExits.cpp File Reference
#include "llvm/Transforms/Utils/UnifyLoopExits.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Transforms/Utils.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"

Go to the source code of this file.

Namespaces

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

Macros

#define DEBUG_TYPE   "unify-loop-exits"
 

Functions

 INITIALIZE_PASS_BEGIN (UnifyLoopExitsLegacyPass, "unify-loop-exits", "Fixup each natural loop to have a single exit block", false, false) INITIALIZE_PASS_END(UnifyLoopExitsLegacyPass
 
unify loop Fixup each natural loop to have a single exit static false void restoreSSA (const DominatorTree &DT, const Loop *L, const SetVector< BasicBlock * > &Incoming, BasicBlock *LoopExitBlock)
 
static bool unifyLoopExits (DominatorTree &DT, LoopInfo &LI, Loop *L)
 
static bool runImpl (LoopInfo &LI, DominatorTree &DT)
 

Variables

static cl::opt< unsignedMaxBooleansInControlFlowHub ("max-booleans-in-control-flow-hub", cl::init(32), cl::Hidden, cl::desc("Set the maximum number of outgoing blocks for using a boolean " "value to record the exiting block in CreateControlFlowHub."))
 
unify loop exits
 
unify loop Fixup each natural loop to have a single exit block
 
unify loop Fixup each natural loop to have a single exit false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "unify-loop-exits"

Definition at line 30 of file UnifyLoopExits.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( UnifyLoopExitsLegacyPass  ,
"unify-loop-exits"  ,
"Fixup each natural loop to have a single exit block"  ,
false  ,
false   
)

◆ restoreSSA()

unify loop Fixup each natural loop to have a single exit static false void restoreSSA ( const DominatorTree DT,
const Loop L,
const SetVector< BasicBlock * > &  Incoming,
BasicBlock LoopExitBlock 
)
static

Definition at line 88 of file UnifyLoopExits.cpp.

References llvm::PHINode::Create(), llvm::dbgs(), llvm::PoisonValue::get(), I, and LLVM_DEBUG.

Referenced by unifyLoopExits().

◆ runImpl()

static bool runImpl ( LoopInfo LI,
DominatorTree DT 
)
static

◆ unifyLoopExits()

static bool unifyLoopExits ( DominatorTree DT,
LoopInfo LI,
Loop L 
)
static

Variable Documentation

◆ block

unify loop Fixup each natural loop to have a single exit block

◆ exits

unify loop exits

Definition at line 68 of file UnifyLoopExits.cpp.

◆ false

unify loop Fixup each natural loop to have a single exit false

Definition at line 70 of file UnifyLoopExits.cpp.

◆ MaxBooleansInControlFlowHub

cl::opt< unsigned > MaxBooleansInControlFlowHub("max-booleans-in-control-flow-hub", cl::init(32), cl::Hidden, cl::desc("Set the maximum number of outgoing blocks for using a boolean " "value to record the exiting block in CreateControlFlowHub.")) ( "max-booleans-in-control-flow-hub"  ,
cl::init(32)  ,
cl::Hidden  ,
cl::desc("Set the maximum number of outgoing blocks for using a boolean " "value to record the exiting block in CreateControlFlowHub.")   
)
static

Referenced by unifyLoopExits().