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]

Re: RFA: profile.c USE_MAPPED_LOCATION support


> Hi -
> 
> Some recent patch broke USE_MAPPED_LOCATION support in profile.c.
> This patch fixes it I believe, as tested by bootstraps and the
> bprob.exp testsuite bits.
> 
> 
> + 2004-09-15  Frank Ch. Eigler  <fche@redhat.com>
> + 
> + 	* profile.c (branch_prob): Restore support for USE_MAPPED_LOCATION.
> + 
> 

> ! 		{
> ! 		  /* ??? source_locus type is marked deprecated in input.h.  */
> ! 		  source_locus curr_location = bb->succ->goto_locus;
> ! 		  /* ??? The FILE/LINE API is inconsistent for these cases.  */

This means that the goto_locus construct is completely broken by
USE_MAPPED_LOCATION?  What would be consistent replacement of this?

Except for this, the patch looks fine, but first I would like to
understand the relations in between goto_locus and the new code.  I've
run into this issue in the past too, so I am doubly curious ;)

Honza
> ! #ifdef USE_MAPPED_LOCATION 
> ! 		  output_location (LOCATION_FILE (curr_location),
> ! 				   LOCATION_LINE (curr_location),
> ! 				   &offset, bb);
> ! #else
> ! 		  output_location (curr_location->file, curr_location->line,
> ! 				   &offset, bb);
> ! #endif
> ! 		}
>   
>   	      if (offset)
>   		{


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