about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/common.rs
AgeCommit message (Collapse)AuthorLines
2022-03-07Auto merge of #94638 - erikdesjardins:noextranull, r=nagisabors-28/+16
cleanup: remove unused ability to have LLVM null-terminate const strings (and the copied function in rustc_codegen_gcc) Noticed this while writing https://github.com/rust-lang/rust/pull/94450#issuecomment-1059687348. r? `@nagisa`
2022-03-07Introduce `ConstAllocation`.Nicholas Nethercote-6/+8
Currently some `Allocation`s are interned, some are not, and it's very hard to tell at a use point which is which. This commit introduces `ConstAllocation` for the known-interned ones, which makes the division much clearer. `ConstAllocation::inner()` is used to get the underlying `Allocation`. In some places it's natural to use an `Allocation`, in some it's natural to use a `ConstAllocation`, and in some places there's no clear choice. I've tried to make things look as nice as possible, while generally favouring `ConstAllocation`, which is the type that embodies more information. This does require quite a few calls to `inner()`. The commit also tweaks how `PartialOrd` works for `Interned`. The previous code was too clever by half, building on `T: Ord` to make the code shorter. That caused problems with deriving `PartialOrd` and `Ord` for `ConstAllocation`, so I changed it to build on `T: PartialOrd`, which is slightly more verbose but much more standard and avoided the problems.
2022-03-06cleanup: remove unused ability to have LLVM null-terminate const stringsErik Desjardins-28/+16
2021-12-16Remove `in_band_lifetimes` from `rustc_codegen_llvm`LegionMammal978-6/+10
See #91867 for more information.
2021-12-09Remove redundant [..]sest31-1/+1
2021-09-09Make `abi::Abi` `Copy` and remove a *lot* of refsAndreas Liljeqvist-1/+1
fix fix Remove more refs and clones fix more fix
2021-09-02rustc_target: move `LayoutOf` to `ty::layout`.Eduard-Mihai Burtescu-2/+3
2021-08-04Replace LLVMConstInBoundsGEP with LLVMConstInBoundsGEP2*Tomasz Miąsko-2/+4
A custom reimplementation of LLVMConstInBoundsGEP2 is used, since the LLVM contains a declaration of LLVMConstInBoundsGEP2 but not the implementation.
2021-07-14consistently treat None-tagged pointers as ints; get rid of some deprecated ↵Ralf Jung-1/+1
Scalar methods
2021-07-14CTFE/Miri engine Pointer type overhaul: make Scalar-to-Pointer conversion ↵Ralf Jung-3/+4
infallible This resolves all the problems we had around "normalizing" the representation of a Scalar in case it carries a Pointer value: we can just use Pointer if we want to have a value taht we are sure is already normalized.
2021-06-28Update other codegens to use tcx managed vtable allocations.Charles Lew-0/+4
2020-12-22Update and improve `rustc_codegen_{llvm,ssa}` docsCamelid-0/+1
These docs were very out of date and misleading. They even said that they codegen'd the *AST*! For some reason, the `rustc_codegen_ssa::base` docs were exactly identical to the `rustc_codegen_llvm::base` docs. They didn't really make sense, because they had LLVM-specific information even though `rustc_codegen_ssa` is supposed to be somewhat generic. So I removed them as they were misleading.
2020-11-04s/Scalar::Raw/Scalar::Intoli-2/+2
2020-11-04Split the "raw integer bytes" part out of `Scalar`Oliver Scherer-4/+4
2020-10-21rustc_codegen_llvm: expose DILocation to rustc_codegen_ssa.Eduard-Mihai Burtescu-0/+1
2020-10-21rustc_codegen_llvm: move DISubprogram creation to a dbg_scope_fn method.Eduard-Mihai Burtescu-0/+1
2020-09-26Remove unused #[allow(...)] statements from compiler/est31-2/+0
2020-08-30mv compiler to compiler/mark-0/+341