[PATCH] D62888: [NewPM] Port Sancov
Leonard Chan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 4 19:36:25 PDT 2019
leonardchan created this revision.
leonardchan added reviewers: fedor.sergeev, philip.pfaffe, chandlerc.
leonardchan added a project: clang.
Herald added subscribers: hiraditya, eraman.
Herald added a project: LLVM.
This patch contains a port of SanitizerCoverage to the new pass manager. This one's a bit hefty.
Changes:
- Split `SanitizerCoverageModule` into 2 `SanitizerCoverage` for passing over functions and `ModuleSanitizerCoverage` for passing over modules.
- `ModuleSanitizerCoverage` exists for adding 2 module level calls to initialization functions but only if there's a function that was instrumented by sancov. This uses `SanitizerCoverageFunctionCheck[Legacy]Pass`, a function analysis that just checks if there's a function that can be instrumented.
- An alternative to this analysis could just be to iterate over the functions in `ModuleSanitizerCoverage`, but I'm not sure if that's more correct than another function analysis.
- Added legacy and new PM wrapper classes that own instances of the 2 new classes.
- Update llvm tests and add clang tests,
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D62888
Files:
clang/lib/CodeGen/BackendUtil.cpp
clang/test/CodeGen/sancov-new-pm.c
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/Transforms/Instrumentation.h
llvm/include/llvm/Transforms/Instrumentation/SanitizerCoverage.h
llvm/lib/Passes/PassBuilder.cpp
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
llvm/test/Instrumentation/SanitizerCoverage/abort-in-entry-block.ll
llvm/test/Instrumentation/SanitizerCoverage/backedge-pruning.ll
llvm/test/Instrumentation/SanitizerCoverage/chains.ll
llvm/test/Instrumentation/SanitizerCoverage/cmp-tracing-api-x86_32.ll
llvm/test/Instrumentation/SanitizerCoverage/cmp-tracing-api-x86_64.ll
llvm/test/Instrumentation/SanitizerCoverage/cmp-tracing.ll
llvm/test/Instrumentation/SanitizerCoverage/coff-comdat.ll
llvm/test/Instrumentation/SanitizerCoverage/coff-pc-table-inline-8bit-counters.ll
llvm/test/Instrumentation/SanitizerCoverage/coff-used-ctor.ll
llvm/test/Instrumentation/SanitizerCoverage/const-cmp-tracing.ll
llvm/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll
llvm/test/Instrumentation/SanitizerCoverage/coverage.ll
llvm/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll
llvm/test/Instrumentation/SanitizerCoverage/div-tracing.ll
llvm/test/Instrumentation/SanitizerCoverage/gep-tracing.ll
llvm/test/Instrumentation/SanitizerCoverage/inline-8bit-counters.ll
llvm/test/Instrumentation/SanitizerCoverage/interposable-symbol-nocomdat.ll
llvm/test/Instrumentation/SanitizerCoverage/no-func.ll
llvm/test/Instrumentation/SanitizerCoverage/pc-table.ll
llvm/test/Instrumentation/SanitizerCoverage/postdominator_check.ll
llvm/test/Instrumentation/SanitizerCoverage/seh.ll
llvm/test/Instrumentation/SanitizerCoverage/stack-depth-variable-declared-by-user.ll
llvm/test/Instrumentation/SanitizerCoverage/stack-depth.ll
llvm/test/Instrumentation/SanitizerCoverage/switch-tracing.ll
llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard-comdat.ll
llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard-inline-8bit-counters.ll
llvm/test/Instrumentation/SanitizerCoverage/trace-pc-guard-nocomdat.ll
llvm/test/Instrumentation/SanitizerCoverage/tracing-comdat.ll
llvm/test/Instrumentation/SanitizerCoverage/tracing.ll
llvm/test/Instrumentation/SanitizerCoverage/unreachable-critedge.ll
llvm/test/Instrumentation/SanitizerCoverage/wineh.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62888.203059.patch
Type: text/x-patch
Size: 68839 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190605/10f9c064/attachment-0001.bin>
More information about the llvm-commits
mailing list