diff options
author | Jan Hubicka <jh@suse.cz> | 2010-06-12 14:45:26 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2010-06-12 12:45:26 +0000 |
commit | e285df089bcad4a781df123e7d85c351710a73c5 (patch) | |
tree | 8174ebfcbd7b40190073b7254d5a66e0387c7b54 /gcc/df.h | |
parent | 02d635a2f81e72f3ce3302abd54a2daf7941ae24 (diff) | |
download | gcc-e285df089bcad4a781df123e7d85c351710a73c5.zip gcc-e285df089bcad4a781df123e7d85c351710a73c5.tar.gz gcc-e285df089bcad4a781df123e7d85c351710a73c5.tar.bz2 |
df-core.c (df_clear_bb_info): New function.
* df-core.c (df_clear_bb_info): New function.
(df_set_blocks): bb_info is always allocated.
(df_get_bb_info): Use block_info_elt_size.
(df_set_bb_info): Likewise.
(df_compact_blocks): Update for new block_info.
(grow_bb_info): New function.
* df-problems.c (df_grow_bb_info): Move to df-core.c
(df_rd_set_bb_info): Remove.
(df_rd_free_bb_info): Do not free block pool.
(df_rd_alloc): Do not create pool, use check for
obstack presence instead of NULL pointer for new blocks.
(df_rd_free): DO not free alloc pool; clear block_info.
(problem_RD): Add size of block info structure.
(df_lr_set_bb_info): Remove.
(df_lr_free_bb_info): Do not free block pool.
(df_lr_alloc): Do not create pool, use check for
obstack presence instead of NULL pointer for new blocks.
(df_lr_free): DO not free alloc pool; clear block_info.
(problem_LR): Add size of block info structure.
(df_live_set_bb_info): Remove.
(df_live_free_bb_info): Do not free block pool.
(df_live_alloc): Do not create pool, use check for
obstack presence instead of NULL pointer for new blocks.
(df_live_free): DO not free alloc pool; clear block_info.
(problem_LIVE): Add size of block info structure.
(problem_CHAIN): Add size of block info structure.
(df_byte_lr_set_bb_info): Remove.
(df_byte_lr_free_bb_info): Do not free block pool.
(df_byte_lr_alloc): Do not create pool, use check for
obstack presence instead of NULL pointer for new blocks.
(df_byte_lr_free): DO not free alloc pool; clear block_info.
(problem_BYTE_LR): Add size of block info structure.
(problem_NOTE): Add size of block info structure.
(df_byte_MD_set_bb_info): Remove.
(df_byte_MD_free_bb_info): Do not free block pool.
(df_byte_MD_alloc): Do not create pool, use check for
obstack presence instead of NULL pointer for new blocks.
(df_byte_MD_free): DO not free alloc pool; clear block_info.
(problem_BD): Add size of block info structure.
* df-scan.c (df_scan_free_internal): Free block pool.
(df_scan_set_bb_info): Remove.
(df_scan_free_bb_info): Check for artificial_defs instead
of bb_info being non-NULL.
(df_scan_alloc): DO not create df_scan_block pool.
(problem_SCAN): Set size of block info.
(df_bb_refs_record): Do not allocate bb_info.
* df.h (df_problem): Add block_info_elt_size.
(struct dataflow): Change block_info to void *.
(df_scan_get_bb_info, df_rd_get_bb_info, df_lr_get_bb_info,
df_md_get_bb_info, df_live_get_bb_info, df_byte_lr_get_bb_info): Return
in-line structures.
From-SVN: r160660
Diffstat (limited to 'gcc/df.h')
-rw-r--r-- | gcc/df.h | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -277,6 +277,7 @@ struct df_problem { df_verify_solution_start verify_start_fun; df_verify_solution_end verify_end_fun; struct df_problem *dependent_problem; + unsigned int block_info_elt_size; /* The timevar id associated with this pass. */ timevar_id_t tv_id; @@ -294,7 +295,7 @@ struct dataflow /* Array indexed by bb->index, that contains basic block problem and solution specific information. */ - void **block_info; + void *block_info; unsigned int block_info_size; /* The pool to allocate the block_info from. */ @@ -1037,7 +1038,7 @@ static inline struct df_scan_bb_info * df_scan_get_bb_info (unsigned int index) { if (index < df_scan->block_info_size) - return (struct df_scan_bb_info *) df_scan->block_info[index]; + return &((struct df_scan_bb_info *) df_scan->block_info)[index]; else return NULL; } @@ -1046,7 +1047,7 @@ static inline struct df_rd_bb_info * df_rd_get_bb_info (unsigned int index) { if (index < df_rd->block_info_size) - return (struct df_rd_bb_info *) df_rd->block_info[index]; + return &((struct df_rd_bb_info *) df_rd->block_info)[index]; else return NULL; } @@ -1055,7 +1056,7 @@ static inline struct df_lr_bb_info * df_lr_get_bb_info (unsigned int index) { if (index < df_lr->block_info_size) - return (struct df_lr_bb_info *) df_lr->block_info[index]; + return &((struct df_lr_bb_info *) df_lr->block_info)[index]; else return NULL; } @@ -1064,7 +1065,7 @@ static inline struct df_md_bb_info * df_md_get_bb_info (unsigned int index) { if (index < df_md->block_info_size) - return (struct df_md_bb_info *) df_md->block_info[index]; + return &((struct df_md_bb_info *) df_md->block_info)[index]; else return NULL; } @@ -1073,7 +1074,7 @@ static inline struct df_live_bb_info * df_live_get_bb_info (unsigned int index) { if (index < df_live->block_info_size) - return (struct df_live_bb_info *) df_live->block_info[index]; + return &((struct df_live_bb_info *) df_live->block_info)[index]; else return NULL; } @@ -1082,7 +1083,7 @@ static inline struct df_byte_lr_bb_info * df_byte_lr_get_bb_info (unsigned int index) { if (index < df_byte_lr->block_info_size) - return (struct df_byte_lr_bb_info *) df_byte_lr->block_info[index]; + return &((struct df_byte_lr_bb_info *) df_byte_lr->block_info)[index]; else return NULL; } |