Enable opt-bisect for the new pass manager
authorJosh Stone <jistone@redhat.com>
Mon, 9 Nov 2020 23:36:14 +0000 (15:36 -0800)
committerJosh Stone <jistone@redhat.com>
Mon, 9 Nov 2020 23:57:48 +0000 (15:57 -0800)
commit4463b73e790fdf8bdbb18ac4ae3432217215daa5
tree1d74727856a2af4f04f833073630a9488e06caeb
parentd1171bca963b437d3ec020b5600bd7b5290d0697
Enable opt-bisect for the new pass manager

This instruments a should-run-optional-pass callback using the existing
OptBisect class to decide if new passes should be skipped. Passes that
force isRequired never reach this at all, so they are not included in
"BISECT:" output nor its pass count.

The test case is resurrected from r267022, an early version of D19172
that had new pass manager support (later reverted and redone without).

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D87951
llvm/include/llvm/IR/OptBisect.h
llvm/include/llvm/Passes/StandardInstrumentations.h
llvm/lib/Passes/StandardInstrumentations.cpp
llvm/test/Other/opt-bisect-new-pass-manager.ll [new file with mode: 0644]