[Info-vax] LLVM, volatile and async VMS I/O and system calls

Simon Clubley clubley at remove_me.eisner.decus.org-Earth.UFP
Fri Sep 24 23:25:04 EDT 2021


On 2021-09-24, chris <chris-nospam at tridac.net> wrote:
> On 09/24/21 19:15, Simon Clubley wrote:
>>
>> No I am not. All I have said all along is that volatile inserts code
>> into the generated code to _always_ re-read the variable before doing
>> anything with it.
>
> Sorry, no it doesn't :-). All it's saying is that the section of code 
> should not be subject to any optimisations. Not the same thing at all.
> Doesn't add code, just doesn't take any away, nor modify it,
> but translates as written.
>

I may have phrased that a little loosely, but the end result is exactly
the same - the generated object code has unconditional reads in it in
places it might not have done had the optimiser been allowed to go to
work on the variable.

Simon.

-- 
Simon Clubley, clubley at remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.



More information about the Info-vax mailing list