[PATCH] D65141: [DivergenceAnalysis] Add methods for querying divergence at use

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 06:48:46 PDT 2019


foad created this revision.
foad added reviewers: alex-t, nhaehnle, arsenm, rtaylor, rampitec, simoll, jingyue.
Herald added subscribers: hiraditya, wdng, jvesely.
Herald added a project: LLVM.

The existing isDivergent(Value) methods query whether a value is
divergent at its definition. However even if a value is uniform at its
definition, a use of it in another basic block can be divergent because
of divergent control flow between the def and the use.

This patch adds new isDivergent(Use) methods to DivergenceAnalysis,
LegacyDivergenceAnalysis and GPUDivergenceAnalysis.

This might allow D63953 <https://reviews.llvm.org/D63953> or other similar workarounds to be removed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D65141

Files:
  llvm/include/llvm/Analysis/DivergenceAnalysis.h
  llvm/include/llvm/Analysis/LegacyDivergenceAnalysis.h
  llvm/lib/Analysis/DivergenceAnalysis.cpp
  llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp
  llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65141.211284.patch
Type: text/x-patch
Size: 8432 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190723/6d93bfe8/attachment.bin>


More information about the llvm-commits mailing list