HomePhabricator

Make TargetPassConfig and llc add pre/post passes the same way. NFC

Authored by dsanders on Apr 8 2020, 1:43 PM.

Description

Make TargetPassConfig and llc add pre/post passes the same way. NFC

Summary:
At the moment, any changes we make to the passes that can be
injected before/after others (e.g. -verify-machineinstrs and
-print-after-all) have to be duplicated in both
TargetPassConfig (for normal execution, -start-before/
-stop-before/etc) and llc (for -run-pass). Unify this pass
injection into addMachinePrePass/addMachinePostPass that both
TargetPassConfig and llc can use.

Reviewers: vsk, aprantl, bogner

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77887

Details