diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-07-03 16:22:32 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-07-03 16:22:32 +0000 |
| commit | bf4daef80cab63ba6d2a0889927e9fce4828c6f9 (patch) | |
| tree | e4ab12af5ec8a439011362587f5b26a7525d446c /src | |
| parent | 9404a1192421c29828167eb6962f5099793619d1 (diff) | |
| download | rust-bf4daef80cab63ba6d2a0889927e9fce4828c6f9.tar.gz rust-bf4daef80cab63ba6d2a0889927e9fce4828c6f9.zip | |
Merge run_fat_lto, optimize_fat and autodiff into run_and_optimize_fat_lto
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/src/lib.rs b/src/lib.rs index 8e63ebc8494..75c36fffec9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -357,11 +357,16 @@ impl WriteBackendMethods for GccCodegenBackend { type ThinData = ThinData; type ThinBuffer = ThinBuffer; - fn run_fat_lto( + fn run_and_optimize_fat_lto( cgcx: &CodegenContext<Self>, modules: Vec<FatLtoInput<Self>>, cached_modules: Vec<(SerializedModule<Self::ModuleBuffer>, WorkProduct)>, + diff_fncs: Vec<AutoDiffItem>, ) -> Result<ModuleCodegen<Self::Module>, FatalError> { + if !diff_fncs.is_empty() { + unimplemented!(); + } + back::lto::run_fat(cgcx, modules, cached_modules) } @@ -391,14 +396,6 @@ impl WriteBackendMethods for GccCodegenBackend { Ok(()) } - fn optimize_fat( - _cgcx: &CodegenContext<Self>, - _module: &mut ModuleCodegen<Self::Module>, - ) -> Result<(), FatalError> { - // TODO(antoyo) - Ok(()) - } - fn optimize_thin( cgcx: &CodegenContext<Self>, thin: ThinModule<Self>, @@ -432,14 +429,6 @@ impl WriteBackendMethods for GccCodegenBackend { ) -> Result<ModuleCodegen<Self::Module>, FatalError> { back::write::link(cgcx, dcx, modules) } - - fn autodiff( - _cgcx: &CodegenContext<Self>, - _module: &ModuleCodegen<Self::Module>, - _diff_functions: Vec<AutoDiffItem>, - ) -> Result<(), FatalError> { - unimplemented!() - } } /// This is the entrypoint for a hot plugged rustc_codegen_gccjit |
