LLVM  14.0.0git
Macros | Functions | Variables
GuardWidening.cpp File Reference
#include "llvm/Transforms/Scalar/GuardWidening.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/BranchProbabilityInfo.h"
#include "llvm/Analysis/GuardUtils.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/LoopPass.h"
#include "llvm/Analysis/MemorySSAUpdater.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/ConstantRange.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/PatternMatch.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/KnownBits.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/GuardUtils.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
#include <functional>
Include dependency graph for GuardWidening.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "guard-widening"
 

Functions

 STATISTIC (GuardsEliminated, "Number of eliminated guards")
 
 STATISTIC (CondBranchEliminated, "Number of eliminated conditional branches")
 
static bool isSupportedGuardInstruction (const Instruction *Insn)
 
 INITIALIZE_PASS_BEGIN (GuardWideningLegacyPass, "guard-widening", "Widen guards", false, false) INITIALIZE_PASS_END(GuardWideningLegacyPass
 
guard Widen false INITIALIZE_PASS_BEGIN (LoopGuardWideningLegacyPass, "loop-guard-widening", "Widen guards (within a single loop, as a loop pass)", false, false) INITIALIZE_PASS_END(LoopGuardWideningLegacyPass
 
guard Widen false loop guard Widen guards (within a single loop, as a loop pass)"
 

Variables

static cl::opt< bool > WidenBranchGuards ("guard-widening-widen-branch-guards", cl::Hidden, cl::desc("Whether or not we should widen guards " "expressed as branches by widenable conditions"), cl::init(true))
 
guard widening
 
guard Widen guards
 
guard Widen false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "guard-widening"

Definition at line 68 of file GuardWidening.cpp.

Function Documentation

◆ guards()

guard Widen false loop guard Widen guards ( within a single  loop,
as a loop  pass 
)

◆ INITIALIZE_PASS_BEGIN() [1/2]

INITIALIZE_PASS_BEGIN ( GuardWideningLegacyPass  ,
"guard-widening ,
"Widen guards ,
false  ,
false   
)

◆ INITIALIZE_PASS_BEGIN() [2/2]

guard Widen false INITIALIZE_PASS_BEGIN ( LoopGuardWideningLegacyPass  ,
"loop-guard-widening ,
"Widen guards (within a single loop, as a loop pass)"  ,
false  ,
false   
)

◆ isSupportedGuardInstruction()

static bool isSupportedGuardInstruction ( const Instruction Insn)
static

◆ STATISTIC() [1/2]

STATISTIC ( CondBranchEliminated  ,
"Number of eliminated conditional branches  
)

◆ STATISTIC() [2/2]

STATISTIC ( GuardsEliminated  ,
"Number of eliminated guards  
)

Variable Documentation

◆ false

guard Widen false loop guard Widen false

Definition at line 892 of file GuardWidening.cpp.

◆ guards

guard Widen guards

Definition at line 891 of file GuardWidening.cpp.

◆ WidenBranchGuards

cl::opt<bool> WidenBranchGuards("guard-widening-widen-branch-guards", cl::Hidden, cl::desc("Whether or not we should widen guards " "expressed as branches by widenable conditions"), cl::init(true))
static

◆ widening

guard Widen false loop guard widening

Definition at line 891 of file GuardWidening.cpp.