Files
rust/compiler/rustc_codegen_llvm
Jacob Pratt bc54083b65 Rollup merge of #162556 - boomanaiden154:rustc-legacy-pm-refactoring-9-9-26, r=cuviper
Refactor CodeGen Pipeline Setup into a Single Function

This patch refactors setup of the LegacyPassManager for CodeGen into a single function. This simplifies some things (lifetime for the LegacyPM object), but is primarily aimed at enabling rustc to use the new runCodeGenPipeline abstraction (introduced in LLVM 24) which handles all of these details within LLVM and additionally defaults to the NewPM when a target opts-in/the correct LLVM flag is passed.
2026-10-02 01:07:11 -04:00
..
2026-08-31 20:48:05 +02:00
…

The codegen crate contains the code to convert from MIR into LLVM IR, and then from LLVM IR into machine code. In general it contains code that runs towards the end of the compilation process.

For more information about how codegen works, see the rustc dev guide.