This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] Sanitize rtx_addr_can_trap_p_1
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>, Jeff Law <law at redhat dot com>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Thu, 11 Jun 2015 12:57:34 +0200
- Subject: Re: [RFC] Sanitize rtx_addr_can_trap_p_1
- Authentication-results: sourceware.org; auth=none
- References: <DUB118-W34295B153A59B9B953311CE4BC0 at phx dot gbl> <20150611080203 dot GT10247 at tucnak dot redhat dot com> <DUB118-W5246A3EF392AF7BA008B57E4BC0 at phx dot gbl>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Jun 11, 2015 at 12:38:40PM +0200, Bernd Edlinger wrote:
> On Thu, 11 Jun 2015 10:02:03, Jakub Jelinek wrote:
> >
> > IMHO the
> > #if 0
> > #endif
> > stuff doesn't belong to the patch.
> >
>
> I just wanted to leave a hint, how I debugged this function, and how
> to assess the performance of the decision that is taken here.
What I usually do in these cases is something like:
FILE *f = fopen ("/tmp/mylogfile", "a");
fprintf (f, "%s %d ...\n", main_input_filename ? main_input_filename : "-", (int) BITS_PER_WORD, ...);
fclose (f);
and do full bootstrap/regtest (usually both x86_64-linux and i686-linux)
with it, then look at the log file.
But I keep those for myself, don't keep them even as comments.
In this case, you could post the hack as incremental patch for interested
folks to test on their architecture, but I'm not convinced we want to keep
it in the source, whether #if 0 or in a comment.
So, for a full bootstrap/regtest, how many log messages do you get, and are
they always resolved conservatively (i.e. if unsure the offset is ok, return
1)?
Jakub