diff mbox

[RFC,regrename,sel-sched] Fix arm bootstrap

Message ID AM4PR0701MB2162D1D7F003C74F5152262CE4C90@AM4PR0701MB2162.eurprd07.prod.outlook.com
State New
Headers show

Commit Message

Bernd Edlinger Sept. 22, 2016, 2:25 p.m. UTC
On 09/22/16 15:26, Kyrill Tkachov wrote:
> Hi all,

>

> In the the interest of fixing arm bootstrap here are the two blocking

> issues

> and the changes proposed for them.

> I'm not familiar enough with regrename or sel-sched to make a call on

> whether

> these are right or not, I just want to keep the ball rolling so we can fix

> arm bootstrap.

>

> These changes allowed arm bootstrap to complete.

> Are they the right way to go?

> If so, I'll do a full bootstrap and test run on aarch64 and x86_64.

>

> Thanks,

> Kyrill

>

> 2016-09-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

>              Bernd Edlinger  <bernd.edlinger@hotmail.de>

>              Bernd Schmidt  <bschmidt@redhat.com>

>

>      * regrename.c (rename_chains): Avoid using HARD_FRAME_POINTER_REGNUM

>      in a boolean context.

>      * sel-sched.c (mark_unavailable_hard_regs): Likewise.


Thanks Kyill,


        SET_HARD_REG_SET (reg_rename_p->unavailable_hard_regs);

I think, that sel-sched.c would be on the safe side, if it is
staying away from both HARD_FRAME_POINTER and FRAME_POINTER, because
it may apparently also used before reload, where most of the
accesses use FRAME_POINTER.

   if (frame_pointer_needed)
     {
       add_to_hard_reg_set (&reg_rename_p->unavailable_hard_regs,
                            Pmode, FRAME_POINTER_REGNUM);

       if (!HARD_FRAME_POINTER_IS_FRAME_POINTER)
         add_to_hard_reg_set (&reg_rename_p->unavailable_hard_regs,
                              Pmode, HARD_FRAME_POINTER_REGNUM);
     }

also here maybe remove the if (!...) ?



Bernd.
diff mbox

Patch

--- a/gcc/sel-sched.c
+++ b/gcc/sel-sched.c
@@ -1183,10 +1183,8 @@  mark_unavailable_hard_regs (def_t def, struct 
reg_rename *reg_rename_p,
       frame pointer, or we could not discover its class.  */
    if (fixed_regs[regno]
        || global_regs[regno]
-      || (!HARD_FRAME_POINTER_IS_FRAME_POINTER && frame_pointer_needed
+      || (frame_pointer_needed
  	  && regno == HARD_FRAME_POINTER_REGNUM)
-      || (HARD_FRAME_POINTER_REGNUM && frame_pointer_needed
-	  && regno == FRAME_POINTER_REGNUM)
        || (reload_completed && cl == NO_REGS))
      {