[PATCH] D151986: UniformityAnalysis: Skip computation with no branch divergence

Yashwant Singh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 5 04:48:55 PDT 2023


yassingh added inline comments.


================
Comment at: llvm/lib/CodeGen/MachineUniformityAnalysis.cpp:223
   auto &CI = getAnalysis<MachineCycleInfoWrapperPass>().getCycleInfo();
-  UI = computeMachineUniformityInfo(MF, CI, DomTree);
+  // FIXME: Query TTI::hasBranchDivergence. -run-pass seems to end up with a
+  // default NoTTI
----------------
Can this issue be related to the compiler's inability to construct a Target object when the target is specified using "-march"? This was causing UA to produce incorrect results. https://godbolt.org/z/hqeGovefe


================
Comment at: llvm/lib/CodeGen/MachineUniformityAnalysis.cpp:225
+  // default NoTTI
+  UI = computeMachineUniformityInfo(MF, CI, DomTree, true);
   return false;
----------------
sameerds wrote:
> Perhaps this magic constant "true" can be the result of calling NoTTI::hasBranchDivergence()?
That will return false I think.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D151986/new/

https://reviews.llvm.org/D151986



More information about the llvm-commits mailing list