rust/src/test/codegen
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
..
auxiliary rustc: Add LLVM nounwind with -C panic=abort 2017-10-11 09:05:38 -07:00
dllimports Ignore test on -windows-gnu. 2016-12-03 15:01:09 -08:00
remap_path_prefix Don't use remapped path when loading modules and include files 2017-09-30 16:32:45 +10:00
abi-main-signature-16bit-c-int.rs rustc: Use 16bit c_int for msp430 2017-09-30 16:30:12 +02:00
abi-main-signature-32bit-c-int.rs rustc: Use 16bit c_int for msp430 2017-09-30 16:30:12 +02:00
abi-sysv64.rs adapt tests 2016-10-25 19:56:36 +02:00
abi-x86-interrupt.rs Remove two obsolete min-llvm-version tests 2017-10-18 07:54:35 -07:00
adjustments.rs Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
align-struct.rs Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
alloc-optimisation.rs Add a no-system-llvm compilecheck header 2017-06-15 19:11:55 +03:00
coercions.rs Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit. 2016-08-24 13:23:37 +03:00
consts.rs Adapt codegen test to new naming scheme for generated symbols. 2016-10-21 18:29:25 -04:00
dealloc-no-unwind.rs std: Mark allocation functions as nounwind 2017-08-28 08:06:52 -07:00
drop.rs Update test/codegen/drop.rs to reflect inconsequential change in basic block ordering. 2017-06-12 13:06:42 +02:00
enum-bounds-check.rs emit an assume that cast-from enums are in range 2016-10-05 14:12:30 +03:00
extern-functions.rs tests: Force instantiation of extern fns. 2016-03-17 21:51:50 +02:00
fastcall-inreg.rs Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
fatptr.rs Avoid FCA loads and extractvalue when copying fat pointers 2015-11-20 21:42:13 +01:00
float_math.rs Fix typo in codegen test 2017-10-07 18:04:23 +02:00
foo.s Add global_asm tests 2017-04-12 19:12:50 -05:00
function-arguments.rs Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
gdb_debug_script_load.rs Avoid loading the whole gdb debug scripts section. 2015-09-21 15:43:52 -05:00
global_asm.rs Add global_asm tests 2017-04-12 19:12:50 -05:00
global_asm_include.rs Add global_asm tests 2017-04-12 19:12:50 -05:00
global_asm_x2.rs Add global_asm tests 2017-04-12 19:12:50 -05:00
internalize-closures.rs Add codegen test to make sure that closures are 'internalized' properly. 2016-07-19 06:22:35 -04:00
intrinsic-no-unnamed-attr.rs Don't add unnamed address attributes to intrinsics. 2015-09-06 19:26:41 -05:00
issue-15953.rs Add tests for issues with the 'E-needtest' label. 2017-03-07 14:01:19 +09:00
issue-32031.rs add a test case for issue #32031 2016-06-12 18:09:38 +02:00
issue-32364.rs adapt tests 2016-10-25 19:56:36 +02:00
issue-34947-pow-i32.rs add test for not optimized pow with constant power 2017-09-02 19:10:00 +03:00
issue-37945.rs Fix some tests for linux gnux32 2017-10-20 13:18:16 -02:00
lifetime_start_end.rs Relax a codegen test to be compatible with LLVM 5.0 2017-07-21 14:15:09 -07:00
likely.rs core: add likely and unlikely intrinsics 2016-09-02 10:29:32 -07:00
link_section.rs Update codegen/link_section.rs. 2016-09-24 21:56:26 -04:00
loads.rs Disable old trans access via -Z orbit, #[rustc_no_mir] or --disable-orbit. 2016-08-24 13:23:37 +03:00
lto-removes-invokes.rs rustc: Implement custom panic runtimes 2016-05-09 08:22:36 -07:00
mainsubprogram.rs Update the codegen/mainsubprogram tests to min-llvm 4.0 2017-10-16 13:10:16 -07:00
mainsubprogramstart.rs Update the codegen/mainsubprogram tests to min-llvm 4.0 2017-10-16 13:10:16 -07:00
match.rs Rebase fixups 2017-02-10 19:47:09 +02:00
mir_zst_stores.rs rustc_trans: do not store pair fields if they are ZSTs. 2017-06-06 21:13:13 +03:00
move-val-init.rs Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
naked-functions.rs rustc_trans: avoid a separate entry BB if START_BLOCK has no backedges. 2017-04-12 20:20:53 +03:00
nounwind.rs rustc: Add LLVM nounwind with -C panic=abort 2017-10-11 09:05:38 -07:00
packed.rs emit !align attributes on stores of operand pairs 2017-03-13 11:52:41 +02:00
panic-abort-windows.rs rustc: Add LLVM nounwind with -C panic=abort 2017-10-11 09:05:38 -07:00
personality_lifetimes.rs remove cleanup branches to the resume block 2017-04-22 21:00:50 +03:00
prefetch.rs Adding support for the llvm prefetch intrinsic 2017-06-01 08:34:16 +02:00
refs.rs Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
slice-init.rs codegen tests: Check type of len argument to llvm.memset.* based on the exact intrinsic used 2017-08-05 04:15:51 +02:00
stack-probes.rs Add a disabled builder for aarch64 emulated tests 2017-07-24 16:24:52 -07:00
stores.rs Avoid unnecessary copies of arguments that are simple bindings 2017-10-26 12:54:34 +02:00
vec-optimizes-away.rs std: Mark Layout::repeat as #[inline] 2017-07-29 09:03:06 -07:00
zip.rs Expand .zip() specialization to .map() and .cloned() 2016-10-17 10:58:21 +02:00