about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorJohannes Hostert <jhostert@ethz.ch>2024-03-25 17:35:29 +0100
committerJohannes Hostert <jhostert@ethz.ch>2024-03-26 14:08:34 +0100
commitdf73cb710e2916a0ed25020f013cae1fb64ccc27 (patch)
tree97584b2a865d58f70ab03228290bec762f91a3c3 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentc4611708bd510a17d36d385e9bb70b19283de051 (diff)
downloadrust-df73cb710e2916a0ed25020f013cae1fb64ccc27.tar.gz
rust-df73cb710e2916a0ed25020f013cae1fb64ccc27.zip
Tree Borrows: Make tree root always be `Active` and initialized
There should never be an `Active` but not initialized node in the
borrow tree. If such a node exists, and if it has a protector, then
on a foreign read, it could become disabled. This leads to some
problems when formally proving that read-reordering optimizations are
sound.

The root node is the only node for which this can happen, since all
other nodes can only become `Active` when actually used. But special-
casing the root node here is annoying to reason about, everything
becomes much nicer if we can simply say that *all* `Active` nodes
must be initialized. This requires making the root node default-
initialized.

This is also more intuitive, since the root arguably becomes ini-
tialized during the allocation, which can be considered a write.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions