Skip to content

cmd/compile: add CFG graphs to ssa.html #28177

@ysmolski

Description

@ysmolski

@josharian has abandoned the effort in CL 43464, but I am reviving the issue here because I think there is a value and a possibility to make it happen.

Here I propose to discuss how you would specify phases with CFG created for them in ssa.html.

In my tests I used simple regexp, but I want to make it easier to use. This is how it looks right now:

% GOSSAFUNC=f:schedule-layout go build
SVG schedule
SVG layout
dumped SSA to /Users/.../ssa.html
% GOSSAFUNC=f:layout,critical go build
SVG critical
SVG layout
dumped SSA to /Users/.../ssa.html

It's not good. What about using ranges:

* -> all phases
lower -> just this one
branchelim-writebarrier -> branchelim, fuse, dse and writebarrier
a-b,d-e -> everything in between those ranges

It should reduce the time needed to generate ssa.html. Generating CFGs for two phases is almost instant.

@randall77 @josharian @dr2chase

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions