This is a preparatory patch for fixing the semantics of attribute
"convergent" in terms of sets of threads determined by divergent
control flow.
See https://reviews.llvm.org/D104504 for the latest discussion.
| Paths 
 |  Differential  D106859  
[Sink] allow sinking convergent operations across uniform branches AbandonedPublic Authored by sameerds on Jul 27 2021, 3:32 AM. 
Details 
Diff Detail 
 Event TimelineHerald added subscribers: kerbowa, hiraditya, nhaehnle, jvesely.  ·  View Herald TranscriptJul 27 2021, 3:32 AM sameerds added reviewers: arsenm, nhaehnle, mehdi_amini, jlebar, tra, t-tye, b-sumner.Jul 27 2021, 3:37 AM 
 Comment Actions The change was rebased, which may produce a very noisy diff relative to Replaced the bool ContainsIrreducible with a new enum that is always 
 
 
 Comment Actions Replaced the full-fledged divergence analysis with a trivial Comment Actions Bump! 
 
Revision Contents 
 
 
Diff 364354 llvm/include/llvm/Analysis/DivergenceAnalysis.h
 llvm/include/llvm/Analysis/LegacyDivergenceAnalysis.h
 llvm/lib/Analysis/DivergenceAnalysis.cpp
 llvm/lib/Analysis/LegacyDivergenceAnalysis.cpp
 llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
 llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
 llvm/lib/Transforms/Scalar/Sink.cpp
 llvm/test/Analysis/DivergenceAnalysis/AMDGPU/irreducible.ll
 llvm/test/Transforms/LoopUnswitch/AMDGPU/divergent-unswitch.ll
 
 llvm/test/Transforms/LoopUnswitch/divergent.ll
 
 llvm/test/Transforms/Sink/convergent.ll | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
I think it would be less confusing to put the !DA check before the ContainsIrreducible check. I realise you have initialised ContainsIrreducible to false so that this still works, even for an "empty" analysis with no DA or LegacyDA, but that seems like a lie since we don't actually know whether the function constains irreducible regions or not.
I would hope for a structure like:
Same for the other functions below.