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]

[patch?] profiler corrupts jump labels


The xstormy16 port creates jump insns as part of the edge profiler
(-fprofile-arcs -ftest-coverage).  Unfortunately, nobody rebuilds the
jump labels between that point and the next time the cfg needs to be
correct.  It seems to me that fixing up each chain as its created
makes the most sense, but this isn't a part of the code I'm familiar
with, so I'm open to alternate suggestions.

	* profile.c (instrument_edges): Make sure any newly created
	jump insns have correct jump label info.

Index: profile.c
===================================================================
RCS file: /cvs/uberbaum/gcc/profile.c,v
retrieving revision 1.108
diff -p -2 -r1.108 profile.c
*** profile.c	26 Feb 2003 16:55:10 -0000	1.108
--- profile.c	25 Mar 2003 03:29:19 -0000
*************** instrument_edges (el)
*** 203,206 ****
--- 203,207 ----
  			 gen_edge_profiler (total_num_edges_instrumented
  					    + num_instr_edges++), e);
+ 	      rebuild_jump_labels (e->insns);
  	    }
  	  e = e->succ_next;


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