diff options
Diffstat (limited to 'gcc/reginfo.cc')
-rw-r--r-- | gcc/reginfo.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/reginfo.cc b/gcc/reginfo.cc index 67e30cab428..2ab7bbb7353 100644 --- a/gcc/reginfo.cc +++ b/gcc/reginfo.cc @@ -122,6 +122,24 @@ const char * reg_class_names[] = REG_CLASS_NAMES; reginfo has been initialized. */ static int no_global_reg_vars = 0; +static void +clear_global_regs_cache (void) +{ + for (size_t i = 0 ; i < FIRST_PSEUDO_REGISTER ; i++) + { + global_regs[i] = 0; + global_regs_decl[i] = NULL; + } +} + +void +reginfo_cc_finalize (void) +{ + clear_global_regs_cache (); + no_global_reg_vars = 0; + CLEAR_HARD_REG_SET (global_reg_set); +} + /* Given a register bitmap, turn on the bits in a HARD_REG_SET that correspond to the hard registers, if any, set in that map. This could be done far more efficiently by having all sorts of special-cases |