diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-07 16:34:37 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-11-07 16:34:37 +0000 |
commit | 9b29bd055acdb31c5b88f4745e83889ebe9564eb (patch) | |
tree | 33eb1552401de9032f76941b218708537752d6c1 /gcc/df.h | |
parent | 24379640f8bdbbea63cd9b04ff33738342bd2090 (diff) | |
download | gcc-9b29bd055acdb31c5b88f4745e83889ebe9564eb.tar.gz |
2001-11-07 Daniel Berlin <dan@cgsoftware.com>
* Makefile.in (df.o): Add fibheap.h to dependencies.
* df.h: Add prototypes for transfer functions, iterative_dataflow
functions.
(enum df_flow_dir): New enum.
(enum df_confluence_op): New enum.
(struct df): Add inverse_rts_map.
* df.c: Add sbitmap.h to the list of includes.
(df_rd_global_compute): Removed.
(df_ru_global_compute): Removed.
(df_lr_global_compute): Removed.
(df_rd_transfer_function): New function.
(df_ru_transfer_function): New function.
(df_lr_transfer_function): New function.
(df_analyse_1): allocate/compute/free df->inverse_rts_map.
Use iterative_dataflow_bitmap instead of df_*_global_compute.
(iterative_dataflow_sbitmap): New function.
(iterative_dataflow_bitmap): New function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@46827 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/df.h')
-rw-r--r-- | gcc/df.h | 44 |
1 files changed, 38 insertions, 6 deletions
@@ -20,7 +20,6 @@ along with GCC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #define DF_RD 1 /* Reaching definitions. */ #define DF_RU 2 /* Reaching uses. */ #define DF_LR 4 /* Live registers. */ @@ -136,12 +135,15 @@ struct df bitmap insns_modified; /* Insns that (may) have changed. */ bitmap bbs_modified; /* Blocks that (may) have changed. */ bitmap all_blocks; /* All blocks in CFG. */ - /* The bitmap vector of dominators or NULL if not computed. + /* The sbitmap vector of dominators or NULL if not computed. Ideally, this should be a pointer to a CFG object. */ - bitmap *dom; - int * dfs_order; - int * rc_order; - int * rts_order; + sbitmap *dom; + int * dfs_order; /* DFS order -> block number */ + int * rc_order; /* reverse completion order -> block number */ + int * rts_order; /* reverse top sort order -> block number */ + int * inverse_rc_map; /* block number -> reverse completion order */ + int * inverse_dfs_map; /* block number -> DFS order */ + int * inverse_rts_map; /* block number -> reverse top-sort order */ }; @@ -297,3 +299,33 @@ extern void debug_df_ref PARAMS ((struct ref *)); extern void debug_df_chain PARAMS ((struct df_link *)); extern void df_insn_debug PARAMS ((struct df *, rtx, FILE *)); extern void df_insn_debug_regno PARAMS ((struct df *, rtx, FILE *)); +/* Meet over any path (UNION) or meet over all paths (INTERSECTION) */ +enum df_confluence_op + { + UNION, + INTERSECTION + }; +/* Dataflow direction */ +enum df_flow_dir + { + FORWARD, + BACKWARD + }; + +typedef void (*transfer_function_sbitmap) (int, int *, sbitmap, sbitmap, + sbitmap, sbitmap, void *); +typedef void (*transfer_function_bitmap) (int, int *, bitmap, bitmap, + bitmap, bitmap, void *); + +extern void iterative_dataflow_sbitmap PARAMS ((sbitmap *, sbitmap *, + sbitmap *, sbitmap *, + bitmap, enum df_flow_dir, + enum df_confluence_op, + transfer_function_sbitmap, + int *, void *)); +extern void iterative_dataflow_bitmap PARAMS ((bitmap *, bitmap *, bitmap *, + bitmap *, bitmap, + enum df_flow_dir, + enum df_confluence_op, + transfer_function_bitmap, + int *, void *)); |