Struct rustc_codegen_llvm::LlvmCodegenBackend
source · pub struct LlvmCodegenBackend(pub(crate) ());
Tuple Fields
0: ()
Implementations
sourceimpl LlvmCodegenBackend
impl LlvmCodegenBackend
pub fn new() -> Box<dyn CodegenBackend>
Trait Implementations
sourceimpl Clone for LlvmCodegenBackend
impl Clone for LlvmCodegenBackend
sourcefn clone(&self) -> LlvmCodegenBackend
fn clone(&self) -> LlvmCodegenBackend
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl CodegenBackend for LlvmCodegenBackend
impl CodegenBackend for LlvmCodegenBackend
fn init(&self, sess: &Session)
fn provide(&self, providers: &mut Providers)
fn print(&self, req: PrintRequest, 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>
sourcefn join_codegen(
&self,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
outputs: &OutputFilenames
) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorGuaranteed>
fn join_codegen(
&self,
ongoing_codegen: Box<dyn Any>,
sess: &Session,
outputs: &OutputFilenames
) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorGuaranteed>
sourcefn link(
&self,
sess: &Session,
codegen_results: CodegenResults,
outputs: &OutputFilenames
) -> Result<(), ErrorGuaranteed>
fn link(
&self,
sess: &Session,
codegen_results: CodegenResults,
outputs: &OutputFilenames
) -> Result<(), ErrorGuaranteed>
sourcefn target_override(&self, _opts: &Options) -> Option<Target>
fn target_override(&self, _opts: &Options) -> Option<Target>
If this plugin provides additional builtin targets, provide the one enabled by the options here.
Be careful: this is called before init() is called. Read more
sourcefn metadata_loader(&self) -> Box<dyn MetadataLoader + Sync + 'static, Global>
fn metadata_loader(&self) -> Box<dyn MetadataLoader + Sync + 'static, Global>
The metadata loader used to load rlib and dylib metadata. Read more
fn provide_extern(&self, _providers: &mut ExternProviders)
sourceimpl ExtraBackendMethods for LlvmCodegenBackend
impl ExtraBackendMethods for LlvmCodegenBackend
fn codegen_allocator<'tcx>(
&self,
tcx: TyCtxt<'tcx>,
module_name: &str,
kind: AllocatorKind,
has_alloc_error_handler: bool
) -> ModuleLlvm
sourcefn 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. Read morefn target_machine_factory(
&self,
sess: &Session,
optlvl: OptLevel,
target_features: &[String]
) -> TargetMachineFactoryFn<Self>
fn target_cpu<'b>(&self, sess: &'b Session) -> &'b str
fn tune_cpu<'b>(&self, sess: &'b Session) -> Option<&'b str>
fn spawn_thread<F, T>(time_trace: bool, f: F) -> JoinHandle<T>where
F: FnOnce() -> T,
F: Send + 'static,
T: Send + 'static,
fn spawn_named_thread<F, T>(
time_trace: bool,
name: String,
f: F
) -> Result<JoinHandle<T>>where
F: FnOnce() -> T,
F: Send + 'static,
T: Send + 'static,
sourceimpl WriteBackendMethods for LlvmCodegenBackend
impl WriteBackendMethods for LlvmCodegenBackend
type Module = ModuleLlvm
type ModuleBuffer = ModuleBuffer
type Context = Context
type TargetMachine = &'static mut TargetMachine
type ThinData = ThinData
type ThinBuffer = ThinBuffer
fn print_pass_timings(&self)
sourcefn 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
sourcefn 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. Read more
sourcefn 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. Read more
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn 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