[PATCH] D80692: Run Coverage pass before other *San passes under new pass manager, round 2

Arthur Eubanks via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 27 23:57:58 PDT 2020


aeubanks created this revision.
Herald added subscribers: llvm-commits, cfe-commits, hiraditya.
Herald added projects: clang, LLVM.
aeubanks added reviewers: vitalybuka, leonardchan.

This was attempted once before in https://reviews.llvm.org/D79698, but
was reverted due to the coverage pass running in the wrong part of the
pipeline. This commit puts it in the same place as the other sanitizers.

This changes PassBuilder.OptimizerLastEPCallbacks to work on a
ModulePassManager instead of a FunctionPassManager. That is because
SanitizerCoverage cannot (easily) be split into a module pass and a
function pass like some of the other sanitizers since in its current
implementation it conditionally inserts module constructors based on
whether or not it successfully modified functions.

This fixes compiler-rt/test/msan/coverage-levels.cpp under the new pass
manager (last check-msan test).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D80692

Files:
  clang/lib/CodeGen/BackendUtil.cpp
  llvm/include/llvm/Passes/PassBuilder.h
  llvm/lib/Passes/PassBuilder.cpp
  llvm/tools/opt/NewPMDriver.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80692.266753.patch
Type: text/x-patch
Size: 7319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200528/c82f0f54/attachment.bin>


More information about the cfe-commits mailing list