[NewPM] Introduce PreserveCFG check
authorYevgeny Rouban <yrouban@azul.com>
Fri, 11 Sep 2020 05:55:24 +0000 (12:55 +0700)
committerYevgeny Rouban <yrouban@azul.com>
Fri, 11 Sep 2020 07:32:21 +0000 (14:32 +0700)
commit28012e00d80b994ef0709377da15e2b25e6c0b72
treed3bf6359bfa70107f023346bdbfb246390831919
parent1308bb99e06752ab0b5175c92da31083f91af921
[NewPM] Introduce PreserveCFG check

Check that all passes, which report they preserve CFG,
are really preserving CFG.
A new standard instrumentation is introduced. It can be
switched on/off by the flag verify-cfg-preserved, which
is on by default for debug builds.

Reviewers: kuhar, fedor.sergeev

Differential Revision: https://reviews.llvm.org/D81558
llvm/include/llvm/Passes/StandardInstrumentations.h
llvm/lib/Passes/StandardInstrumentations.cpp