rust/compiler/rustc_codegen_llvm
bors cc87afd8c0 Auto merge of #142259 - sayantn:simplify-intrinsics, r=workingjubilee
Simplify implementation of Rust intrinsics by using type parameters in the cache

The current implementation of intrinsics have a lot of duplication to handle different overloads of overloaded LLVM intrinsic. This PR uses the **base name and the type parameters** in the cache instead of the full, overloaded name. This has the benefit that `call_intrinsic` doesn't need to provide the full name, rather the type parameters (which is most of the time more available). This uses `LLVMIntrinsicCopyOverloadedName2` to get the overloaded name from the base name and the type parameters, and only uses it to declare the function.

(originally was part of rust-lang/rust#140763, split off later)

`@rustbot` label A-codegen A-LLVM
r? codegen
2025-06-14 16:43:34 +00:00
..
src Auto merge of #142259 - sayantn:simplify-intrinsics, r=workingjubilee 2025-06-14 16:43:34 +00:00
Cargo.toml Bump object 2025-06-05 07:59:51 +08:00
messages.ftl -Zretpoline and -Zretpoline-external-thunk flags (target modifiers) to enable retpoline-related target features 2025-06-09 21:29:59 +07:00
README.md mv compiler to compiler/ 2020-08-30 18:45:07 +03: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.