about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/llvm_util.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-06-01 19:35:44 +0200
committerGitHub <noreply@github.com>2025-06-01 19:35:44 +0200
commitb0b98a078de9ea850675bdfaa26e38823fe24158 (patch)
tree3a4d88f7abd2a8a705a54fc65234db8ed86e741f /compiler/rustc_codegen_llvm/src/llvm_util.rs
parentfec5c8fd7ce68c551b3c3b6c1d43a7e503a09749 (diff)
parent95115b907b9e22dcdb90e39f0ba7f833b9ac3515 (diff)
downloadrust-b0b98a078de9ea850675bdfaa26e38823fe24158.tar.gz
rust-b0b98a078de9ea850675bdfaa26e38823fe24158.zip
Rollup merge of #141823 - amandasystems:reverse_scc_graph_once_cell, r=jieyouxu
Drive-by refactor: use `OnceCell` for the reverse region SCC graph

During region inference, the reverse SCC region graph is sometimes computed lazily. This changes the implementation for that from using an `Option` to a `OnceCell` which clearly communicates the intention and simplifies the code somewhat.

There shouldn't be any performance impact, except that this pulls the computation of the reverse SCC graph slightly later than before, and so may avoid computing it in some instances.

Note that this changes a mutable reference into an immutable (interior mutable) one.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
0 files changed, 0 insertions, 0 deletions