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]
Other format: [Raw text]

S/390: Speed up TPF profiling hooks


Hello,

this patch significantly speeds up TPF prologue and epilogue hooks
by in-line checking whether hooks are enabled or not instead of
unconditionally calling the hook.

Patch provided by Jim Tison and tested by the TPF team.
Applied to mainline.

Bye,
Ulrich


2005-04-29  Jim Tison  <jtison@us.ibm.com>

	* config/s390/s390.md ("prologue_tpf", "epilogue_tpf"): Alter
	trace hooks calls to improve performance.

========================================================
*** s390.md.orig	2005-04-28 15:57:56.000000000 -0400
--- s390.md	2005-04-28 16:01:16.000000000 -0400
***************
*** 8103,8111 ****
    [(unspec_volatile [(const_int 0)] UNSPECV_TPF_PROLOGUE)
     (clobber (reg:DI 1))]
    "TARGET_TPF_PROFILING"
!   "bas\t%%r1,4064"
!   [(set_attr "type" "jsr")
!    (set_attr "op_type" "RX")])
  
  (define_expand "epilogue"
    [(use (const_int 1))]
--- 8103,8110 ----
    [(unspec_volatile [(const_int 0)] UNSPECV_TPF_PROLOGUE)
     (clobber (reg:DI 1))]
    "TARGET_TPF_PROFILING"
!   "larl\t%%r1,.+14\;tm\t4065,255\;bnz\t4064"
!   [(set_attr "length"   "14")])
  
  (define_expand "epilogue"
    [(use (const_int 1))]
***************
*** 8116,8125 ****
    [(unspec_volatile [(const_int 0)] UNSPECV_TPF_EPILOGUE)
     (clobber (reg:DI 1))]
    "TARGET_TPF_PROFILING"
!   "bas\t%%r1,4070"
!   [(set_attr "type" "jsr")
!    (set_attr "op_type" "RX")])
! 
  
  (define_expand "sibcall_epilogue"
    [(use (const_int 0))]
--- 8115,8122 ----
    [(unspec_volatile [(const_int 0)] UNSPECV_TPF_EPILOGUE)
     (clobber (reg:DI 1))]
    "TARGET_TPF_PROFILING"
!   "larl\t%%r1,.+14\;tm\t4071,255\;bnz\t4070"
!   [(set_attr "length"   "14")])
  
  (define_expand "sibcall_epilogue"
    [(use (const_int 0))]
-- 
  Dr. Ulrich Weigand
  Linux on zSeries Development
  Ulrich.Weigand@de.ibm.com


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