[NFC][NewPM] Reuse PassBuilder callbacks with -O0
authorArthur Eubanks <aeubanks@google.com>
Thu, 5 Nov 2020 18:25:35 +0000 (10:25 -0800)
committerArthur Eubanks <aeubanks@google.com>
Thu, 12 Nov 2020 20:42:59 +0000 (12:42 -0800)
commit3a7b57b7cad32a4b59700e029d80a06c35f0a1a3
tree9fbe586f1971e552e3111bf89ace55f79ffcfc42
parent3c6b457bee0c66294637d50bca1cff7231647249
[NFC][NewPM] Reuse PassBuilder callbacks with -O0

This removes lots of duplicated code which was necessary before
https://reviews.llvm.org/D89158.
Now we can use PassBuilder::runRegisteredEPCallbacks().
This is mostly sanitizers.

There is likely more that can be done to simplify, but let's start with this.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D90870
clang/lib/CodeGen/BackendUtil.cpp