LLVM  13.0.0git
Macros | Functions | Variables
AMDGPUUnifyDivergentExitNodes.cpp File Reference
#include "AMDGPU.h"
#include "SIDefines.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Analysis/DomTreeUpdater.h"
#include "llvm/Analysis/LegacyDivergenceAnalysis.h"
#include "llvm/Analysis/PostDominators.h"
#include "llvm/Analysis/TargetTransformInfo.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/CFG.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/InstrTypes.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsAMDGPU.h"
#include "llvm/IR/Type.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/Casting.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils.h"
#include "llvm/Transforms/Utils/Local.h"
Include dependency graph for AMDGPUUnifyDivergentExitNodes.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "amdgpu-unify-divergent-exit-nodes"
 

Functions

 INITIALIZE_PASS_BEGIN (AMDGPUUnifyDivergentExitNodes, DEBUG_TYPE, "Unify divergent function exit nodes", false, false) INITIALIZE_PASS_END(AMDGPUUnifyDivergentExitNodes
 
static bool isUniformlyReached (const LegacyDivergenceAnalysis &DA, BasicBlock &BB)
 
static void removeDoneExport (Function &F)
 

Variables

 DEBUG_TYPE
 
Unify divergent function exit nodes
 
Unify divergent function exit false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-unify-divergent-exit-nodes"

Definition at line 52 of file AMDGPUUnifyDivergentExitNodes.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( AMDGPUUnifyDivergentExitNodes  ,
DEBUG_TYPE  ,
"Unify divergent function exit nodes ,
false  ,
false   
)

◆ isUniformlyReached()

static bool isUniformlyReached ( const LegacyDivergenceAnalysis DA,
BasicBlock BB 
)
static
Returns
true if BB is reachable through only uniform branches. XXX - Is there a more efficient way to find this?

Definition at line 117 of file AMDGPUUnifyDivergentExitNodes.cpp.

References BB, llvm::M68kBeads::DA, llvm::BasicBlock::getTerminator(), llvm::SmallPtrSetImpl< PtrType >::insert(), and llvm::predecessors().

◆ removeDoneExport()

static void removeDoneExport ( Function F)
static

Definition at line 136 of file AMDGPUUnifyDivergentExitNodes.cpp.

References BB, F, llvm::ConstantInt::getFalse(), and I.

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 86 of file AMDGPUUnifyDivergentExitNodes.cpp.

◆ false

Unify divergent function exit false

Definition at line 87 of file AMDGPUUnifyDivergentExitNodes.cpp.

◆ nodes

Unify divergent function exit nodes