[PATCH] Tree SRA and atomicity/volatility

Mark Mitchell mark@codesourcery.com
Thu Jan 25 16:32:00 GMT 2007


Richard Kenner wrote:
>> So, please, if a frontend assumes that setting TYPE_VOLATILE on
>> a structure type has defined semantics, then please let's _define_ those.
> 
> As both Mark and I have been trying to say, that's not possible.  The
> middle-end defines things at roughly the level that a language
> specification would and these sorts of behaviors of volatile affect
> lower-level things, which cannot be expressed in such a manner. 

I agree.  I think TYPE_VOLATILE is the right flag, and that any other
flag would be essentially equivalent.  Or, rather, we might be able to
specify some particular behavior with additional flags, like
TYPE_DO_NOT_SRA_ME, but even several such flags would not capture the
totality of the C "volatile" keyword, so we would still need TYPE_VOLATILE.

Of course, I'm all for specifying whatever we can and writing that down.
 You may recall that I gave Eric B. a lot of grief about documentation
for the last round of volatile changes, and there is now some
documentation about them.  (It's a little fuzzy, and I argued for less
fuzzineess than we adopted, but it's certainly much less fuzzy than what
was there before, and I consider it reasonable progress.)

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Gcc-patches mailing list