[doc] Fix typo in gty.texi

Richard Guenther richard.guenther@gmail.com
Thu Aug 23 10:36:00 GMT 2012


On Thu, Aug 23, 2012 at 12:28 PM, 陳韋任 (Wei-Ren Chen)
<chenwj@iis.sinica.edu.tw> wrote:
> Hi Richard,
>
>> +representation. So the CFG simultaneously consist of basic blocks
>> +containing RTL and GIMPLE trees.
>>
>> That last sentence is not correct, please remove it.  Ok with that change.
>
>   May I ask why the last sentence is not correct? (just want to know why)
> The comment of gimple_expand_cfg (gcc/cfgexpand.c) says,
>
>    ... snip ...
>
>    We do conversion per basic block and preserve/update the tree CFG.
>    This implies we have to do some magic as the CFG can simultaneously
>    consist of basic blocks containing RTL and GIMPLE trees.  This can
>
>    ... snip ...
>
> I guess I misunderstand what the comment says, but what "This implies we
> have to do some magic as the CFG can simultaneously consist of basic blocks
> containing RTL and GIMPLE trees." actually means? Would you like explain
> more? Thanks!

During the expansion itself we have a mix of basic-blocks that are in RTL
and GIMPLE form.  After expansion the CFG only contains RTL.  The
sentence as-is is at least misleading, suggesting that after expansion
we have both RTL and GIMPLE in the CFG.

So, on a second thought a more appropriate patch would be to just
remove the whole note:

 Note that at present, the representation of control flow in the
-@code{tree} representation is discarded before expanding to RTL@.
-Long term the CFG should be maintained and ``expanded'' to the
-RTL representation along with the function @code{tree} itself.

that's an implementation detail that is no longer true but saying it is
no longer true doesn't contain any useful information.

Richard.

> Regards,
> chenwj
>
> --
> Wei-Ren Chen (陳韋任)
> Computer Systems Lab, Institute of Information Science,
> Academia Sinica, Taiwan (R.O.C.)
> Tel:886-2-2788-3799 #1667
> Homepage: http://people.cs.nctu.edu.tw/~chenwj



More information about the Gcc-patches mailing list