[llvm-dev] invariant.load metadata semantics

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Thu Aug 25 16:09:14 PDT 2016


Hi Hal,

Hal Finkel via llvm-dev wrote:
 > Some questions: Do we allow stores to these locations at all? Only if

I'd vote for disallowing stores to these locations, but if "stores
allowed only if the value is the same" is helpful in some situation
then I don't have specific reasons why that would be problematic.

 > the value is the same? Must any change be observable to be a problem? Do

Not sure what you mean by "Must any change be observable".

 > atomic loads of invariant locations really need to be atomic?

It depends on the answer to "Do we allow stores to these locations at
all?".  If we don't allow stores to these locations at all then atomic
loads are not required, since we can't have racing stores to that
location.

However, syntactically, I'd be tempted to allow invariant loads to be
atomic; and maybe have a later pass strip out the atomic bit if the
semantics we decide allow that.

-- Sanjoy


More information about the llvm-dev mailing list