rust/src/librustc_codegen_llvm
bors b3e7d70ce7 Auto merge of #51583 - cuviper:packed_pair-bool, r=Mark-Simulacrum
Store scalar pair bools as i8 in memory

We represent `bool` as `i1` in a `ScalarPair`, unlike other aggregates,
to optimize IR for checked operators and the like.  With this patch, we
still do so when the pair is an immediate value, but we use the `i8`
memory type when the value is loaded or stored as an LLVM aggregate.

So `(bool, bool)` looks like an `{ i1, i1 }` immediate, but `{ i8, i8 }`
in memory.  When a pair is a direct function argument, `PassMode::Pair`,
it is still passed using the immediate `i1` type, but as a return value
it will use the `i8` memory type.  Also, `bool`-like` enum tags will now
use scalar pairs when possible, where they were previously excluded due
to optimization issues.

Fixes #51516.
Closes #51566.

r? @eddyb
cc @nox
2018-07-10 03:08:47 +00:00
..
back Auto merge of #52109 - michaelwoerister:ir-objs, r=alexcrichton 2018-07-07 14:09:49 +00:00
debuginfo Emit column info in debuginfo for non msvc like targets 2018-07-02 12:16:05 +02:00
mir Auto merge of #51583 - cuviper:packed_pair-bool, r=Mark-Simulacrum 2018-07-10 03:08:47 +00:00
abi.rs Auto merge of #51583 - cuviper:packed_pair-bool, r=Mark-Simulacrum 2018-07-10 03:08:47 +00:00
allocator.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
asm.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
attributes.rs Disable probestack when GCOV profiling is being used 2018-06-20 22:07:55 +01:00
base.rs Auto merge of #51583 - cuviper:packed_pair-bool, r=Mark-Simulacrum 2018-07-10 03:08:47 +00:00
build.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
builder.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
callee.rs std: Ensure OOM is classified as nounwind 2018-05-24 12:03:05 -07:00
Cargo.toml Replace tempdir by tempfile in librustc_trans 2018-06-20 19:28:27 +02:00
common.rs Update Cargo.lock and move size_and_align_of_dst back 2018-07-07 10:52:29 +02:00
consts.rs Do not allow LLVM to increase a TLS's alignment on macOS. 2018-06-30 21:36:03 +08:00
context.rs add simd float intrinsics and gather/scatter 2018-05-24 16:04:39 +02:00
declare.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
diagnostics.rs Add backticks to E0558 2018-06-24 00:16:10 +01:00
glue.rs Update Cargo.lock and move size_and_align_of_dst back 2018-07-07 10:52:29 +02:00
intrinsic.rs Update Cargo.lock and move size_and_align_of_dst back 2018-07-07 10:52:29 +02:00
lib.rs Move time_graph.rs to rustc/util 2018-07-07 10:52:31 +02:00
llvm_util.rs Move llvm_target_features back to llvm_util 2018-07-07 10:55:47 +02:00
metadata.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
meth.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
mono_item.rs Fix some errors 2018-07-07 10:51:54 +02:00
README.md Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
type_.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +03:00
type_of.rs Auto merge of #51583 - cuviper:packed_pair-bool, r=Mark-Simulacrum 2018-07-10 03:08:47 +00:00
value.rs Rename trans to codegen everywhere. 2018-05-17 15:08:30 +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 guide.