This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [java] Fix builtins decls
- From: Jan Hubicka <jh at suse dot cz>
- To: Andrew Haley <aph at redhat dot com>, Jan Hubicka <jh at suse dot cz>,Gcc Patch List <gcc-patches at gcc dot gnu dot org>,Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Tue, 24 May 2005 01:00:21 +0200
- Subject: Re: [java] Fix builtins decls
- References: <20050522210806.GM28069@kam.mff.cuni.cz> <17042.8128.923329.276772@zapata.pink> <20050523224548.GA16563@nevyn.them.org>
> On Mon, May 23, 2005 at 07:24:00PM +0100, Andrew Haley wrote:
> > Jan Hubicka writes:
> > > Hi,
> > > tree-profiling branch dies horribly by trying to remove
> > > __builtin_predict calls since these are believed to be trapping in Java.
> > > I've bootstrapped/regtested i686--linux the attached patch on
> > > tree-profiling and I am testing it on mainline now too.
> > > OK (once mainline unslush, as this does not counts as a regression
> > > there)
> > >
> > > 2005-05-22 Jan Hubicka <jh@suse.cz>
> > > * builtins.c (define_builtin): Accept new flags parameter.
> > > (initialize_builtins): Mark the builtins const and nothrow accordingly.
> >
> > That's fine except for __builtin_expect, which is neither const nor
> > nothrow.
>
> Why wouldn't it be? It doesn't do anything. What the arguments do is
> not the builtin's problem.
Ehm...My problem is that builtin_expect itself is marked as throwing and
non-constant. Tree-profiling branch preplace the builtin_expect calls
by it's argument getting dead EH edges.
Rather then removing the EH edges it seems better to mark the function
as non-trapping and constant...
Honza
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC