From 5703af0d346088c0852c4e67d5fb764c7b2650ca Mon Sep 17 00:00:00 2001 From: kazu Date: Tue, 24 Feb 2004 13:55:06 +0000 Subject: [PATCH] * df.c, df.h, ra-build.c, ra-rewrite.c, ra.c, web.c: Replace df_analyse with df_analyze. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78363 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/df.c | 26 +++++++++++++------------- gcc/df.h | 2 +- gcc/ra-build.c | 2 +- gcc/ra-rewrite.c | 2 +- gcc/ra.c | 2 +- gcc/web.c | 2 +- 7 files changed, 23 insertions(+), 18 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd4942d..97217fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-02-24 Kazu Hirata + + * df.c, df.h, ra-build.c, ra-rewrite.c, ra.c, web.c: Replace + df_analyse with df_analyze. + 2004-02-24 Alan Modra * gcse.c (delete_null_pointer_checks_1): Set stop_insn to end, not diff --git a/gcc/df.c b/gcc/df.c index 686f27d..79dfa09 100644 --- a/gcc/df.c +++ b/gcc/df.c @@ -46,7 +46,7 @@ Here's an example of using the dataflow routines. df = df_init (); - df_analyse (df, 0, DF_ALL); + df_analyze (df, 0, DF_ALL); df_dump (df, DF_ALL, stderr); @@ -58,7 +58,7 @@ passed to all the dataflow routines. df_finish destroys this object and frees up any allocated memory. DF_ALL says to analyse everything. -df_analyse performs the following: +df_analyze performs the following: 1. Records defs and uses by scanning the insns in each basic block or by scanning the insns queued by df_insn_modify. @@ -83,7 +83,7 @@ deleted or created insn. If the dataflow information requires updating then all the changed, new, or deleted insns needs to be marked with df_insn_modify (or df_insns_modify) either directly or indirectly (say through calling df_insn_delete). df_insn_modify -marks all the modified insns to get processed the next time df_analyse +marks all the modified insns to get processed the next time df_analyze is called. Beware that tinkering with insns may invalidate the dataflow information. @@ -91,7 +91,7 @@ The philosophy behind these routines is that once the dataflow information has been gathered, the user should store what they require before they tinker with any insn. Once a reg is replaced, for example, then the reg-def/reg-use chains will point to the wrong place. Once a -whole lot of changes have been made, df_analyse can be called again +whole lot of changes have been made, df_analyze can be called again to update the dataflow information. Currently, this is not very smart with regard to propagating changes to the dataflow so it should not be called very often. @@ -128,7 +128,7 @@ When shadowing loop mems we create new uses and defs for new pseudos so we do not affect the existing dataflow information. My current strategy is to queue up all modified, created, or deleted -insns so when df_analyse is called we can easily determine all the new +insns so when df_analyze is called we can easily determine all the new or deleted refs. Currently the global dataflow information is recomputed from scratch but this could be propagated more efficiently. @@ -151,7 +151,7 @@ Similarly, should the first entry in the use list be the last use Often the whole CFG does not need to be analyzed, for example, when optimizing a loop, only certain registers are of interest. -Perhaps there should be a bitmap argument to df_analyse to specify +Perhaps there should be a bitmap argument to df_analyze to specify which registers should be analyzed? @@ -261,7 +261,7 @@ static int df_refs_queue (struct df *); static int df_refs_process (struct df *); static int df_bb_refs_update (struct df *, basic_block); static int df_refs_update (struct df *); -static void df_analyse_1 (struct df *, bitmap, int, int); +static void df_analyze_1 (struct df *, bitmap, int, int); static void df_insns_modify (struct df *, basic_block, rtx, rtx); static int df_rtx_mem_replace (rtx *, void *); @@ -1827,7 +1827,7 @@ df_luids_set (struct df *df, bitmap blocks) /* Perform dataflow analysis using existing DF structure for blocks within BLOCKS. If BLOCKS is zero, use all basic blocks in the CFG. */ static void -df_analyse_1 (struct df *df, bitmap blocks, int flags, int update) +df_analyze_1 (struct df *df, bitmap blocks, int flags, int update) { int aflags; int dflags; @@ -2169,7 +2169,7 @@ df_modified_p (struct df *df, bitmap blocks) BLOCKS, or for the whole CFG if BLOCKS is zero, or just for the modified blocks if BLOCKS is -1. */ int -df_analyse (struct df *df, bitmap blocks, int flags) +df_analyze (struct df *df, bitmap blocks, int flags) { int update; @@ -2190,7 +2190,7 @@ df_analyse (struct df *df, bitmap blocks, int flags) } /* Allocate and initialize data structures. */ df_alloc (df, max_reg_num ()); - df_analyse_1 (df, 0, flags, 0); + df_analyze_1 (df, 0, flags, 0); update = 1; } else @@ -2201,7 +2201,7 @@ df_analyse (struct df *df, bitmap blocks, int flags) if (! df->n_bbs) abort (); - df_analyse_1 (df, blocks, flags, 1); + df_analyze_1 (df, blocks, flags, 1); bitmap_zero (df->bbs_modified); bitmap_zero (df->insns_modified); } @@ -2400,7 +2400,7 @@ df_insn_mem_replace (struct df *df, basic_block bb, rtx insn, rtx mem, rtx reg) in INSN. REG should be a new pseudo so it won't affect the dataflow information that we currently have. We should add the new uses and defs to INSN and then recreate the chains - when df_analyse is called. */ + when df_analyze is called. */ return args.modified; } @@ -2660,7 +2660,7 @@ df_insn_move_before (struct df *df, basic_block bb, rtx insn, basic_block before are likely to be increased. */ /* ???? Perhaps all the insns moved should be stored on a list - which df_analyse removes when it recalculates data flow. */ + which df_analyze removes when it recalculates data flow. */ return emit_insn_before (insn, before_insn); } diff --git a/gcc/df.h b/gcc/df.h index 10d6c89..14aea52 100644 --- a/gcc/df.h +++ b/gcc/df.h @@ -233,7 +233,7 @@ struct df_map extern struct df *df_init (void); -extern int df_analyse (struct df *, bitmap, int); +extern int df_analyze (struct df *, bitmap, int); extern void df_finish (struct df *); diff --git a/gcc/ra-build.c b/gcc/ra-build.c index a305921..3e2da55 100644 --- a/gcc/ra-build.c +++ b/gcc/ra-build.c @@ -1402,7 +1402,7 @@ init_web_parts (struct df *df) num_webs++; } else - /* The last iteration might have left .ref set, while df_analyse() + /* The last iteration might have left .ref set, while df_analyze() removed that ref (due to a removed copy insn) from the df->defs[] array. As we don't check for that in realloc_web_parts() we do that here. */ diff --git a/gcc/ra-rewrite.c b/gcc/ra-rewrite.c index f604268..b0fed6c 100644 --- a/gcc/ra-rewrite.c +++ b/gcc/ra-rewrite.c @@ -1513,7 +1513,7 @@ detect_web_parts_to_rebuild (void) And because we sometimes delete insn referring to hardregs (when they became useless because they setup a rematerializable pseudo, which then was rematerialized), some of those uses will go away with the next - df_analyse(). This means we even _must_ delete those uses from + df_analyze(). This means we even _must_ delete those uses from the live_at_end[] bitmaps. For simplicity we simply delete all of them. */ for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) diff --git a/gcc/ra.c b/gcc/ra.c index 88aefb4..386541d 100644 --- a/gcc/ra.c +++ b/gcc/ra.c @@ -752,7 +752,7 @@ reg_alloc (void) /* First collect all the register refs and put them into chains per insn, and per regno. In later passes only update that info from the new and modified insns. */ - df_analyse (df, (ra_pass == 1) ? 0 : (bitmap) -1, + df_analyze (df, (ra_pass == 1) ? 0 : (bitmap) -1, DF_HARD_REGS | DF_RD_CHAIN | DF_RU_CHAIN | DF_FOR_REGALLOC); if ((debug_new_regalloc & DUMP_DF) != 0) diff --git a/gcc/web.c b/gcc/web.c index e846ee1..d20bcfb 100644 --- a/gcc/web.c +++ b/gcc/web.c @@ -265,7 +265,7 @@ web_main (void) rtx insn; df = df_init (); - df_analyse (df, 0, DF_UD_CHAIN | DF_EQUIV_NOTES); + df_analyze (df, 0, DF_UD_CHAIN | DF_EQUIV_NOTES); def_entry = (struct web_entry *) xcalloc (df->n_defs, sizeof (struct web_entry)); -- 2.7.4