[llvm-dev] Status of llvm.invariant.{start|end}

Yichao Yu via llvm-dev llvm-dev at lists.llvm.org
Sun Oct 29 18:01:44 PDT 2017


Hi,

>From LangRef, these intrinsics seems really useful for letting LLVM
know about certain higher level immutability guarantee, e.g. for
objects that are not allowed to be mutated after construction.
However, it doesn't seem to work[1] and a quick code search suggests
that there's not a single optimization pass that's currently using it
for store to load forwarding, only very few that use it to eliminate
stores. The issue linked is marked as resolved-later and mentioned
that it "probably have to be redesigned before they work out right".
What has to be redesigned to make it work and is there a better way
that works currently to mark an object as immutable after a certain
point/in certain region?

Yichao Yu

[1] https://bugs.llvm.org/show_bug.cgi?id=5441


More information about the llvm-dev mailing list