This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFA: profile.c USE_MAPPED_LOCATION support
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 15 Sep 2004 20:36:06 +0200
- Subject: Re: RFA: profile.c USE_MAPPED_LOCATION support
- References: <20040915180658.GA4945@redhat.com>
> 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)
> {