Conversation
The Intermediate Representation section described '--dump-ir' with a line-by-line table that no longer matched the compiler: the table still showed 'call @fib, 1' and temporaries from an older numbering, and it never mentioned that the option emits two dumps, one before optimization and one after register allocation. Rewrite the section around tests/fib.c and split it in two. The control-flow half now carries a rendered figure, docs/fib-cfg.png, built from real '--dot' output by keeping the fib and main clusters and dropping the run-specific pointer values from the labels; the shell recipe that produced it is included, so the image can be regenerated. The prose walks fib block by block: the entry and exit blocks, the empty blocks that only forward a branch, and the push/call/retval shape of a call. It also says where a phi does appear, since fib itself needs none. The textual half is refreshed against current output and states what has already run when each dump is taken. That matters for reading them: inlining and phi unwinding precede the first dump, whose printer then elides the unwound copies and the SSA subscripts, so '--dot' is the only view showing either.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Intermediate Representation section described '--dump-ir' with a line-by-line table that no longer matched the compiler: the table still showed 'call @fib, 1' and temporaries from an older numbering, and it never mentioned that the option emits two dumps, one before optimization and one after register allocation.
Rewrite the section around tests/fib.c and split it in two. The control-flow half now carries a rendered figure, docs/fib-cfg.png, built from real '--dot' output by keeping the fib and main clusters and dropping the run-specific pointer values from the labels; the shell recipe that produced it is included, so the image can be regenerated. The prose walks fib block by block: the entry and exit blocks, the empty blocks that only forward a branch, and the push/call/retval shape of a call. It also says where a phi does appear, since fib itself needs none.
The textual half is refreshed against current output and states what has already run when each dump is taken. That matters for reading them: inlining and phi unwinding precede the first dump, whose printer then elides the unwound copies and the SSA subscripts, so '--dot' is the only view showing either.
Summary by cubic
Fixes the Intermediate Representation docs so they match the compiler's actual output: the old line-by-line table showed stale temporaries and a single dump, and the new text splits the section into control-flow graph and instruction dump halves, adds a rendered figure from real
--dotoutput, and states what has already run before each dump.Bug Fixes
docs/fib-cfg.pngand the shell recipe to regenerate it.--dump-iremits two dumps and that--dotis the only view showing phis and SSA subscripts.Written for commit 3058742. Summary will update on new commits.