24 return isDivergent((
const Value *)&
I);
30 return markDivergent(&Instr);
38 addUniformOverride(
I);
40 for (
auto &
Arg :
F.args()) {
50 for (
const auto *
User : V->users()) {
51 if (
const auto *UserInstr = dyn_cast<const Instruction>(
User)) {
52 if (markDivergent(*UserInstr)) {
53 Worklist.push_back(UserInstr);
62 assert(!isAlwaysUniform(Instr));
65 pushUsers(cast<Value>(&Instr));
72 for (
const Use &U :
I.operands()) {
73 if (
auto *
I = dyn_cast<Instruction>(&U)) {
84 const auto *V = U.get();
87 if (
const auto *DefInstr = dyn_cast<Instruction>(V)) {
88 const auto *UseInstr = cast<Instruction>(U.getUser());
89 return isTemporalDivergent(*UseInstr->getParent(), *DefInstr);
119 OS <<
"UniformityInfo for function '" <<
F.getName() <<
"':\n";
136 "Uniformity Analysis",
true,
true)
144 AU.setPreservesAll();
151 auto &cycleInfo = getAnalysis<CycleInfoWrapperPass>().getResult();
152 auto &domTree = getAnalysis<DominatorTreeWrapperPass>().getDomTree();
153 auto &targetTransformInfo =
154 getAnalysis<TargetTransformInfoWrapperPass>().getTTI(
F);
163 OS <<
"UniformityInfo for function '" << m_function->
getName() <<
"':\n";
168 m_function =
nullptr;
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
block Block Frequency Analysis
This file contains the declarations for the subclasses of Constant, which represent the different fla...
This file declares an analysis pass that computes CycleInfo for LLVM IR, specialized from GenericCycl...
print must be executed print the must be executed context for all instructions
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)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
A container for analyses that lazily runs them and caches their results.
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.
FunctionPass class - This class is used to implement most global optimizations.
A possibly irreducible generalization of a Loop.
bool contains(const BlockT *Block) const
Return whether Block is contained in the cycle.
bool isTerminator() const
A Module instance is used to store all the information related to an LLVM module.
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
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.
StringRef getName() const
Return a constant reference to the value's name.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
Printable print(const GCNRegPressure &RP, const GCNSubtarget *ST=nullptr)
void initializeUniformityInfoWrapperPassPass(PassRegistry &)
A special type used by analysis passes to provide an address that identifies that particular analysis...