[PATCH] D141355: [AMDGPU] Add NewPM support to AMDGPUUnifyDivergentExitNodes pass
Sameer Sahasrabuddhe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 22 23:29:48 PST 2023
sameerds added a comment.
At this point, there are three analyses as follows:
1. LegacyDA is actually wrong, but useful in some cases involving irreducible control flow.
2. GpuDA is correct, but treats irreducible control flow very conservatively.
3. UniformityAnalysis is both correct and better at irreducible control flow.
Note that in almost every use on AMDGPU, LegacyDA simply acts as a wrapper for GpuDA.
Since this is fresh work, why not just go straight to UniformityAnalysis? I would definitely recommend that because not only does go straight to new stuff, it also avoids the unnecessary template. This would be a good time to use the new analysis. And if issues crop up that can't be fixed, then we should fall back no further than GpuDA, and unify their exposed Info objects along the way.
================
Comment at: llvm/include/llvm/Analysis/DivergenceAnalysis.h:177
/// Whether \p V is uniform/non-divergent.
- bool isUniform(const Value &V) const { return !isDivergent(V); }
+ bool isUniform(const Value *V) const { return !isDivergent(*V); }
----------------
Why is this change necessary? The point of accepting a reference is to indicate that nullptr is not expected inside the function.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141355/new/
https://reviews.llvm.org/D141355
More information about the llvm-commits
mailing list