Enum RegallocAlgorithm
#[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§
§impl Clone for RegallocAlgorithm
impl Clone for RegallocAlgorithm
§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 more§impl Debug for RegallocAlgorithm
impl Debug for RegallocAlgorithm
§impl<'de> Deserialize<'de> for RegallocAlgorithm
impl<'de> Deserialize<'de> for RegallocAlgorithm
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<RegallocAlgorithm, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<RegallocAlgorithm, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl PartialEq for RegallocAlgorithm
impl PartialEq for RegallocAlgorithm
§impl Serialize for RegallocAlgorithm
impl Serialize for RegallocAlgorithm
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
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,
§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.§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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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