pub struct EvmCodegenConfig {
pub evm_version: EvmVersion,
pub optimization: OptimizationMode,
pub mir_print_after_each: bool,
pub evm_ir_stack_schedule: bool,
pub evm_ir_layout_passes: bool,
}Expand description
Configuration for the EVM backend.
Fields§
§evm_version: EvmVersionEVM version to target when selecting hardfork-gated opcodes.
optimization: OptimizationModeOptimization mode for MIR passes and bytecode assembly.
mir_print_after_each: boolPrint MIR after each pass before bytecode generation.
evm_ir_stack_schedule: boolRun the experimental EVM IR StackSchedule pass in the assembler bridge.
Off by default: the default bytecode path must stay byte-for-byte
unchanged. When enabled the bridge runs EvmIrPass::StackSchedule on the
operand-cleared block IR. On that already-stack-scheduled input the pass
is a verified near no-op in StructuredAsmProgram::optimize_with_evm_ir.
evm_ir_layout_passes: boolRun EVM IR layout/code-size passes in the assembler bridge.
Implementations§
Source§impl EvmCodegenConfig
impl EvmCodegenConfig
Sourcepub fn from_session(sess: &Session) -> Self
pub fn from_session(sess: &Session) -> Self
Creates backend configuration from a compiler session.
Trait Implementations§
Source§impl Clone for EvmCodegenConfig
impl Clone for EvmCodegenConfig
Source§fn clone(&self) -> EvmCodegenConfig
fn clone(&self) -> EvmCodegenConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EvmCodegenConfig
Source§impl Debug for EvmCodegenConfig
impl Debug for EvmCodegenConfig
Source§impl Default for EvmCodegenConfig
impl Default for EvmCodegenConfig
Source§fn default() -> EvmCodegenConfig
fn default() -> EvmCodegenConfig
Returns the “default value” for a type. Read more
Source§impl From<&Session> for EvmCodegenConfig
impl From<&Session> for EvmCodegenConfig
Auto Trait Implementations§
impl Freeze for EvmCodegenConfig
impl RefUnwindSafe for EvmCodegenConfig
impl Send for EvmCodegenConfig
impl Sync for EvmCodegenConfig
impl Unpin for EvmCodegenConfig
impl UnsafeUnpin for EvmCodegenConfig
impl UnwindSafe for EvmCodegenConfig
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
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>
Converts
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>
Converts
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