34    if (
TTI->isSourceOfDivergence(&
I))
 
   36    else if (
TTI->isAlwaysUniform(&
I))
 
   39  for (
auto &Arg : 
F.args()) {
 
   40    if (
TTI->isSourceOfDivergence(&Arg)) {
 
 
   47void llvm::GenericUniformityAnalysisImpl<SSAContext>::pushUsers(
 
   51      markDivergent(*UserInstr);
 
   57void llvm::GenericUniformityAnalysisImpl<SSAContext>::pushUsers(
 
   59  assert(!isAlwaysUniform(Instr));
 
   60  if (
Instr.isTerminator())
 
   66bool llvm::GenericUniformityAnalysisImpl<SSAContext>::usesValueFromCycle(
 
   69  for (
const Use &U : 
I.operands()) {
 
   81                                             const Cycle &DefCycle) {
 
   82  for (
auto *
User : 
I.users()) {
 
   84    if (DefCycle.
contains(UserInstr->getParent()))
 
   86    markDivergent(*UserInstr);
 
   87    recordTemporalDivergence(&
I, UserInstr, &DefCycle);
 
   94  const auto *V = U.get();
 
   99    return isTemporalDivergent(*UseInstr->getParent(), *DefInstr);
 
 
  121  if (
TTI.hasBranchDivergence(&
F))
 
 
  134  OS << 
"UniformityInfo for function '" << 
F.getName() << 
"':\n";
 
 
  149                      "Uniformity Analysis", 
false, 
true)
 
  157  AU.setPreservesAll();
 
 
  166  auto &targetTransformInfo =
 
  170  m_uniformityInfo = 
UniformityInfo{domTree, cycleInfo, &targetTransformInfo};
 
  173  if (targetTransformInfo.hasBranchDivergence(m_function))
 
  174    m_uniformityInfo.compute();
 
 
  180  OS << 
"UniformityInfo for function '" << m_function->getName() << 
"':\n";
 
  181  m_uniformityInfo.print(OS);
 
 
  186  m_function = 
nullptr;
 
 
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Expand Atomic instructions
This file declares an analysis pass that computes CycleInfo for LLVM IR, specialized from GenericCycl...
FunctionAnalysisManager FAM
#define INITIALIZE_PASS_DEPENDENCY(depName)
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
PassT::Result & getResult(IRUnitT &IR, ExtraArgTs... ExtraArgs)
Get the result of an analysis pass for a given IR unit.
Represent the analysis usage information of a pass.
Analysis pass which computes a CycleInfo.
Legacy analysis pass which computes a CycleInfo.
Analysis pass which computes a DominatorTree.
Legacy analysis pass which computes a DominatorTree.
bool contains(const BlockT *Block) const
Return whether Block is contained in the cycle.
A Module instance is used to store all the information related to an LLVM module.
AnalysisType & getAnalysis() const
getAnalysis<AnalysisType>() - This function is used by subclasses to get to the analysis information ...
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
Analysis pass providing the TargetTransformInfo.
A Use represents the edge between a Value definition and its users.
LLVM Value Representation.
iterator_range< user_iterator > users()
This class implements an extremely fast bulk output stream that can only output to a stream.
NodeAddr< InstrNode * > Instr
This is an optimization pass for GlobalISel generic memory operations.
GenericUniformityInfo< SSAContext > UniformityInfo
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr, unsigned DynamicVGPRBlockSize=0)
GenericSSAContext< Function > SSAContext
decltype(auto) dyn_cast(const From &Val)
dyn_cast<X> - Return the argument parameter cast to the specified type.
decltype(auto) cast(const From &Val)
cast<X> - Return the argument parameter cast to the specified type.
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
A special type used by analysis passes to provide an address that identifies that particular analysis...