diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-11-12 01:56:17 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-11-11 18:56:17 -0700 |
commit | bdc24974c8360fee22470bdf4f6bc78e44418562 (patch) | |
tree | 73a33be2feee2041af76fe35e753200b87fe8870 /gcc | |
parent | e55b279b6d572d32b0359dfe203a490a2cb9cf7f (diff) | |
download | gcc-bdc24974c8360fee22470bdf4f6bc78e44418562.zip gcc-bdc24974c8360fee22470bdf4f6bc78e44418562.tar.gz gcc-bdc24974c8360fee22470bdf4f6bc78e44418562.tar.bz2 |
global.c (global_conflicts): Update comments.
* global.c (global_conflicts): Update comments.
(record_conflicts): No need to record conflicts between pseudos here.
From-SVN: r30492
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/global.c | 33 |
2 files changed, 32 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4cedaf3..9dcb970 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Nov 11 18:54:24 1999 Jeffrey A Law (law@cygnus.com) + + * global.c (global_conflicts): Update comments. + (record_conflicts): No need to record conflicts between pseudos here. + Thu Nov 11 12:42:11 MST 1999 Diego Novillo <dnovillo@cygnus.com> * gcc/cp/init.c (init_init_processing): Header information for diff --git a/gcc/global.c b/gcc/global.c index de3b571..7e0074c 100644 --- a/gcc/global.c +++ b/gcc/global.c @@ -673,7 +673,8 @@ global_conflicts () /* Initialize table of registers currently live to the state at the beginning of this basic block. - This also marks the conflicts among them. + This also marks the conflicts among hard registers + and any allocnos that are live. For pseudo-regs, there is only one bit for each one no matter how many hard regs it occupies. @@ -702,9 +703,30 @@ global_conflicts () (a, PSEUDO_REGNO_MODE (i)); }); - /* Record that each allocno now live conflicts with each other - allocno now live, and with each hard reg now live. */ + /* Record that each allocno now live conflicts with each hard reg + now live. + It is not necessary to mark any conflicts between pseudos as + this point, even for pseudos which are live at the start of + the basic block. + + Given two pseudos X and Y and any point in the CFG P. + + On any path to point P where X and Y are live one of the + following conditions must be true: + + 1. X is live at some instruction on the path that + evaluates Y. + + 2. Y is live at some instruction on the path that + evaluates X. + + 3. Either X or Y is not evaluted on the path to P + (ie it is used uninitialized) and thus the + conflict can be ignored. + + In cases #1 and #2 the conflict will be recorded when we + scan the instruction that makes either X or Y become live. */ record_conflicts (block_start_allocnos, ax); #ifdef STACK_REGS @@ -1350,7 +1372,8 @@ record_one_conflict (regno) } /* Record all allocnos currently live as conflicting - with each other and with all hard regs currently live. + with all hard regs currently live. + ALLOCNO_VEC is a vector of LEN allocnos, all allocnos that are currently live. Their bits are also flagged in allocnos_live. */ @@ -1368,8 +1391,6 @@ record_conflicts (allocno_vec, len) allocno = allocno_vec[len]; ialloc_prod = allocno * allocno_row_words; IOR_HARD_REG_SET (hard_reg_conflicts[allocno], hard_regs_live); - for (j = allocno_row_words - 1; j >= 0; j--) - conflicts[ialloc_prod + j] |= allocnos_live[j]; } } |