about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/consts.rs
AgeCommit message (Collapse)AuthorLines
2021-10-01Fix clippy lintsGuillaume Gomez-9/+9
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-1/+2
2021-08-25improve commentErik Desjardins-1/+1
2021-08-25don't generate partially-undef constsErik Desjardins-9/+13
2021-08-25use undef for uninitialized bytes in constantsErik Desjardins-13/+54
2021-08-23Rename to WrappingRangeAndreas Liljeqvist-5/+2
2021-08-22Use custom wrap-around type instead of RangeAndreas Liljeqvist-2/+7
2021-08-21Always use llvm.used for coverage symbolsNikita Popov-2/+15
This follows what clang does in CoverageMappingGen. Using just llvm.compiler.used is insufficient at least for MSVC targets.
2021-08-16Use llvm.compiler.used insetad of llvm.usedNikita Popov-1/+1
The #[used] attribute explicitly only requires symbols to be retained in object files, but allows the linker to drop them if dead. This corresponds to llvm.compiler.used semantics. The motivation to change this *now* is that https://reviews.llvm.org/D97448 starts emitting #[used] symbols into unique sections with SHF_GNU_RETAIN flag. This triggers a bug in some version of gold, resulting in the ARGV_INIT_ARRAY symbol part of the .init_array section to be incorrectly placed.
2021-07-14consistently treat None-tagged pointers as ints; get rid of some deprecated ↵Ralf Jung-2/+5
Scalar methods
2021-07-14CTFE/Miri engine Pointer type overhaul: make Scalar-to-Pointer conversion ↵Ralf Jung-1/+1
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-05-28Fix static relocation model for PowerPC64Boris-Chengbiao Zhou-6/+3
We now also use `should_assume_dso_local()` for declarations and port two additional cases from clang: - Exclude PPC64 [1] - Exclude thread-local variables [2] [1]: https://github.com/llvm/llvm-project/blob/033138ea452f5f493fb5095e5963419905ad12e1/clang/lib/CodeGen/CodeGenModule.cpp#L1038-L1040 [2]: https://github.com/llvm/llvm-project/blob/033138ea452f5f493fb5095e5963419905ad12e1/clang/lib/CodeGen/CodeGenModule.cpp#L1048-L1050
2021-05-18Set dso_local for more itemsBoris-Chengbiao Zhou-0/+13
2021-02-14Replace const_cstr with cstr crateXidorn Quan-3/+3
2021-02-04Use is_local instead of as_localbjorn3-2/+2
2021-02-02Avoid a hir access inside get_staticbjorn3-56/+24
2020-11-08Collapse all uses of `target.options.foo` into `target.foo`Vadim Petrochenkov-3/+3
with an eye on merging `TargetOptions` into `Target`. `TargetOptions` as a separate structure is mostly an implementation detail of `Target` construction, all its fields logically belong to `Target` and available from `Target` through `Deref` impls.
2020-11-04Auto merge of #78280 - bugadani:span, r=lcnrbors-14/+14
Codegen: Query span as late as possible
2020-10-30Fix even more clippy warningsJoshua Nelson-4/+2
2020-10-27Query span as late as possibleDániel Buga-14/+14
2020-10-15Replace target.target with target and target.ptr_width with target.pointer_widthest31-3/+3
Preparation for a subsequent change that replaces rustc_target::config::Config with its wrapped Target. On its own, this commit breaks the build. I don't like making build-breaking commits, but in this instance I believe that it makes review easier, as the "real" changes of this PR can be seen much more easily. Result of running: find compiler/ -type f -exec sed -i -e 's/target\.target\([)\.,; ]\)/target\1/g' {} \; find compiler/ -type f -exec sed -i -e 's/target\.target$/target/g' {} \; find compiler/ -type f -exec sed -i -e 's/target.ptr_width/target.pointer_width/g' {} \; ./x.py fmt
2020-09-21Rollup merge of #76962 - est31:const_cstr, r=oli-obkRalf Jung-4/+3
Use const_cstr macro in consts.rs
2020-09-20Use const_cstr macro in consts.rsest31-4/+3
2020-09-19Stop using the `const_eval` query for initializers of staticsOliver Scherer-5/+2
As a side effect, we now represent most promoteds as `ConstValue::Scalar` again. This is useful because all implict promoteds are just references anyway and most explicit promoteds are numeric arguments to `asm!` or SIMD instructions.
2020-09-04Change ty.kind to a methodLeSeulArtichaut-1/+1
2020-08-30mv compiler to compiler/mark-0/+512