pub struct LlvmCodegenBackend(pub(crate) ());
Tuple Fields§
§0: ()
Implementations§
Source§impl LlvmCodegenBackend
impl LlvmCodegenBackend
pub fn new() -> Box<dyn CodegenBackend>
Trait Implementations§
Source§impl Clone for LlvmCodegenBackend
impl Clone for LlvmCodegenBackend
Source§fn clone(&self) -> LlvmCodegenBackend
fn clone(&self) -> LlvmCodegenBackend
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl CodegenBackend for LlvmCodegenBackend
impl CodegenBackend for LlvmCodegenBackend
Source§fn locale_resource(&self) -> &'static str
fn locale_resource(&self) -> &'static str
Locale resources for diagnostic messages - a string the content of the Fluent resource.
Called before
init
so that all other functions are able to emit translatable diagnostics.fn init(&self, sess: &Session)
fn provide(&self, providers: &mut Providers)
fn print(&self, req: &PrintRequest, out: &mut String, sess: &Session)
fn print_passes(&self)
fn print_version(&self)
fn target_features(&self, sess: &Session, allow_unstable: bool) -> Vec<Symbol>
fn codegen_crate<'tcx>( &self, tcx: TyCtxt<'tcx>, metadata: EncodedMetadata, need_metadata_module: bool, ) -> Box<dyn Any>
Source§fn join_codegen(
&self,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
outputs: &OutputFilenames,
) -> (CodegenResults, FxIndexMap<WorkProductId, WorkProduct>)
fn join_codegen( &self, ongoing_codegen: Box<dyn Any>, sess: &Session, outputs: &OutputFilenames, ) -> (CodegenResults, FxIndexMap<WorkProductId, WorkProduct>)
Source§fn link(
&self,
sess: &Session,
codegen_results: CodegenResults,
outputs: &OutputFilenames,
) -> Result<(), ErrorGuaranteed>
fn link( &self, sess: &Session, codegen_results: CodegenResults, outputs: &OutputFilenames, ) -> Result<(), ErrorGuaranteed>
This is called on the returned
CodegenResults
from join_codegen
Source§fn metadata_loader(
&self,
) -> Box<dyn MetadataLoader + DynSend + DynSync + Send + Sync>
fn metadata_loader( &self, ) -> Box<dyn MetadataLoader + DynSend + DynSync + Send + Sync>
The metadata loader used to load rlib and dylib metadata. Read more
Source§fn supports_parallel(&self) -> bool
fn supports_parallel(&self) -> bool
Returns
true
if this backend can be safely called from multiple threads. Read moreSource§impl ExtraBackendMethods for LlvmCodegenBackend
impl ExtraBackendMethods for LlvmCodegenBackend
fn codegen_allocator<'tcx>( &self, tcx: TyCtxt<'tcx>, module_name: &str, kind: AllocatorKind, alloc_error_handler_kind: AllocatorKind, ) -> ModuleLlvm
Source§fn compile_codegen_unit(
&self,
tcx: TyCtxt<'_>,
cgu_name: Symbol,
) -> (ModuleCodegen<ModuleLlvm>, u64)
fn compile_codegen_unit( &self, tcx: TyCtxt<'_>, cgu_name: Symbol, ) -> (ModuleCodegen<ModuleLlvm>, u64)
This generates the codegen unit and returns it along with
a
u64
giving an estimate of the unit’s processing cost.fn target_machine_factory( &self, sess: &Session, optlvl: OptLevel, target_features: &[String], ) -> TargetMachineFactoryFn<Self>
fn spawn_named_thread<F, T>( time_trace: bool, name: String, f: F, ) -> Result<JoinHandle<T>>
Source§impl WriteBackendMethods for LlvmCodegenBackend
impl WriteBackendMethods for LlvmCodegenBackend
type Module = ModuleLlvm
type ModuleBuffer = ModuleBuffer
type TargetMachine = OwnedTargetMachine
type TargetMachineError = LlvmError<'static>
type ThinData = ThinData
type ThinBuffer = ThinBuffer
fn print_pass_timings(&self)
fn print_statistics(&self)
Source§fn run_link(
cgcx: &CodegenContext<Self>,
dcx: DiagCtxtHandle<'_>,
modules: Vec<ModuleCodegen<Self::Module>>,
) -> Result<ModuleCodegen<Self::Module>, FatalError>
fn run_link( cgcx: &CodegenContext<Self>, dcx: DiagCtxtHandle<'_>, modules: Vec<ModuleCodegen<Self::Module>>, ) -> Result<ModuleCodegen<Self::Module>, FatalError>
Merge all modules into main_module and returning it
Source§fn run_fat_lto(
cgcx: &CodegenContext<Self>,
modules: Vec<FatLtoInput<Self>>,
cached_modules: Vec<(SerializedModule<Self::ModuleBuffer>, WorkProduct)>,
) -> Result<LtoModuleCodegen<Self>, FatalError>
fn run_fat_lto( cgcx: &CodegenContext<Self>, modules: Vec<FatLtoInput<Self>>, cached_modules: Vec<(SerializedModule<Self::ModuleBuffer>, WorkProduct)>, ) -> Result<LtoModuleCodegen<Self>, FatalError>
Performs fat LTO by merging all modules into a single one and returning it
for further optimization.
Source§fn run_thin_lto(
cgcx: &CodegenContext<Self>,
modules: Vec<(String, Self::ThinBuffer)>,
cached_modules: Vec<(SerializedModule<Self::ModuleBuffer>, WorkProduct)>,
) -> Result<(Vec<LtoModuleCodegen<Self>>, Vec<WorkProduct>), FatalError>
fn run_thin_lto( cgcx: &CodegenContext<Self>, modules: Vec<(String, Self::ThinBuffer)>, cached_modules: Vec<(SerializedModule<Self::ModuleBuffer>, WorkProduct)>, ) -> Result<(Vec<LtoModuleCodegen<Self>>, Vec<WorkProduct>), FatalError>
Performs thin LTO by performing necessary global analysis and returning two
lists, one of the modules that need optimization and another for modules that
can simply be copied over from the incr. comp. cache.
unsafe fn optimize( cgcx: &CodegenContext<Self>, dcx: DiagCtxtHandle<'_>, module: &ModuleCodegen<Self::Module>, config: &ModuleConfig, ) -> Result<(), FatalError>
fn optimize_fat( cgcx: &CodegenContext<Self>, module: &mut ModuleCodegen<Self::Module>, ) -> Result<(), FatalError>
unsafe fn optimize_thin( cgcx: &CodegenContext<Self>, thin: ThinModule<Self>, ) -> Result<ModuleCodegen<Self::Module>, FatalError>
unsafe fn codegen( cgcx: &CodegenContext<Self>, dcx: DiagCtxtHandle<'_>, module: ModuleCodegen<Self::Module>, config: &ModuleConfig, ) -> Result<CompiledModule, FatalError>
fn prepare_thin( module: ModuleCodegen<Self::Module>, emit_summary: bool, ) -> (String, Self::ThinBuffer)
fn serialize_module( module: ModuleCodegen<Self::Module>, ) -> (String, Self::ModuleBuffer)
impl Send for LlvmCodegenBackend
impl Sync for LlvmCodegenBackend
Auto Trait Implementations§
impl DynSend for LlvmCodegenBackend
impl DynSync for LlvmCodegenBackend
impl Freeze for LlvmCodegenBackend
impl RefUnwindSafe for LlvmCodegenBackend
impl Unpin for LlvmCodegenBackend
impl UnwindSafe for LlvmCodegenBackend
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> Filterable for T
impl<T> Filterable for T
Source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
Creates a filterable data provider with the given name for debugging. Read more
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 moreSource§impl<P> IntoQueryParam<P> for P
impl<P> IntoQueryParam<P> for P
fn into_query_param(self) -> P
Source§impl<T> MaybeResult<T> for T
impl<T> MaybeResult<T> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
impl<I, T, U> Upcast<I, U> for Twhere
U: UpcastFrom<I, T>,
Source§impl<I, T> UpcastFrom<I, T> for T
impl<I, T> UpcastFrom<I, T> for T
fn upcast_from(from: T, _tcx: I) -> T
Source§impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
impl<Tcx, T> Value<Tcx> for Twhere
Tcx: DepContext,
default fn from_cycle_error( tcx: Tcx, cycle_error: &CycleError, _guar: ErrorGuaranteed, ) -> T
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeSendSync for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 0 bytes