Struct rustc_codegen_llvm::LlvmCodegenBackend[−][src]

pub struct LlvmCodegenBackend(());

Implementations

impl LlvmCodegenBackend[src]

pub fn new() -> Box<dyn CodegenBackend>[src]

Trait Implementations

impl Clone for LlvmCodegenBackend[src]

fn clone(&self) -> LlvmCodegenBackend[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl CodegenBackend for LlvmCodegenBackend[src]

fn init(&self, sess: &Session)[src]

fn print(&self, req: PrintRequest, sess: &Session)[src]

fn print_passes(&self)[src]

fn print_version(&self)[src]

fn target_features(&self, sess: &Session) -> Vec<Symbol>[src]

fn metadata_loader(&self) -> Box<MetadataLoaderDyn>[src]

fn provide(&self, providers: &mut Providers)[src]

fn provide_extern(&self, providers: &mut Providers)[src]

fn codegen_crate<'tcx>(
    &self,
    tcx: TyCtxt<'tcx>,
    metadata: EncodedMetadata,
    need_metadata_module: bool
) -> Box<dyn Any>
[src]

fn join_codegen(
    &self,
    ongoing_codegen: Box<dyn Any>,
    sess: &Session
) -> Result<(CodegenResults, FxHashMap<WorkProductId, WorkProduct>), ErrorReported>
[src]

This is called on the returned Box<dyn Any> from codegen_backend Read more

This is called on the returned Box<dyn Any> from join_codegen Read more

fn target_override(&self, _opts: &Options) -> Option<Target>[src]

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

impl ExtraBackendMethods for LlvmCodegenBackend[src]

fn new_metadata(&self, tcx: TyCtxt<'_>, mod_name: &str) -> ModuleLlvm[src]

fn write_compressed_metadata<'tcx>(
    &self,
    tcx: TyCtxt<'tcx>,
    metadata: &EncodedMetadata,
    llvm_module: &mut ModuleLlvm
)
[src]

fn codegen_allocator<'tcx>(
    &self,
    tcx: TyCtxt<'tcx>,
    mods: &mut ModuleLlvm,
    kind: AllocatorKind,
    has_alloc_error_handler: bool
)
[src]

fn compile_codegen_unit(
    &self,
    tcx: TyCtxt<'_>,
    cgu_name: Symbol
) -> (ModuleCodegen<ModuleLlvm>, u64)
[src]

This generates the codegen unit and returns it along with a u64 giving an estimate of the unit’s processing cost. Read more

fn target_machine_factory(
    &self,
    sess: &Session,
    optlvl: OptLevel
) -> TargetMachineFactoryFn<Self>
[src]

fn target_cpu<'b>(&self, sess: &'b Session) -> &'b str[src]

fn tune_cpu<'b>(&self, sess: &'b Session) -> Option<&'b str>[src]

impl WriteBackendMethods for LlvmCodegenBackend[src]

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)[src]

Merge all modules into main_module and returning it

fn run_fat_lto(
    cgcx: &CodegenContext<Self>,
    modules: Vec<FatLTOInput<Self>>,
    cached_modules: Vec<(SerializedModule<Self::ModuleBuffer>, WorkProduct)>
) -> Result<LtoModuleCodegen<Self>, FatalError>
[src]

Performs fat LTO by merging all modules into a single one and returning it for further optimization. Read more

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>
[src]

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>
[src]

unsafe fn optimize_thin(
    cgcx: &CodegenContext<Self>,
    thin: &mut ThinModule<Self>
) -> Result<ModuleCodegen<Self::Module>, FatalError>
[src]

unsafe fn codegen(
    cgcx: &CodegenContext<Self>,
    diag_handler: &Handler,
    module: ModuleCodegen<Self::Module>,
    config: &ModuleConfig
) -> Result<CompiledModule, FatalError>
[src]

fn prepare_thin(
    module: ModuleCodegen<Self::Module>
) -> (String, Self::ThinBuffer)
[src]

fn serialize_module(
    module: ModuleCodegen<Self::Module>
) -> (String, Self::ModuleBuffer)
[src]

fn run_lto_pass_manager(
    cgcx: &CodegenContext<Self>,
    module: &ModuleCodegen<Self::Module>,
    config: &ModuleConfig,
    thin: bool
) -> Result<(), FatalError>
[src]

impl Send for LlvmCodegenBackend[src]

impl Sync for LlvmCodegenBackend[src]

Auto Trait Implementations

impl RefUnwindSafe for LlvmCodegenBackend

impl Unpin for LlvmCodegenBackend

impl UnwindSafe for LlvmCodegenBackend

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.