Struct rustc_codegen_llvm::LlvmCodegenBackend
source · 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 + DynSync + DynSend + Sync + Send>
fn metadata_loader( &self, ) -> Box<dyn MetadataLoader + DynSync + DynSend + Sync + Send>
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 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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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<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