[NewPM] Don't error when there's an unrecognized pass name
authorArthur Eubanks <aeubanks@google.com>
Fri, 8 Jan 2021 04:20:46 +0000 (20:20 -0800)
committerArthur Eubanks <aeubanks@google.com>
Fri, 8 Jan 2021 06:33:32 +0000 (22:33 -0800)
commit69cf7350628ace9de0908a51b770ecf3ee292848
tree9421350f02a0e0fd82afc7beae72632739c8bc95
parent0ebc1fb29f278db0665423f15c53e6ee9601dddb
[NewPM] Don't error when there's an unrecognized pass name

This currently blocks --print-before/after with a legacy PM pass, for
example when we use the new PM for the optimization pipeline but the
legacy PM for the codegen pipeline. Also in the future when the codegen
pipeline works with the new PM there will be multiple places to specify
passes, so even when everything is using the new PM, there will still be
multiple places that can accept different pass names.

Reviewed By: hoy, ychen

Differential Revision: https://reviews.llvm.org/D94283
llvm/include/llvm/IR/PassInstrumentation.h
llvm/lib/IR/PassInstrumentation.cpp
llvm/lib/Passes/PassBuilder.cpp
llvm/test/Other/print-before-after.ll