LLVM  10.0.0svn
Public Member Functions | List of all members
llvm::GPUDivergenceAnalysis Class Reference

Divergence analysis frontend for GPU kernels. More...

#include "llvm/Analysis/DivergenceAnalysis.h"

Public Member Functions

 GPUDivergenceAnalysis (Function &F, const DominatorTree &DT, const PostDominatorTree &PDT, const LoopInfo &LI, const TargetTransformInfo &TTI)
 Runs the divergence analysis on , a GPU kernel. More...
 
bool hasDivergence () const
 Whether any divergence was detected. More...
 
const FunctiongetFunction () const
 The GPU kernel this analysis result is for. More...
 
bool isDivergent (const Value &V) const
 Whether V is divergent at its definition. More...
 
bool isDivergentUse (const Use &U) const
 Whether U is divergent. Uses of a uniform value can be divergent. More...
 
bool isUniform (const Value &V) const
 Whether V is uniform/non-divergent. More...
 
bool isUniformUse (const Use &U) const
 Whether U is uniform/non-divergent. More...
 
void print (raw_ostream &OS, const Module *) const
 Print all divergent values in the kernel. More...
 

Detailed Description

Divergence analysis frontend for GPU kernels.

Definition at line 179 of file DivergenceAnalysis.h.

Constructor & Destructor Documentation

◆ GPUDivergenceAnalysis()

GPUDivergenceAnalysis::GPUDivergenceAnalysis ( Function F,
const DominatorTree DT,
const PostDominatorTree PDT,
const LoopInfo LI,
const TargetTransformInfo TTI 
)

Member Function Documentation

◆ getFunction()

const Function& llvm::GPUDivergenceAnalysis::getFunction ( ) const
inline

The GPU kernel this analysis result is for.

Definition at line 193 of file DivergenceAnalysis.h.

References llvm::DivergenceAnalysis::getFunction(), llvm::DivergenceAnalysis::isDivergent(), and llvm::DivergenceAnalysis::isDivergentUse().

◆ hasDivergence()

bool llvm::GPUDivergenceAnalysis::hasDivergence ( ) const
inline

Whether any divergence was detected.

Definition at line 190 of file DivergenceAnalysis.h.

References llvm::DivergenceAnalysis::hasDetectedDivergence().

◆ isDivergent()

bool GPUDivergenceAnalysis::isDivergent ( const Value V) const

Whether V is divergent at its definition.

Definition at line 454 of file DivergenceAnalysis.cpp.

References llvm::DivergenceAnalysis::isDivergent().

◆ isDivergentUse()

bool GPUDivergenceAnalysis::isDivergentUse ( const Use U) const

Whether U is divergent. Uses of a uniform value can be divergent.

Definition at line 458 of file DivergenceAnalysis.cpp.

References llvm::DivergenceAnalysis::isDivergentUse().

◆ isUniform()

bool llvm::GPUDivergenceAnalysis::isUniform ( const Value V) const
inline

Whether V is uniform/non-divergent.

Definition at line 202 of file DivergenceAnalysis.h.

References llvm::DivergenceAnalysis::isDivergent().

◆ isUniformUse()

bool llvm::GPUDivergenceAnalysis::isUniformUse ( const Use U) const
inline

Whether U is uniform/non-divergent.

Uses of a uniform value can be divergent.

Definition at line 206 of file DivergenceAnalysis.h.

References llvm::DivergenceAnalysis::isDivergentUse(), and llvm::DivergenceAnalysis::print().

◆ print()

void GPUDivergenceAnalysis::print ( raw_ostream OS,
const Module mod 
) const

Print all divergent values in the kernel.

Definition at line 462 of file DivergenceAnalysis.cpp.

References llvm::DivergenceAnalysis::getFunction(), llvm::Value::getName(), and llvm::DivergenceAnalysis::print().


The documentation for this class was generated from the following files: