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]

More expand_call work



The sibling call code (under developemnt) needs to be able to execute
large parts of expand_call multiple times to build multiple insn streams
for different call implementations.

This patch makes that a little easier by reorganizing a couple code fragments
to avoid mixing code which needs to execute only once with code that needs
to execute multiple times.

It should have no effect on the behavior of the compiler at this time.

	* calls.c (expand_call): Slightly reorganize code.

Index: calls.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/calls.c,v
retrieving revision 1.50
diff -c -3 -p -r1.50 calls.c
*** calls.c	1999/03/09 14:05:13	1.50
--- calls.c	1999/03/09 23:04:07
*************** expand_call (exp, target, ignore)
*** 1754,1764 ****
        mark_addressable (fndecl);
      }
  
-   /* When calling a const function, we must pop the stack args right away,
-      so that the pop is deleted or moved with the call.  */
-   if (is_const)
-     NO_DEFER_POP;
- 
    function_call_count++;
  
    if (fndecl && DECL_NAME (fndecl))
--- 1754,1759 ----
*************** expand_call (exp, target, ignore)
*** 1772,1777 ****
--- 1767,1783 ----
    if (may_be_alloca)
      current_function_calls_alloca = 1;
  
+   /* Operand 0 is a pointer-to-function; get the type of the function.  */
+   funtype = TREE_TYPE (TREE_OPERAND (exp, 0));
+   if (! POINTER_TYPE_P (funtype))
+     abort ();
+   funtype = TREE_TYPE (funtype);
+ 
+   /* When calling a const function, we must pop the stack args right away,
+      so that the pop is deleted or moved with the call.  */
+   if (is_const)
+     NO_DEFER_POP;
+ 
    /* Don't let pending stack adjusts add up to too much.
       Also, do all pending adjustments now
       if there is any chance this might be a call to alloca.  */
*************** expand_call (exp, target, ignore)
*** 1779,1791 ****
    if (pending_stack_adjust >= 32
        || (pending_stack_adjust > 0 && may_be_alloca))
      do_pending_stack_adjust ();
- 
-   /* Operand 0 is a pointer-to-function; get the type of the function.  */
-   funtype = TREE_TYPE (TREE_OPERAND (exp, 0));
-   if (! POINTER_TYPE_P (funtype))
-     abort ();
- 
-   funtype = TREE_TYPE (funtype);
  
    /* Push the temporary stack slot level so that we can free any temporaries
       we make.  */
--- 1785,1790 ----




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