[ping] C++ fixes in the controll flow graph (cfg*)

Thomas Neumann tneumann@users.sourceforge.net
Mon Jun 4 19:40:00 GMT 2007


> I have moved struct edge to graphds.h in a recent patch, so this part
> needs to be slightly changed.  I would recommend renaming struct edge to
> something like struct graph_edge (instead of struct cfg_edge), since the
> graphs represented using graphds.h do not necessarily have to be related
> to cfg.
Like this? Tested on x86_64.

Thomas

* cfg.c (init_flow): Use type safe memory macros.
(alloc_block): Likewise.
(unchecked_make_edge): Likewise:
(dump_flow_info): Avoid using C++ keywords as variable names.
(copy_original_table_clear): Cast according to the coding conventions.
(copy_original_table_set): Likewise.
* cfgexpand (label_rtx_for_bb): Likewise.
(expand_gimüle_basic_block): Likewise.
* cfghooks.c (dump_bb): Likewise.
(lv_adjust_loop_header_phi): Avoid using C++ keywords as variable names.
(lv_add_condition_to_bb): Likewise.
* cfglayout (relink_block_chain): Cast according to the coding conventions.
(fixup_reorder_chain): Likewise.
(fixup_fallthru_exit_predecessor): Likewise.
* cfgloop.c (glb_enum_p): Likewise.
(get_exit_description): Likewise.
(dump_recorded_exit): Likewise.
* cfgloop.h (enum loop_estimation): Move out of struct scope...
(struct loop): ... from here.
* cfgloopmanip (rpe_enum_p): Cast according to the coding conventions.
* cfgrtl.c (rtl_create_basic_block): Likewise.
(rtl_split_block): Likewise.
(rtl_dump_bb): Likewise.
(cfg_layout_split_block): Likewise.
(init_rtl_bb_info): Use typesafe memory macros.

* graphds.h (struct graph_edge): Renamed edge to graph_edge.
* graphds.h graphds.c cfgloopanal.c: Updated all usages of edge to
graph_edge.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfg2.patch
Type: text/x-diff
Size: 17495 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070604/f378fa8e/attachment.bin>


More information about the Gcc-patches mailing list