[llvm] [LV][NFC] Print VPlan's transformation pipline (PR #72665)

Kolya Panchenko via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 16:47:35 PST 2023


nikolaypanchenko wrote:

> Thanks for working on this functionality, should be very helpful in the future.
> 
> I think it would be good to have a generic way to register a pass to run, so we have a single place to add the print statements. Eg have a RUN_PASS macro or helper function that takes the function to run plus a name perhaps (or just uses the function name).
> 
> Not sure about tying this to debug output, as this potentially adds a lot of output. It might be better to have this controlled by a separate -vplan-print-before-all? Or even better to update all transforms to indicate whether they made changes and have a more compact -vplan-print-before-changed



> Thanks for working on this functionality, should be very helpful in the future.
> 
> I think it would be good to have a generic way to register a pass to run, so we have a single place to add the print statements. Eg have a RUN_PASS macro or helper function that takes the function to run plus a name perhaps (or just uses the function name).

Sure, I can build VPlanPass and VPlanPassManager. At this point they don't need to be as advanced as LLVM's or MLIR's pass/passmanager, but they can evolve later

> Not sure about tying this to debug output, as this potentially adds a lot of output. It might be better to have this controlled by a separate -vplan-print-before-all? Or even better to update all transforms to indicate whether they made changes and have a more compact -vplan-print-before-changed

I was thinking about that too and tried to minimize changes and impact on a `loop-vectorize` debug output, so with the changeset extra output will only appear with `vplan-xforms` debug type.

https://github.com/llvm/llvm-project/pull/72665


More information about the llvm-commits mailing list