@rkruppe @gnzlbg wow, it finally happened :D
Yeah, it's nice isn't it? :3 Let's hope undef dies soon, too.
Where's the RFC for a freeze intrinsic? ;P
In Rust? That's a different can of worms because LLVM's
freeze operates on a single SSA value while Rust types are generally not mapped to SSA values.
@aqjune was this you? :D
The docs do not mention that the
freeze intrinsic might write to the memory
and it is unclear whether doing that might be a data-race
(how does it synchronize?)
freeze! This thread is about the instruction that freezes a single SSA value, not a range of memory. You're thinking of the intrinsic discussed in https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/Intrinsic.20for.20freezing.20bytes which hasn't landed yet.
So this looks useful as in of itself.
@gnzlbg Hi, yes. :)
Replacing undef with poison is the next target. I guess this might need another time frame, but I believe people will finally like it as well.
The freeze intrinsic for memory is still effective as @rkruppe said . But its semantics is not crystal clear yet, and after discussion with people (including @RalfJ) I became to think that it will be informative to implement freeze intrinsics with several different semantics and see which one generates efficient code with existing LLVM optimizations. It may take some time, but having such data will be helpful for the design choice.