class GPUDivergenceAnalysis

Declaration

class GPUDivergenceAnalysis { /* full declaration omitted */ };

Description

Divergence analysis frontend for GPU kernels.

Declared at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:179

Method Overview

  • public GPUDivergenceAnalysis(llvm::Function & F, const llvm::DominatorTree & DT, const llvm::PostDominatorTree & PDT, const llvm::LoopInfo & LI, const llvm::TargetTransformInfo & TTI)
  • public const llvm::Function & getFunction() const
  • public bool hasDivergence() const
  • public bool isDivergent(const llvm::Value & V) const
  • public bool isDivergentUse(const llvm::Use & U) const
  • public bool isUniform(const llvm::Value & V) const
  • public bool isUniformUse(const llvm::Use & U) const
  • public void print(llvm::raw_ostream & OS, const llvm::Module *) const

Methods

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

Description

Runs the divergence analysis on @F, a GPU kernel

Declared at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:185

Parameters

llvm::Function& F
const llvm::DominatorTree& DT
const llvm::PostDominatorTree& PDT
const llvm::LoopInfo& LI
const llvm::TargetTransformInfo& TTI

const llvm::Function& getFunction() const

Description

The GPU kernel this analysis result is for

Declared at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:193

bool hasDivergence() const

Description

Whether any divergence was detected.

Declared at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:190

bool isDivergent(const llvm::Value& V) const

Description

Whether \p V is divergent at its definition.

Declared at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:196

Parameters

const llvm::Value& V

bool isDivergentUse(const llvm::Use& U) const

Description

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

Declared at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:199

Parameters

const llvm::Use& U

bool isUniform(const llvm::Value& V) const

Description

Whether \p V is uniform/non-divergent.

Declared at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:202

Parameters

const llvm::Value& V

bool isUniformUse(const llvm::Use& U) const

Description

Whether \p U is uniform/non-divergent. Uses of a uniform value can be divergent.

Declared at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:206

Parameters

const llvm::Use& U

void print(llvm::raw_ostream& OS,
           const llvm::Module*) const

Description

Print all divergent values in the kernel.

Declared at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:209

Parameters

llvm::raw_ostream& OS
const llvm::Module*