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 dyn PrintBackendInfo, 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
) -> Result<(CodegenResults, FxIndexMap<WorkProductId, WorkProduct>), ErrorGuaranteed>
fn join_codegen( &self, ongoing_codegen: Box<dyn Any>, sess: &Session, outputs: &OutputFilenames ) -> Result<(CodegenResults, FxIndexMap<WorkProductId, WorkProduct>), ErrorGuaranteed>
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>
source§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>>where F: FnOnce() -> T + Send + 'static, T: Send + 'static,
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>,
diag_handler: &Handler,
modules: Vec<ModuleCodegen<Self::Module>>
) -> Result<ModuleCodegen<Self::Module>, FatalError>
fn run_link( cgcx: &CodegenContext<Self>, diag_handler: &Handler, 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>, diag_handler: &Handler, 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>, diag_handler: &Handler, module: ModuleCodegen<Self::Module>, config: &ModuleConfig ) -> Result<CompiledModule, FatalError>
fn prepare_thin( module: ModuleCodegen<Self::Module> ) -> (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 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
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