[tree-ssa] RFC: Never gimplify ASM_EXPRs

Diego Novillo dnovillo@redhat.com
Thu Jun 5 17:32:00 GMT 2003


On Thu, 2003-06-05 at 13:23, Andrew Haley wrote:
> Richard Henderson writes:
>  > On Thu, Jun 05, 2003 at 04:35:56PM +0100, Andrew Haley wrote:
>  > > Diego Novillo writes:
>  > >  > Is this an invalid use of __asm__ then?
>  > 
>  > I don't think so.
>  > 
>  > > I think so.  The asm is asking for a mem operand for something that it
>  > > never intends actually to access.
>  > 
>  > It DID access it.  With a prefetch instruction.
> 
> Not really; a prefetch instruction is more of a suggestion than an
> access, is it not?
> 
This is precisely the kind of situation I was looking to avoid. 
ASM_EXPRs are inherently ill-defined for the general case.  IMO, it's
not worth the pain of trying to special case the different operand types
or second guess what the ASM_EXPR is trying to do.

Ignoring the ASM_EXPRs is simple, fool-proof and won't block any
significant optimization opportunities.  At the level that we are
operating, we should not be concerning ourselves with such low level
details.  The same thing happens with machine-dependent builtins.  I
don't think we should even try to understand them.

Jason, why do you feel so strongly about ASM_EXPRs?  Do you see any
significant benefits for the tree optimizers?  I'd rather ignore them,
but if you find a way of dealing with them without introducing special
cases in the gimplifier and the optimizers, then go ahead.  I just think
that it's not really worth the effort.


Diego.



More information about the Gcc mailing list