[PATCH] D50433: A New Divergence Analysis for LLVM

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 05:51:19 PDT 2018


arsenm added inline comments.


================
Comment at: lib/Analysis/DivergenceAnalysis.cpp:106
+  assert(isa<Instruction>(divVal) || isa<Argument>(divVal));
+  assert(!isAlwaysUniform(divVal) && "can not be a divergent");
+  divergentValues.insert(&divVal);
----------------
Grammar in assert message


================
Comment at: lib/Analysis/DivergenceAnalysis.cpp:119-120
+    assert(branchInst->isConditional());
+    return isDivergent(*branchInst->getCondition());
+  } else if (auto *switchInst = dyn_cast<SwitchInst>(&term)) {
+    return isDivergent(*switchInst->getCondition());
----------------
No return after else


Repository:
  rL LLVM

https://reviews.llvm.org/D50433





More information about the llvm-commits mailing list