discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PING: gimplifier ICE fix


From: Richard Henderson
Subject: Re: PING: gimplifier ICE fix
Date: Mon, 24 Jan 2005 14:51:55 -0800
User-agent: Mutt/1.4.1i

On Mon, Jan 24, 2005 at 10:50:22PM +0100, Lars Sonchocky-Helldorf wrote:
> My proposition is:
> 
> Approve the patch on a timed base, that means approve it for now (so to 
> say as a temporary band aid) until the Objective-C rewrite as proposed 
> by Ziemowit Laski is done , annotate it with a FIXME comment for that 
> purpose.
> 
> Would that - given that this patch doesn't cause trouble anywhere else 
> - be o.k. for you?

No.

Firstly because I don't think you have in fact shown that it doesn't
cause trouble anywhere else.  Given how fiddly all these bits are, I
think that it would in fact be extremely difficult for you to show this.

The ONLY thing that would be acceptable is some sort of hack in the
objc front end, where any damage is at least localized.

I suspect that only viable fix is to write your own types_compatible_p
hook that doesn't have all of the extra semantics that you want for
comptypes in the front end.  This will prevent various cast operations
from being elided during gimplification, which means that all the sanity
checks will come out ok, and the optimizers won't barf on you.

You may in fact be able to get away with using lhd_types_compatible_p,
instead of writing any new code at all for this hook.  That would mean
that various bits of intermodule optimization won't work, but given the
other problems I suspect that doesn't work for objc anyway.

You may find that even after the types_compatible_p hook that you're
missing cast operations.  There are two ways to attack this.  One, fix
the front end as they show up.  That may not really be viable, and if
the object model really is to be rewritten for 4.1, not desirable.  
Two, write a gimplify_expr hook to *add* new cast operations.  You'd
assume that the front end isn't actively wrong in where it wants to
move data around, and mirror some of the logic in check_pointer_types_r
to discover where casts are missing.

If no one can manage to do this (or rewrite the object model) in the
timeframe for 4.0, then I'm sorry but 4.0 will ship with broken objc.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]