PATCH: Lengauer/Tarjan version of dominator computing

Richard Henderson rth@cygnus.com
Thu Oct 5 13:13:00 GMT 2000


On Thu, Oct 05, 2000 at 04:46:20PM +0200, Michael Matz wrote:
> /* Type of Basic Block aka. TBB */
> #define TBB unsigned int

I'd prefer to use a proper typedef instead of the preprocessor.
That way the debugger knows about the thing.

> struct dom_info
> {
>   /* The parent of a node in the DFS tree.  */
>   TBB *dfs_parent;

I see a large number of arrays indexed by basic block number.
Are you aware of the `aux' field on the basic block structure?

Not a requirement, but I personally prefer to associate data
with a block by actually attaching it to the block instead of
indexing into an external array.  The reorder_block_def struct
in bb-reorder.c is an example of this.

Not indexing into an array would also let you not remap the
block numbers for entry and exit from ENTRY_BLOCK/EXIT_BLOCK,
which would be fractionally clearer.  But given that you only
deal with that in one place, it's not a big deal.


r~


More information about the Gcc-patches mailing list