sysv/ms_abi attribute fix, part 2, avoid caching of call used in dataflow
Jan Hubicka
hubicka@ucw.cz
Sun Dec 14 11:35:00 GMT 2008
Hi,
dataflow is giving wrong results when foreign ABI is used, because
df_invalidated_by_call is converted into reg-set and cached over whole
compilation.
Kenny, perhaps cleaner approach would be to make df_invalidated_by_call
regs_invalidated_by_call_regset initialized by regcalss's init_regs
where all the other stuff is initialized. If this is preferred
solution, I will prepare updated patch.
Jan Hubicka <jh@suse.cz>
Kai Tietz <kai.tietz@onevision.com>
* df-scan.c (df_hard_reg_init): Always recompute df_invalidated_by_call
bitmap.
Index: df-scan.c
===================================================================
*** df-scan.c (revision 142597)
--- df-scan.c (working copy)
*************** df_hard_reg_init (void)
*** 4119,4125 ****
static const struct {const int from, to; } eliminables[] = ELIMINABLE_REGS;
#endif
if (initialized)
! return;
bitmap_obstack_initialize (&persistent_obstack);
--- 4119,4133 ----
static const struct {const int from, to; } eliminables[] = ELIMINABLE_REGS;
#endif
if (initialized)
! {
! bitmap_clear (df_invalidated_by_call);
! /* Inconveniently, this is only readily available in hard reg set
! form and moreover can change in between functions. */
! for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i)
! if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i))
! bitmap_set_bit (df_invalidated_by_call, i);
! return;
! }
bitmap_obstack_initialize (&persistent_obstack);
More information about the Gcc-patches
mailing list