I have questions about some modifications I want to make to SanitizerCoverage for a personal project. My end goal is to apply a more “sparse” CFG-aware instrumentation policy – basically leveraging Tikir’s dominator tree-based algorithm – but I’m sure how to go about implementing it. I’ve noticed that existing implementations (e.g., INSTRIM) don’t appear to be compatible with SanitizerCoverage, presumably due to overriding SanCov’s own CFG coloring policy.
My understanding is that I’ll need to implement my own copy of SanitizerCoverage.cpp containing my CFG coloring modifications. Based on this older version (https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/Instrumentation/SanitizerCoverage.cpp#L567) I’m guessing
ModuleSanitizerCoverage::instrumentFunction is probably where I’d want to add my changes?
Thanks in advance for any advice / clarification.