Improve LegacyPassManager API to correctly report modified status
authorserge-sans-paille <sguelton@redhat.com>
Fri, 26 Jun 2020 11:07:31 +0000 (13:07 +0200)
committerserge-sans-paille <sguelton@redhat.com>
Fri, 26 Jun 2020 12:21:02 +0000 (14:21 +0200)
commit55fe7b79bb7fab49af3720840224c0720bdb03c6
treed2870aabfbbc4d9d18ab5bc79c37ad6b7cd41602
parentf0bab7875e78e01c149d12302dcc4b6d4c43e25c
Improve LegacyPassManager API to correctly report modified status

When calling on-the-fly passes from the legacy pass manager, the modification
status is not reported, which is a problem in case we depend on an acutal
transformation pass, and not only analyse.

Update the Legacy PM API to optionally report the changed status, assert if a
change is detected but this change is lost.

Related to https://reviews.llvm.org/D80916

Differential Revision: https://reviews.llvm.org/D81236
llvm/include/llvm/IR/LegacyPassManagers.h
llvm/include/llvm/Pass.h
llvm/include/llvm/PassAnalysisSupport.h
llvm/lib/IR/LegacyPassManager.cpp