[PATCH] D18341: [sancov] do not instrument nodes that are full pre-dominators
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 21 16:45:13 PDT 2016
vitalybuka added inline comments.
================
Comment at: lib/Transforms/Instrumentation/SanitizerCoverage.cpp:324
@@ -325,2 +323,3 @@
// Check if BB dominates all its successors.
+ bool DominatesAll = succ_begin(BB) != succ_end(BB);
for (const BasicBlock *SUCC : make_range(succ_begin(BB), succ_end(BB))) {
----------------
Maybe inverse logic is be more clear:
bool NotDominatesAll = false;
for (const BasicBlock *SUCC : make_range(succ_begin(BB), succ_end(BB))) {
NotDominatesAll |= !DT->dominates(BB, SUCC);
# not sure if it's worth of breaking immediately when you flip the flag.
}
bool NotPreDominatesAll = false;
...
return NotDominatesAll && NotPreDominatesAll;
Repository:
rL LLVM
http://reviews.llvm.org/D18341
More information about the llvm-commits
mailing list