[CodeGen] Add print and verify pass after each MachineFunctionPass by default
authorMatthias Braun <matze@braunis.de>
Thu, 11 Dec 2014 21:26:47 +0000 (21:26 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 11 Dec 2014 21:26:47 +0000 (21:26 +0000)
commit5b17297b3d660bef87cc25a9a68adf1a7f6efa17
treed40e39b128285e324ca82405d89c92472e97cbf0
parent966942da9e68b59c31ce770e7f94c55a63482c6b
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224059 91177308-0d34-0410-b5e6-96231b3b80d8
14 files changed:
include/llvm/CodeGen/Passes.h
lib/CodeGen/Passes.cpp
lib/Target/AArch64/AArch64TargetMachine.cpp
lib/Target/ARM/ARMTargetMachine.cpp
lib/Target/Hexagon/HexagonTargetMachine.cpp
lib/Target/MSP430/MSP430TargetMachine.cpp
lib/Target/Mips/MipsTargetMachine.cpp
lib/Target/NVPTX/NVPTXTargetMachine.cpp
lib/Target/PowerPC/PPCTargetMachine.cpp
lib/Target/R600/AMDGPUTargetMachine.cpp
lib/Target/Sparc/SparcTargetMachine.cpp
lib/Target/SystemZ/SystemZTargetMachine.cpp
lib/Target/X86/X86TargetMachine.cpp
lib/Target/XCore/XCoreTargetMachine.cpp