+Click on a value or block to toggle highlighting of that value/block +and its uses. (Values and blocks are highlighted by ID, and IDs of +dead items may be reused, so not all highlights necessarily correspond +to the clicked item.) +
+ ++Faded out values and blocks are dead code that has not been eliminated. +
+ ++Values printed in italics have a dependency cycle. +
+ ++CFG: Dashed edge is for unlikely branches. Blue color is for backward edges. +Edge with a dot means that this edge follows the order in which blocks were laid out. +
+ +")
+ p := htmlFuncPrinter{w: buf}
+ fprintFunc(p, f)
+
+ // fprintFunc(&buf, f) // TODO: HTML, not text,
for line breaks, etc.
+ fmt.Fprint(buf, "
")
+ return buf.String()
+}
+
+type htmlFuncPrinter struct {
+ w io.Writer
+}
+
+func (p htmlFuncPrinter) startBlock(b *BasicBlock, reachable bool) {
+ var dead string
+ if !reachable {
+ dead = "dead-block"
+ }
+ fmt.Fprintf(p.w, "