[llvm] [UniformityAnalysis] Track uniform values for conservative divergence queries at IR level (PR #180509)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 18 04:16:04 PST 2026
================
@@ -417,6 +434,10 @@ template <typename ContextT> class GenericUniformityAnalysisImpl {
DenseSet<ConstValueRefT> DivergentValues;
SmallPtrSet<const BlockT *, 32> DivergentTermBlocks;
+ // Known uniform values (populated after analysis by finalizeUniformValues).
+ // Values NOT in this set are conservatively treated as divergent.
+ DenseSet<ConstValueRefT> UniformValues;
----------------
jmmartinez wrote:
> What i feel would be more convenient as of now is: "Use CallbackVH for the IR case." It keeps the current "unknown = divergent" behavior safe against address reuse? Full mutable uniformity info for the reason of divergence propagation will require more effort that can be planned later.
I agree. Sounds like a step in the right direction.
https://github.com/llvm/llvm-project/pull/180509
More information about the llvm-commits
mailing list