-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-codegenArea: Code generationArea: Code generationA-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendA-gccThings relevant to the [future] GCC backendThings relevant to the [future] GCC backendC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
[#50615] Rename librustc_trans
to librustc_codegen_llvm
.
Make rustc_driver
either able to choose codegen backends, or even better, pass rustc_codegen_llvm
to rustc_driver
from rustc-main
.
See also #45226.
Possible refactoring steps:
removeSharedCrateContext
, useTyCtxt
rename(Local)CrateContext
toCodegenContext
, remove accessor methods- [ rustc_codegen_llvm: use safe references for LLVM FFI types. #52461]
mergelibrustc_llvm
intolibrustc_codegen_llvm
passValueRef
as&'ll Value
instead, encode LLVM lifetimes in FFI signaturesuse this technique for C++ objects that borrow others: Tracking issue for RFC 1861: Extern types #43467 (comment)
- use this technique for the
DI*
inheritance hierarchy: Tracking issue for RFC 1861: Extern types #43467 (comment) - use
&'ll Module<'ll>
,&'ll Value<'ll>
,&'ll Type<'ll>
etc. to correctly model lifetime relationships (without an invariant lifetime parameter, very little is actually enforced) - refer to
cranelift
andllvm2cranelift
for common Cranelift/LLVM builder APIs- [rustc_codegen_llvm: traitification of LLVM-specific CodegenCx and Builder methods #55627]
common tools used by SSA backends could be placed inrustc_codegen_ssa
- refactor
rustc_codegen_ssa
APIs to match Cranelift, leave LLVM second-class- unaddressed comments from rustc_codegen_llvm: traitification of LLVM-specific CodegenCx and Builder methods #55627 may be relevant here
- [rustc_codegen_llvm: traitification of LLVM-specific CodegenCx and Builder methods #55627]
- split the metadata, "optimize + generate machine code" (should it be called "
binemit
"?) and linking components, out ofrustc_codegen_ssa
michaelwoerister, sunfishcode, Nemikolh, Ericson2314, denismerigoux and 2 moreEricson2314
Metadata
Metadata
Assignees
Labels
A-codegenArea: Code generationArea: Code generationA-craneliftThings relevant to the [future] cranelift backendThings relevant to the [future] cranelift backendA-gccThings relevant to the [future] GCC backendThings relevant to the [future] GCC backendC-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.