Tom de Vries <[email protected]> writes:
> Do you have a moment to give a second look to a gimple CFG optimization? The
> optimization removes duplicate basic blocks and reduces code size by 1-2%.
>
> The latest patch is posted at
> http://gcc.gnu.org/ml/gcc-patches/2011-08/msg01602.html.
I'm not really the best person to look at this patch, since it applies
to areas of the compiler with which I am less familiar.. However, since
you ask, I did read through the patch, and it looks OK to me. Since
Richi OK'ed it, this patch is OK with the following changes.
> +typedef struct same_succ *same_succ_t;
> +typedef const struct same_succ *const_same_succ_t;
Don't name new types ending with "_t". POSIX reserves names ending with
"_t" when <sys/types.h> is #included. Name these something else.
> +typedef struct bb_cluster *bb_cluster_t;
> +typedef const struct bb_cluster *const_bb_cluster_t;
Same here.
> +@item -ftree-tail-merge
> +Merges identical blocks with same successors. This flag is enabled by
> default
> +at @option{-O2} and higher. The run time of this pass can be limited using
> +@option{max-tail-merge-comparisons} parameter.
I think this text can be improved to be more meaningful to compiler
users. I suggest something like:
Look for identical code sequences. When found, replace one with a
jump to the other. This optimization is known as tail merging or
cross jumping. This flag is enabled [now same as above]
Thanks.
Ian