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]

Re: Patch to fix recent local-alloc IA-64 breakage


>	* local-alloc.c (equiv_init_call_clobbered_p): New function.
>	(struct equivalence): Add call_clobbered field.
>	(update_equiv_regs): Set it.
>	(equiv_init_movable_p): An equivalence which uses a call clobbered
>	register can't be moved past any calls.

Actually a better solution may be to change update_equiv_regs:

  if (note && ! rtx_varies_p (XEXP (note, 0)))
    PUT_MODE (note, (enum machine_mode) REG_EQUIV);

to something like:

  if (note && ! rtx_varies_p (XEXP (note, 0))
      && ! call clobbered (XEXP (note, 0)) && ! call clobbered (src))

since REG_EQUIV means that the equivalence is valid throughout the
entire function which certainly isn't the case if a call clobbered
register is present.

I'll look at this a bit further.

-- John
-------------------------------------------------------------------------
|   Feith Systems  |   Voice: 1-215-646-8000  |  Email: john@feith.com  |
|    John Wehle    |     Fax: 1-215-540-5495  |                         |
-------------------------------------------------------------------------


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