Patchwork [committed] TILE-Gx/TILEPro: define PROFILE_BEFORE_PROLOGUE

login
register
mail settings
Submitter Walter Lee
Date March 26, 2013, 7:01 a.m.
Message ID <201303260701.r2Q71oIS017859@farm-0001.internal.tilera.com>
Download mbox | patch
Permalink /patch/231106/
State New
Headers show

Comments

Walter Lee - March 26, 2013, 7:01 a.m.
This patch puts profiling code before the prologue, to avoid
clobbering used registers.  Backported to 4.7 and 4.8.

	* config/tilegx/tilegx.h (PROFILE_BEFORE_PROLOGUE): Define.
	* config/tilegx/tilepro.h (PROFILE_BEFORE_PROLOGUE): Define.

Patch

Index: gcc/config/tilegx/tilegx.h
===================================================================
--- gcc/config/tilegx/tilegx.h	(revision 197083)
+++ gcc/config/tilegx/tilegx.h	(working copy)
@@ -287,6 +287,8 @@  enum reg_class
 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
   ((OFFSET) = tilegx_initial_elimination_offset((FROM),(TO)))
 
+#define PROFILE_BEFORE_PROLOGUE 1
+
 #define FUNCTION_PROFILER(FILE, LABELNO) \
   tilegx_function_profiler (FILE, LABELNO)
 
Index: gcc/config/tilepro/tilepro.h
===================================================================
--- gcc/config/tilepro/tilepro.h	(revision 197083)
+++ gcc/config/tilepro/tilepro.h	(working copy)
@@ -268,6 +268,8 @@  enum reg_class
 #define INITIAL_ELIMINATION_OFFSET(FROM, TO, OFFSET) \
   ((OFFSET) = tilepro_initial_elimination_offset((FROM),(TO)))
 
+#define PROFILE_BEFORE_PROLOGUE 1
+
 #define FUNCTION_PROFILER(FILE, LABELNO) \
   tilepro_function_profiler (FILE, LABELNO)