Profile code before function

Hartmut Penner HPENNER@de.ibm.com
Wed Mar 13 03:01:00 GMT 2002


Profile code should be emited before function,
otherwise we get problems with scheduling of the prologue.

Commited this for the S/390 backend for branch and trunk.

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ChangeLog,v
retrieving revision 1.13152.2.89
diff -c -p -r1.13152.2.89 ChangeLog
*** ChangeLog   2002/03/13 07:53:51     1.13152.2.89
--- ChangeLog   2002/03/13 10:54:32
***************
*** 1,3 ****
--- 1,8 ----
+ 2002-03-13  Hartmut Penner  <hpenner@de.ibm.com>
+
+         * config/s390/s390.h (PROFILE_BEFORE_PROLOGUE): Emit profile code
+         before prologue, to avoid scheduling problems.
+
  2002-03-13  Jakub Jelinek  <jakub@redhat.com>

        * config/sparc/sparc.h (INITIAL_FRAME_POINTER_OFFSET): Remove.
Index: config/s390/s390.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/s390/s390.h,v
retrieving revision 1.23.2.2
diff -c -p -r1.23.2.2 s390.h
*** s390.h      2002/03/13 05:36:01     1.23.2.2
--- s390.h      2002/03/13 10:54:48
*************** CUMULATIVE_ARGS;
*** 879,885 ****
  #define FUNCTION_PROFILER(FILE, LABELNO)                      \
        s390_function_profiler ((FILE), ((LABELNO)))

! /* #define PROFILE_BEFORE_PROLOGUE */

  /* Define EXIT_IGNORE_STACK if, when returning from a function, the stack
     pointer does not matter (provided there is a frame pointer).  */
--- 879,885 ----
  #define FUNCTION_PROFILER(FILE, LABELNO)                      \
        s390_function_profiler ((FILE), ((LABELNO)))

! #define PROFILE_BEFORE_PROLOGUE 1

  /* Define EXIT_IGNORE_STACK if, when returning from a function, the stack
     pointer does not matter (provided there is a frame pointer).  */


Mit freundlichem Gruß / Best regards,

Hartmut Penner
GCC for S/390 Development

Internet Mail Address : hpenner@de.ibm.com




More information about the Gcc-patches mailing list