This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] reginfo.c: Remove cannot_change_mode_set_regs.


On Sat, Apr 18, 2009 at 3:12 AM, Kazu Hirata <kazu@codesourcery.com> wrote:
> Hi,
>
> Attached is a patch to remove cannot_change_mode_set_regs.
>
> AFAICT, this function has been unused since the new register allocator
> went in at Revision 143757.
>
> Bootstrapped on x86_64-pc-linux-gnu. ?OK to apply?

Ok.

Thanks,
Richard.

> Kazu Hirata
>
> 2009-04-17 ?Kazu Hirata ?<kazu@codesourcery.com>
>
> ? ? ? ?* reginfo.c (cannot_change_mode_set_regs): Remove.
> ? ? ? ?* rtl.h: Remove the prototype for cannot_change_mode_set_regs.
>
> Index: gcc/reginfo.c
> ===================================================================
> --- gcc/reginfo.c ? ? ? (revision 146215)
> +++ gcc/reginfo.c ? ? ? (working copy)
> @@ -1311,34 +1311,6 @@ init_subregs_of_mode (void)
> ? return 0;
> ?}
>
> -/* Set bits in *USED which correspond to registers which can't change
> - ? their mode from FROM to any mode in which REGNO was
> - ? encountered. ?*/
> -void
> -cannot_change_mode_set_regs (HARD_REG_SET *used, enum machine_mode from,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ?unsigned int regno)
> -{
> - ?struct subregs_of_mode_node dummy, *node;
> - ?enum machine_mode to;
> - ?unsigned char mask;
> - ?unsigned int i;
> -
> - ?gcc_assert (subregs_of_mode);
> - ?dummy.block = regno & -8;
> - ?node = (struct subregs_of_mode_node *)
> - ? ?htab_find_with_hash (subregs_of_mode, &dummy, dummy.block);
> - ?if (node == NULL)
> - ? ?return;
> -
> - ?mask = 1 << (regno & 7);
> - ?for (to = VOIDmode; to < NUM_MACHINE_MODES; to++)
> - ? ?if (node->modes[to] & mask)
> - ? ? ?for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
> - ? ? ? if (!TEST_HARD_REG_BIT (*used, i)
> - ? ? ? ? ? && REG_CANNOT_CHANGE_MODE_P (i, from, to))
> - ? ? ? ? SET_HARD_REG_BIT (*used, i);
> -}
> -
> ?/* Return 1 if REGNO has had an invalid mode change in CLASS from FROM
> ? ?mode. ?*/
> ?bool
> Index: gcc/rtl.h
> ===================================================================
> --- gcc/rtl.h ? (revision 146215)
> +++ gcc/rtl.h ? (working copy)
> @@ -2245,10 +2245,6 @@ extern void init_reg_sets (void);
> ?extern void regclass (rtx, int);
> ?extern void reg_scan (rtx, unsigned int);
> ?extern void fix_register (const char *, int, int);
> -#ifdef HARD_CONST
> -extern void cannot_change_mode_set_regs (HARD_REG_SET *,
> - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?enum machine_mode, unsigned int);
> -#endif
> ?extern bool invalid_mode_change_p (unsigned int, enum reg_class,
> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? enum machine_mode);
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]