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: Unit at a time 2/3 - backward inlining, local functions


> > On Tue, Feb 18, 2003 at 11:49:46PM +0100, Jan Hubicka wrote:
> > > -       if (indirect)
> > > +       if (!fndecl && !fntype)
> > 
> > This is an incorrect substitution.  An indirect call can and usually will
> > have a proper function type.
> 
> I've screwed up the conditional.  It should be (!fndecl && fntype)
> this is the way it is tested in calls.c now:
>   /* Start updating where the next arg would go.
> 
>      On some machines (such as the PA) indirect calls have a different
>      calling convention than normal calls.  The last argument in
>      INIT_CUMULATIVE_ARGS tells the backend if this is an indirect call
>      or not.  */
>   INIT_CUMULATIVE_ARGS (args_so_far, funtype, NULL_RTX, (fndecl == 0));
> 
> Funtype will be always nonzero for direct calls, so the conditional
				     ^^^^^ nonlibcall
and libcalls are always direct.

Honza

> should be OK then.
> 
> Would be the patch Ok with this fix?
> > 
> > I presume you're trying to work around libcall nonsense.  You'll have to do
> > it another way.  The preferred method would be to get rid of libcalls, and
> > instead have them all go through expand_call.  ;-)
> Uhm... would be really nice..
> 
> Honza
> > 
> > 
> > 
> > r~


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