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]

regstack and splitting


Hi
I know that this is religious issue, but this patch attempts to enable splitting
nonconditionally before reg-stack.  This allows us to write "#" in instruction
templates w/o bein affraid to lose REG_DEAD note in the post-reg-stack split.

While this was considered kludge to get around braindamage if the reg-stack
design, I believe that now it is becoming a must - there is no need for
requiring reg-stack to parse various compound patterns we create (such as
imitated push instructions, abs, compare-and-branch, or now, with SSE
compare-and-conditional-move).  He should see only the i387 instructions,
so splitting before reg-stack is sane.

it is sane even after my INDREG patches go, possibly, in, since post reg-stack
splitting!= pre-reg-stack splitting anyway.
Current situation just requires us to
1) patch reg-stack to support new pattern
2) write both output template and splitter in the pattern dupplicating code.

Honza

Index: toplev.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/toplev.c,v
retrieving revision 1.428
diff -c -3 -p -r1.428 toplev.c
*** toplev.c	2001/02/26 11:11:38	1.428
--- toplev.c	2001/02/27 13:00:14
*************** rest_of_compilation (decl)
*** 3489,3496 ****
      }
  
    /* If optimizing, then go ahead and split insns now since we are about
!      to recompute flow information anyway.  */
    if (optimize > 0)
      {
        int old_labelnum = max_label_num ();
  
--- 3489,3502 ----
      }
  
    /* If optimizing, then go ahead and split insns now since we are about
!      to recompute flow information anyway.  Since we can't split insns after
!      reg-stack, do the splitting unconditionally here to avoid gcc from losing
!      REG_DEAD notes.  */
! #ifdef STACK_REGS
!   if (1)
! #else
    if (optimize > 0)
+ #endif
      {
        int old_labelnum = max_label_num ();
  


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