This patch adds a function to verify general properties of VPlans. The
first check makes sure that all phi-like recipes are at the beginning of
a block, with no other recipes in between.
Note that this currently may not hold for VPBlendRecipes at the moment,
as other recipes may be inserted before the VPBlendRecipe during mask
creation.
Note that this patch depends on D111300 and D111301, which fix code that
breaks the checked invariant.
The dump() method is not necessarily available, it is guarded by:
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
You should guard the calls to it in the same way.