Auto merge of #93984 - nnethercote:ChunkedBitSet, r=Mark-Simulacrum
Introduce `ChunkedBitSet` and use it for some dataflow analyses. This reduces peak memory usage significantly for some programs with very large functions. r? `@ghost`
This commit is contained in:
commit
bafe8d06e0
14 changed files with 806 additions and 75 deletions
|
@ -37,6 +37,8 @@ extern crate cfg_if;
|
|||
#[macro_use]
|
||||
extern crate rustc_macros;
|
||||
|
||||
pub use rustc_index::static_assert_size;
|
||||
|
||||
#[inline(never)]
|
||||
#[cold]
|
||||
pub fn cold_path<F: FnOnce() -> R, R>(f: F) -> R {
|
||||
|
|
|
@ -1,11 +1,3 @@
|
|||
/// Type size assertion. The first argument is a type and the second argument is its expected size.
|
||||
#[macro_export]
|
||||
macro_rules! static_assert_size {
|
||||
($ty:ty, $size:expr) => {
|
||||
const _: [(); $size] = [(); ::std::mem::size_of::<$ty>()];
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! enum_from_u32 {
|
||||
($(#[$attr:meta])* pub enum $name:ident {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue