From f2ecb626bb909f8a35a8d90fab9ec3d2c5ad5aa0 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Thu, 18 Dec 2008 14:52:45 +0100 Subject: df-scan.c (persistent_obstack, [...]): Remove. * df-scan.c (persistent_obstack, df_invalidated_by_call): Remove. (df_scan_start_dump, df_get_call_refs, df_hard_reg_init): Rename df_invalidated_by_call to invalidated_by_call_regset. * df.h (df_invalidated_by_call): Remove. * regclass.c (regs_invalidated_by_call_regset, persistent_obstack): New variables. (init_reg_sets_1): Initialize regs_invalidated_by_call_regset. (globalize_reg): Likewise. * df-problems.c (df_rd_local_compute, df_lr_confluence_n, df_byte_lr_alloc): Rename df_invalidated_by_call to invalidated_by_call_regset. * basic-block.h (regs_invalidated_by_call_regset): Declare. Co-Authored-By: Kai Tietz From-SVN: r142812 --- gcc/regclass.c | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) (limited to 'gcc/regclass.c') diff --git a/gcc/regclass.c b/gcc/regclass.c index b12d416..f31ccd1 100644 --- a/gcc/regclass.c +++ b/gcc/regclass.c @@ -145,6 +145,16 @@ char global_regs[FIRST_PSEUDO_REGISTER]; HARD_REG_SET regs_invalidated_by_call; +/* Same information as REGS_INVALIDATED_BY_CALL but in regset form to be used + in dataflow more conveniently. */ + +regset regs_invalidated_by_call_regset; + +/* The bitmap_obstack is used to hold some static variables that + should not be reset after each function is compiled. */ + +static bitmap_obstack persistent_obstack; + /* Table of register numbers in the order in which to try to use them. */ #ifdef REG_ALLOC_ORDER int reg_alloc_order[FIRST_PSEUDO_REGISTER] = REG_ALLOC_ORDER; @@ -568,6 +578,13 @@ init_reg_sets_1 (void) CLEAR_HARD_REG_SET (call_fixed_reg_set); CLEAR_HARD_REG_SET (regs_invalidated_by_call); CLEAR_HARD_REG_SET (losing_caller_save_reg_set); + if (!regs_invalidated_by_call_regset) + { + bitmap_obstack_initialize (&persistent_obstack); + regs_invalidated_by_call_regset = ALLOC_REG_SET (&persistent_obstack); + } + else + CLEAR_REG_SET (regs_invalidated_by_call_regset); memcpy (call_fixed_regs, fixed_regs, sizeof call_fixed_regs); @@ -602,7 +619,10 @@ init_reg_sets_1 (void) if (i == STACK_POINTER_REGNUM) ; else if (global_regs[i]) - SET_HARD_REG_BIT (regs_invalidated_by_call, i); + { + SET_HARD_REG_BIT (regs_invalidated_by_call, i); + SET_REGNO_REG_SET (regs_invalidated_by_call_regset, i); + } else if (i == FRAME_POINTER_REGNUM) ; #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM @@ -618,7 +638,10 @@ init_reg_sets_1 (void) ; #endif else if (CALL_REALLY_USED_REGNO_P (i)) - SET_HARD_REG_BIT (regs_invalidated_by_call, i); + { + SET_HARD_REG_BIT (regs_invalidated_by_call, i); + SET_REGNO_REG_SET (regs_invalidated_by_call_regset, i); + } } /* Preserve global registers if called more than once. */ @@ -912,7 +935,10 @@ globalize_reg (int i) appropriate regs_invalidated_by_call bit, even if it's already set in fixed_regs. */ if (i != STACK_POINTER_REGNUM) - SET_HARD_REG_BIT (regs_invalidated_by_call, i); + { + SET_HARD_REG_BIT (regs_invalidated_by_call, i); + SET_REGNO_REG_SET (regs_invalidated_by_call_regset, i); + } /* If already fixed, nothing else to do. */ if (fixed_regs[i]) -- cgit v1.1