rust/src
Mazdak Farrokhzad da61325bfa
Rollup merge of #64149 - eddyb:llvm-var-names, r=rkruppe
rustc_codegen_llvm: give names to non-alloca variable values.

These names only matter when looking at LLVM IR, but they can help.

When one value is used for multiple variables, I decided to combine the names.
I chose `,` as a separator but maybe `=` or ` ` (space) are more appropriate.
(LLVM names can contain any characters - if necessary they end up having quotes)

As an example, this function:
```rust
#[no_mangle]
pub fn test(a: u32, b: u32) -> u32 {
    let c = a + b;
    let d = c;
    let e = d * a;
    e
}
```
Used to produce this LLVM IR:
```llvm
define i32 @test(i32 %a, i32 %b) unnamed_addr #0 {
start:
  %0 = add i32 %a, %b
  %1 = mul i32 %0, %a
  ret i32 %1
}
```
But after this PR you get this:
```llvm
define i32 @test(i32 %a, i32 %b) unnamed_addr #0 {
start:
  %"c,d" = add i32 %a, %b
  %e = mul i32 %"c,d", %a
  ret i32 %e
}
```

cc @nagisa @rkruppe
2019-09-07 08:06:07 +02:00
..
bootstrap Rollup merge of #64208 - guanqun:py-is-not-none, r=matklad 2019-09-06 19:00:52 +02:00
build_helper rustbuild: allow disabling deny(warnings) for bootstrap 2019-08-27 17:26:54 +02:00
ci Auto merge of #63521 - newpavlov:redox_builder, r=pietroalbini 2019-08-23 08:58:24 +00:00
doc Rollup merge of #64041 - matklad:token-stream-tt, r=petrochenkov 2019-09-05 12:11:11 +02:00
etc std: Remove the wasm_syscall feature 2019-08-28 08:34:31 -07:00
grammar
liballoc Rollup merge of #63684 - GrayJack:const_list_new, r=Centril 2019-08-30 23:08:01 +02:00
libarena
libcore Rollup merge of #64208 - guanqun:py-is-not-none, r=matklad 2019-09-06 19:00:52 +02:00
libfmt_macros flatten rustc_lexer::character_properties module 2019-09-04 15:13:29 +03:00
libgraphviz
libpanic_abort redox: convert to target_family unix 2019-08-06 16:18:23 -06:00
libpanic_unwind
libproc_macro proc_macro: Turn quote into a regular built-in macro 2019-08-27 00:37:13 +03:00
libprofiler_builtins
librustc Rollup merge of #63919 - matthewjasper:remove-gensymmed, r=petrochenkov 2019-09-07 08:06:04 +02:00
librustc_apfloat rustc_apfloat: make the crate #![no_std] explicitly. 2019-08-28 11:24:04 +03:00
librustc_asan Better way of conditioning the sanitizer builds 2019-09-05 00:14:09 -07:00
librustc_ast_borrowck Cleanup: Consistently use Param instead of Arg #62426 2019-08-27 14:07:41 +02:00
librustc_codegen_llvm rustc_codegen_llvm: give names to non-alloca variable values. 2019-09-06 16:57:20 +03:00
librustc_codegen_ssa rustc_codegen_llvm: give names to non-alloca variable values. 2019-09-06 16:57:20 +03:00
librustc_codegen_utils Remove LocalInternedString uses from librustc/ty/. 2019-09-04 14:23:30 +10:00
librustc_data_structures Rollup merge of #62744 - llogiq:tiny-list-refactor, r=eddyb 2019-08-25 02:44:58 +02:00
librustc_driver Auto merge of #63827 - andjo403:out-of-process-rustc-in-rustdoc, r=Mark-Simulacrum 2019-08-30 10:25:26 +00:00
librustc_errors Rollup merge of #64206 - phansch:update_issue_number, r=varkor 2019-09-06 19:00:50 +02:00
librustc_fs_util
librustc_incremental Fix incremental tests 2019-08-23 21:36:57 -04:00
librustc_interface Rollup merge of #63919 - matthewjasper:remove-gensymmed, r=petrochenkov 2019-09-07 08:06:04 +02:00
librustc_lexer fill metadata in rustc_lexer's Cargo.toml 2019-09-05 23:03:50 +03:00
librustc_lint or-patterns: fix fallout from #664128. 2019-09-05 09:17:19 +02:00
librustc_llvm fix a few typos in comments 2019-09-04 23:25:51 +08:00
librustc_lsan Better way of conditioning the sanitizer builds 2019-09-05 00:14:09 -07:00
librustc_macros Handle cfg(bootstrap) throughout 2019-08-14 05:39:53 -04:00
librustc_metadata use TokenStream rather than &[TokenTree] for built-in macros 2019-09-03 21:15:45 +03:00
librustc_mir Rollup merge of #64202 - alexreg:rush-pr-1, r=Centril 2019-09-06 19:00:49 +02:00
librustc_msan Better way of conditioning the sanitizer builds 2019-09-05 00:14:09 -07:00
librustc_passes Cleanup: Consistently use Param instead of Arg #62426 2019-08-27 14:07:41 +02:00
librustc_plugin Restore the rustc_plugin crate in the sysroot 2019-08-20 13:30:50 +02:00
librustc_privacy review comments 2019-08-21 16:11:01 -07:00
librustc_resolve Rollup merge of #63919 - matthewjasper:remove-gensymmed, r=petrochenkov 2019-09-07 08:06:04 +02:00
librustc_save_analysis or-patterns: adjust save_analysis wrt. process_var_decl{_multi}. 2019-09-05 08:33:09 +02:00
librustc_target Add x86_64-linux-kernel target 2019-08-31 17:32:45 -04:00
librustc_traits
librustc_tsan Better way of conditioning the sanitizer builds 2019-09-05 00:14:09 -07:00
librustc_typeck Rollup merge of #64161 - estebank:point-variant, r=Centril 2019-09-06 09:36:42 +02:00
librustdoc Rollup merge of #64175 - GuillaumeGomez:replace-span-when-it-should-be-div, r=Mark-Simulacrum 2019-09-06 09:36:45 +02:00
libserialize Use associated_type_bounds where applicable - closes #61738 2019-08-08 22:39:15 +02:00
libstd Auto merge of #63789 - Wind-River:master, r=alexcrichton 2019-09-06 20:49:20 +00:00
libsyntax Rollup merge of #63919 - matthewjasper:remove-gensymmed, r=petrochenkov 2019-09-07 08:06:04 +02:00
libsyntax_ext Rollup merge of #63919 - matthewjasper:remove-gensymmed, r=petrochenkov 2019-09-07 08:06:04 +02:00
libsyntax_pos Rollup merge of #63919 - matthewjasper:remove-gensymmed, r=petrochenkov 2019-09-07 08:06:04 +02:00
libterm bootstrap: Merge the libtest build step with libstd 2019-08-23 16:46:11 -07:00
libtest Rollup merge of #62600 - emmericp:libtest-add-show-output, r=gnzlbg 2019-08-27 08:17:48 +02:00
libunwind Rollup merge of #63595 - semarie:openbsd-sparc64, r=alexcrichton 2019-08-16 18:22:26 +02:00
llvm-emscripten@7f23313edf
llvm-project@48818e9f5d Update LLVM submodule 2019-08-09 19:17:18 +02:00
rtstartup
rustc
rustllvm
stdarch@4791ba85e7
test Rollup merge of #64149 - eddyb:llvm-var-names, r=rkruppe 2019-09-07 08:06:07 +02:00
tools Rollup merge of #63927 - mark-i-m:filter-spurious, r=ehuss 2019-09-07 08:06:05 +02:00
README.md
stage0.txt Bump to 1.39 2019-08-13 07:16:04 -04:00

This directory contains the source code of the rust project, including:

  • rustc and its tests
  • libstd
  • Various submodules for tools, like rustdoc, rls, etc.

For more information on how various parts of the compiler work, see the rustc guide.

There is also useful content in this README: https://github.com/rust-lang/rust/tree/master/src/librustc/infer/lexical_region_resolve.