[PATCH] D21005: Add a -verify-after-all option

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Sun Jun 5 18:10:25 PDT 2016


davide added a comment.

This is very good. In fact, I have a patch that accomplish exactly the same locally (but I was always too lazy to upstream it).  In my patch, I just used -verify-after, and I have preference for that as it's shorter, but I don't want to start a bike shed here, so up to you.

In http://reviews.llvm.org/D21005#449389, @sanjoy wrote:

> This patch isn't quite right as is -- it breaks out of a loop pass manager, i.e. if I had e.g. `-indvars -loop-rotate` now I will have `-indvars < verify function > -loop-rotate` with the `< verify function >` in the middle running outside the LoopPass; and the `-loop-rotate` and `-indvars` running in different loop pass managers when earlier they'd run in the same loop pass manager.  I think this can be quite misleading since it will change the optimizations that fire when `-verify-after-all` is enabled.
>
> I think I'll have to have something like `createPrinterPass` so that the above does not happen.


I just used this for function passes so I never noticed the problem, but yes, I agree it can happen.
Can you please elaborate on how you plan to use `createPrinterPass` ?


http://reviews.llvm.org/D21005





More information about the llvm-commits mailing list