rust/src/librustc_trans
bors a9c24fd579 Auto merge of #43488 - Florob:repeat-opt, r=arielb1
Optimize initialization of arrays using repeat expressions

This PR was inspired by [this thread](https://www.reddit.com/r/rust/comments/6o8ok9/understanding_rust_performances_a_newbie_question/) on Reddit.
It tries to bring array initialization in the same ballpark as `Vec::from_elem()` for unoptimized builds.
For optimized builds this should relieve LLVM of having to figure out the construct we generate is in fact a `memset()`.

To that end this emits `llvm.memset()` when:
* the array is of integer type and all elements are zero (`Vec::from_elem()` also explicitly optimizes for this case)
* the array elements are byte sized

If the array is zero-sized initialization is omitted entirely.
2017-08-06 08:09:59 +00:00
..
back Fix some unaligned reads on SPARC in LTO 2017-08-02 09:58:16 -07:00
debuginfo Auto merge of #43221 - MaulingMonkey:natvis-improvements, r=michaelwoerister 2017-07-28 10:25:58 +00:00
mir Auto merge of #43488 - Florob:repeat-opt, r=arielb1 2017-08-06 08:09:59 +00:00
abi.rs Correct the spelling of "homogeneous" 2017-07-21 18:08:40 -07:00
adt.rs Use primitive align for tagged enum fill. 2017-04-22 09:38:23 +10:00
allocator.rs rustc: Implement the #[global_allocator] attribute 2017-07-05 14:37:01 -07:00
asm.rs Expose LLVM appendModuleInlineAsm 2017-04-12 19:12:49 -05:00
assert_module_sources.rs async-llvm(19): Already start LLVM while still translating. 2017-07-31 15:15:09 +02:00
attributes.rs rustc: Implement stack probes for x86 2017-07-06 08:58:19 -07:00
base.rs Auto merge of #43554 - eddyb:apfloat, r=nikomatsakis 2017-08-05 13:12:56 +00:00
build.rs rustc: Add some build scripts for librustc crates 2017-07-22 22:04:13 -07:00
builder.rs Implementation of repr struct alignment RFC 1358. 2017-04-21 07:32:32 +10:00
cabi_aarch64.rs Correct the spelling of "homogeneous" 2017-07-21 18:08:40 -07:00
cabi_arm.rs Support homogeneous aggregates for hard-float ARM 2017-07-27 20:40:24 -07:00
cabi_asmjs.rs Correct the spelling of "homogeneous" 2017-07-21 18:08:40 -07:00
cabi_hexagon.rs Add Hexagon support 2017-04-25 01:56:44 -04:00
cabi_mips64.rs rustc_trans: use ty::layout for ABI computation instead of LLVM types. 2017-04-09 16:06:56 +03:00
cabi_mips.rs rustc_trans: use ty::layout for ABI computation instead of LLVM types. 2017-04-09 16:06:56 +03:00
cabi_msp430.rs rustc_trans: use ty::layout for ABI computation instead of LLVM types. 2017-04-09 16:06:56 +03:00
cabi_nvptx64.rs rustc_trans: use ty::layout for ABI computation instead of LLVM types. 2017-04-09 16:06:56 +03:00
cabi_nvptx.rs rustc_trans: use ty::layout for ABI computation instead of LLVM types. 2017-04-09 16:06:56 +03:00
cabi_powerpc64.rs Correct the spelling of "homogeneous" 2017-07-21 18:08:40 -07:00
cabi_powerpc.rs rustc_trans: use ty::layout for ABI computation instead of LLVM types. 2017-04-09 16:06:56 +03:00
cabi_s390x.rs rustc_trans: use ty::layout for ABI computation instead of LLVM types. 2017-04-09 16:06:56 +03:00
cabi_sparc64.rs Correct the spelling of "homogeneous" 2017-07-21 18:08:40 -07:00
cabi_sparc.rs rustc_trans: use ty::layout for ABI computation instead of LLVM types. 2017-04-09 16:06:56 +03:00
cabi_x86_64.rs rustc_trans: do not treat byval as using up registers. 2017-04-19 02:22:59 +03:00
cabi_x86_win64.rs rustc_trans: use ty::layout for ABI computation instead of LLVM types. 2017-04-09 16:06:56 +03:00
cabi_x86.rs Correct the spelling of "homogeneous" 2017-07-21 18:08:40 -07:00
callee.rs trans: Internalize symbols at the trans-item level, without relying on LLVM. 2017-07-13 13:28:16 +02:00
Cargo.toml async-llvm(24): Improve scheduling and documentation. 2017-07-31 15:15:44 +02:00
collector.rs trans: Make the collector search const fn invocations. 2017-07-20 22:10:36 +02:00
common.rs Auto merge of #43488 - Florob:repeat-opt, r=arielb1 2017-08-06 08:09:59 +00:00
consts.rs rustc_trans: do not pass floating-point values to LLVM through FFI. 2017-08-02 17:28:11 +03:00
context.rs trans: Internalize symbols at the trans-item level, without relying on LLVM. 2017-07-13 13:28:16 +02:00
declare.rs Switch to rust-lang-nursery/compiler-builtins 2017-07-05 07:08:36 -07:00
diagnostics.rs Removed as many "```ignore" as possible. 2017-06-23 15:31:53 +08:00
glue.rs Add unsized tuple coercions. 2017-06-29 21:23:33 +09:00
intrinsic.rs rustc: move the PolyFnSig out of TyFnDef. 2017-06-27 16:39:52 +03:00
lib.rs async-llvm(24): Improve scheduling and documentation. 2017-07-31 15:15:44 +02:00
llvm_util.rs Add support for the Power8 and Power9 features on PowerPC 2017-07-27 13:30:51 +00:00
machine.rs
metadata.rs Thread through the original error when opening archives 2017-07-21 09:44:01 -07:00
meth.rs
monomorphize.rs rustc: move the PolyFnSig out of TyFnDef. 2017-06-27 16:39:52 +03:00
partitioning.rs incr.comp.: Properly incorporate symbol linkage and visibility into CGU hash. 2017-08-02 11:56:23 +02:00
README.md
symbol_names_test.rs cache symbol names in ty::maps 2017-04-26 17:45:02 +03:00
time_graph.rs async-llvm(22): mw invokes mad html skillz to produce graphical LLVM timing reports. 2017-07-31 15:15:44 +02:00
trans_item.rs trans: Internalize symbols at the trans-item level, without relying on LLVM. 2017-07-13 13:28:16 +02:00
tvec.rs trans: Reorder basic blocks in slice_for_each 2017-07-26 16:23:07 +02:00
type_.rs rewrite post-processing routines not to require a CrateContext 2017-04-13 18:33:09 -04:00
type_of.rs Implementation of repr struct alignment RFC 1358. 2017-04-21 07:32:32 +10:00
value.rs