This is an archive of the discontinued LLVM Phabricator instance.

[sancov] do not instrument nodes that are full pre-dominators
ClosedPublic

Authored by aizatsky on Mar 21 2016, 4:11 PM.

Details

Summary

Without tree pruning clang has 2,667,552 points.
Wiht only dominators pruning: 1,515,586.
With both dominators & predominators pruning: 1,340,534.

Resubmit of r262103.

Diff Detail

Event Timeline

aizatsky updated this revision to Diff 51241.Mar 21 2016, 4:11 PM
aizatsky retitled this revision from to [sancov] do not instrument nodes that are full pre-dominators.
aizatsky updated this object.
aizatsky added a subscriber: Restricted Project.
aizatsky edited subscribers, added: llvm-commits; removed: Restricted Project.
This revision was automatically updated to reflect the committed changes.
vitalybuka added inline comments.Mar 21 2016, 4:45 PM
lib/Transforms/Instrumentation/SanitizerCoverage.cpp
324

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;