[PATCH] D50433: A New Divergence Analysis for LLVM
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 23 02:59:40 PDT 2018
arsenm added inline comments.
================
Comment at: lib/Analysis/DivergenceAnalysis.cpp:398-399
+ bool divergentUpd = false;
+ if (isa<PHINode>(I)) {
+ divergentUpd = updatePHINode(cast<PHINode>(I));
+ } else {
----------------
dyn_cast instead of separate isa and cast
================
Comment at: lib/Analysis/DivergenceAnalysis.cpp:426
+ if (divergentValues.count(&I))
+ OS << "DIVERGENT:" << I << "\n";
+ }
----------------
single quotes
================
Comment at: lib/Analysis/LegacyDivergenceAnalysis.cpp:85
+static cl::opt<bool> UseGPUDA(
+ "use-gpu-da", cl::init(false), cl::Hidden,
+ cl::desc(
----------------
Longer, more descriptive hook name would be helpful. -use-gpu-divergence-analysis/
================
Comment at: lib/Analysis/SyncDependenceAnalysis.cpp:326-329
+ assert((defMap[exitBlock] != nullptr) &&
+ "no reaching def at loop exit");
+ if (defMap[exitBlock] != headerDefBlock) {
+ joinBlocks->insert(exitBlock);
----------------
Use .find() instead of [] twice?
Repository:
rL LLVM
https://reviews.llvm.org/D50433
More information about the llvm-commits
mailing list