The vectoriser's debug log prints VPlan digraphs, but it's a bit
cumbersome to extract them and render them into PNG images. This script
does exactly that, being careful enough to extract all individual plans,
name them appropriately and save in either .dot or .png files.
Usage:
$ $LLVM_SRC/utils/extract_vplan.py < debug.log Exporting VF1UF1 to DOT: VPlanVF1UF1.dot Exporting VF24UF1 to DOT: VPlanVF24UF1.dot $ $LLVM_SRC/utils/extract_vplan.py --png < debug.log Exporting VF1UF1 to PNG via dot: VPlanVF1UF1.png Exporting VF24UF1 to PNG via dot: VPlanVF24UF1.png
My python regex knowledge is a bit rusty, but I think it might be possible to simplify this a bit by having a multi line regex, something like pattern = re.compile(r"(digraph VPlan {.*})",re.DOTALL)
I am curious now and will give that a try.