[cfe-dev] [LLVMdev] [RFC] Scoped no-alias metadata

Krzysztof Parzyszek kparzysz at codeaurora.org
Mon Dec 3 12:51:55 PST 2012


On 12/3/2012 2:26 PM, Hal Finkel wrote:
>
> We both agree, however, that the compiler has no way of knowing whether or not (A) might be satisfied (because the standard says, "by any means
> ", which seems to allow the requirement to be satisfied by mechanisms outside the scope of the standard). That being the case, safety demands that the compiler assume that (A) is satisfied. What's worse, (A) is actually a statement about the dynamic state of the execution environment of the program; and more than that, the standard simply states that the value needs to be "modified", not that such a modification needs to have any affect on the execution of the C program -- the value could be changed and then changed back -- a memory refresh cycle might count ;)
>
> And in case you think I'm just being sarcastic, the standard says in 3.1:
> "NOTE 2: "Modify" includes the case where the new value being stored is the same as the previous value."
>
> Alright, I'm being slightly sarcastic, but nevertheless... ;)

I don't see why this matters anyways.  We can act as if the object was 
always modified (by _some_ means).  The standard requires that (A)=>(B) 
is true, which is trivially satisfied if A is false.

-Krzysztof

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
hosted by The Linux Foundation



More information about the cfe-dev mailing list