#[non_exhaustive]pub enum RegallocAlgorithm {
Backtracking,
SinglePass,
}
Expand description
Possible register allocator algorithms for the Cranelift codegen backend.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Backtracking
Generates the fastest possible code, but may take longer.
This algorithm performs “backtracking”, which means that it may undo its earlier work and retry as it discovers conflicts. This results in better register utilization, producing fewer spills and moves, but can cause super-linear compile runtime.
SinglePass
Generates acceptable code very quickly.
This algorithm performs a single pass through the code, guaranteed to work in linear time. (Note that the rest of Cranelift is not necessarily guaranteed to run in linear time, however.) It cannot undo earlier decisions, however, and it cannot foresee constraints or issues that may occur further ahead in the code, so the code may have more spills and moves as a result.
Trait Implementations§
source§impl Clone for RegallocAlgorithm
impl Clone for RegallocAlgorithm
source§fn clone(&self) -> RegallocAlgorithm
fn clone(&self) -> RegallocAlgorithm
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RegallocAlgorithm
impl Debug for RegallocAlgorithm
source§impl<'de> Deserialize<'de> for RegallocAlgorithm
impl<'de> Deserialize<'de> for RegallocAlgorithm
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for RegallocAlgorithm
impl PartialEq for RegallocAlgorithm
source§impl Serialize for RegallocAlgorithm
impl Serialize for RegallocAlgorithm
impl Copy for RegallocAlgorithm
impl Eq for RegallocAlgorithm
impl StructuralPartialEq for RegallocAlgorithm
Auto Trait Implementations§
impl Freeze for RegallocAlgorithm
impl RefUnwindSafe for RegallocAlgorithm
impl Send for RegallocAlgorithm
impl Sync for RegallocAlgorithm
impl Unpin for RegallocAlgorithm
impl UnwindSafe for RegallocAlgorithm
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more