rust/src/librustc_codegen_llvm
Dylan DPC 97f0a9ef8d
Rollup merge of #70226 - RalfJung:checked, r=oli-obk
use checked casts and arithmetic in Miri engine

This is unfortunately pretty annoying because we have to cast back and forth between `u64` and `usize` more often that should be necessary, and that cast is considered fallible.

For example, should [this](https://doc.rust-lang.org/nightly/nightly-rustc/rustc/mir/interpret/value/enum.ConstValue.html) really be `usize`?

Also, `LayoutDetails` uses `usize` for field indices, but in Miri we use `u64` to be able to also handle array indexing. Maybe methods like `mplace_field` should be suitably generalized to accept both `u64` and `usize`?

r? @oli-obk Cc @eddyb
2020-03-25 19:28:08 +01:00
..
back Rollup merge of #70289 - nnethercote:refactor-codegen, r=eddyb 2020-03-24 07:13:42 +01:00
debuginfo normalize some imports, prefer direct ones. 2020-03-24 22:47:23 +01:00
llvm Rollup merge of #69940 - tmiasko:llvm-api, r=hanna-kruppe 2020-03-23 10:29:07 +01:00
abi.rs Don't redundantly repeat field names (clippy::redundant_field_names) 2020-03-06 19:42:18 +01:00
allocator.rs librustc_codegen_llvm: Use slices instead of 0-terminated strings 2020-03-11 08:10:21 +01:00
asm.rs Rollup merge of #69893 - tmiasko:cstr, r=petrochenkov 2020-03-11 14:03:54 +01:00
attributes.rs use direct imports for rustc::{lint, session}. 2020-03-16 02:52:06 +01:00
base.rs Rollup merge of #69940 - tmiasko:llvm-api, r=hanna-kruppe 2020-03-23 10:29:07 +01:00
build.rs Remove licenses 2018-12-25 21:08:33 -07:00
builder.rs use direct imports for rustc::{lint, session}. 2020-03-16 02:52:06 +01:00
callee.rs Add projection query for upstream drop-glue instances. 2020-01-23 16:56:59 +01:00
Cargo.toml Refactorings to begin getting rid of rustc_codegen_utils 2020-03-19 23:14:46 -05:00
common.rs remove redundant returns (clippy::needless_return) 2020-03-20 20:23:03 +01:00
consts.rs librustc_codegen_llvm: Replace deprecated API usage 2020-03-11 23:56:41 +01:00
context.rs Rollup merge of #69940 - tmiasko:llvm-api, r=hanna-kruppe 2020-03-23 10:29:07 +01:00
declare.rs librustc_codegen_llvm: Replace deprecated API usage 2020-03-11 23:56:41 +01:00
intrinsic.rs make bit_width return u64, consistently with other sizes in the compiler 2020-03-25 15:53:52 +01:00
lib.rs Refactorings to begin getting rid of rustc_codegen_utils 2020-03-19 23:14:46 -05:00
llvm_util.rs Invert -Z generate-arange-section. 2020-03-24 12:07:26 +11:00
metadata.rs Rustfmt 2020-02-07 13:59:31 +01:00
mono_item.rs Auto merge of #67886 - Centril:rustc_hir_canon_imports, r=nagisa 2020-01-06 12:55:40 +00:00
README.md rust-lang.github.io/rustc-dev-guide -> rustc-dev-guide.rust-lang.org 2020-03-10 17:08:18 -03:00
type_.rs remove lifetimes that can be elided (clippy::needless_lifetimes) 2020-03-12 20:03:09 +01:00
type_of.rs Format the world 2019-12-22 17:42:47 -05:00
va_arg.rs use conditions directly 2020-03-03 03:46:45 +01:00
value.rs Format the world 2019-12-22 17:42:47 -05: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.