rust/src/librustc_trans
Björn Steinbrink 0473a4f1d8 Avoid unnecessary copies of arguments that are simple bindings
Initially MIR differentiated between arguments and locals, which
introduced a need to add extra copies assigning the argument to a
local, even for simple bindings. This differentiation no longer exists,
but we're still creating those copies, bloating the MIR and LLVM IR we
emit.

Additionally, the current approach means that we create debug info for
both the incoming argument (marking it as an argument), and then
immediately shadow it a local that goes by the same name. This can be
confusing when using e.g. "info args" in gdb, or when e.g. a debugger
with a GUI displays the function arguments separately from the local
variables, especially when the binding is mutable, because the argument
doesn't change, while the local variable does.
2017-10-26 12:54:34 +02:00
..
back Introduce CrateDisambiguator newtype and fix tests 2017-10-24 17:49:58 +02:00
debuginfo trans_ -> fully_ prefix 2017-10-21 22:50:21 +01:00
mir Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
abi.rs Avoid unnecessary allocas for indirect function arguments 2017-10-18 12:58:15 +02:00
adt.rs trans_ -> fully_ prefix 2017-10-21 22:50:21 +01:00
allocator.rs
asm.rs
assert_module_sources.rs
attributes.rs
base.rs Introduce CrateDisambiguator newtype and fix tests 2017-10-24 17:49:58 +02:00
build.rs
builder.rs Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
cabi_aarch64.rs
cabi_arm.rs
cabi_asmjs.rs
cabi_hexagon.rs
cabi_mips64.rs
cabi_mips.rs
cabi_msp430.rs
cabi_nvptx64.rs
cabi_nvptx.rs
cabi_powerpc64.rs
cabi_powerpc.rs
cabi_s390x.rs
cabi_sparc64.rs
cabi_sparc.rs
cabi_x86_64.rs
cabi_x86_win64.rs
cabi_x86.rs
callee.rs rustc: Add LLVM nounwind with -C panic=abort 2017-10-11 09:05:38 -07:00
Cargo.toml Bump cc to 1.01 to include x86_64-unknown-linux-gnux32 support 2017-10-11 21:35:53 -03:00
common.rs Move collector to rustc_trans_utils 2017-10-19 11:01:31 +02:00
consts.rs
context.rs trans_ -> fully_ prefix 2017-10-21 22:50:21 +01:00
declare.rs rustc: Add LLVM nounwind with -C panic=abort 2017-10-11 09:05:38 -07:00
diagnostics.rs
glue.rs
intrinsic.rs
lib.rs rustc: Move bytecode compression into codegen 2017-10-21 13:02:34 -07:00
llvm_util.rs introduce a whitelist for aarch64 2017-10-16 13:33:43 +02:00
machine.rs
metadata.rs
meth.rs Wrap vtable_methods return type in RC 2017-10-13 09:34:13 -05:00
partitioning.rs Move collector to rustc_trans_utils 2017-10-19 11:01:31 +02:00
README.md
symbol_names_test.rs
time_graph.rs
trans_item.rs Move collector to rustc_trans_utils 2017-10-19 11:01:31 +02:00
tvec.rs
type_.rs
type_of.rs
value.rs

NB: This crate is part of the Rust compiler. For an overview of the compiler as a whole, see the README.md file found in librustc.

The trans 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.