HomePhabricator

[CodeGen] Add print and verify pass after each MachineFunctionPass by default
Audit RequiredrL224059

Description

[CodeGen] Add print and verify pass after each MachineFunctionPass by default

Previously print+verify passes were added in a very unsystematic way, which is
annoying when debugging as you miss intermediate steps and allows bugs to stay
unnotice when no verification is performed.

To make this change practical I added the possibility to explicitely disable
verification. I used this option on all places where no verification was
performed previously (because alot of places actually don't pass the
MachineVerifier).
In the long term these problems should be fixed properly and verification
enabled after each pass. I'll enable some more verification in subsequent
commits.

This is the 2nd attempt at this after realizing that PassManager::add() may
actually delete the pass.

Details

Auditors
dsanders
Committed
matzeDec 11 2014, 1:26 PM
Parents
rL224058: LeakDetector: Simplify code and fix comments, NFC
Branches
Unknown
Tags
Unknown