Fixes #9536
---
From https://github.com/rust-lang/rust/issues/9536#issuecomment-45495670:
I've built rustc with the aforementioned fix, once with MergeFunc being run early (that's what the patch for clang that comes with LLVM does), and once with MergeFunc being run late (using `-C passes=mergefunc`). Here are some time/code size measurements I made with them:
Build command: `rustc -O -o /dev/null --emit asm .../lib.rs`
CPU (user) times, best of three runs:
Crate | No MergeFunc | Early MergeFunc | Late MergeFunc
-------------|--------------|-----------------|---------------
core | 5.380s | 5.476s | 5.364s
collections | 1.884s | 1.856s | 1.892s
native | 7.200s | 7.356s | 7.108s
rustc | 3m23.584s | 3m28.120s | 3m21.820s
std | 13.888s | 13.976s | 13.848s
syntax | 48.992s | 47.752s | 48.372s
Sizes:
Crate | No MergeFunc | Early MergeFunc | Late MergeFunc
-----------------------------------------|-------------:|--------------------:|-------------------:
lib | 237037581 | 236005998 (-0.44%) | 234708744 (-0.98%)
libarena-063bff73-0.11.0-pre.so | 60398 | 60393 (-0.01%) | 60394 (-0.01%)
libcollections-d412c0c4-0.11.0-pre.so | 971566 | 971772 (+0.02%) | 971691 (+0.01%)
libdebug-1e940314-0.11.0-pre.so | 181352 | 181514 (+0.09%) | 181363 (+0.01%)
libflate-92afea7e-0.11.0-pre.so | 137837 | 137869 (+0.02%) | 137837 (+0.00%)
libfmt_macros-5125f3bd-0.11.0-pre.so | 132733 | 134598 (+1.41%) | 132465 (-0.20%)
libgetopts-c94737d1-0.11.0-pre.so | 158851 | 157427 (-0.90%) | 158272 (-0.36%)
libgraphviz-7b3cf89d-0.11.0-pre.so | 53337 | 53178 (-0.30%) | 53337 (+0.00%)
liblog-cd053230-0.11.0-pre.so | 85993 | 86017 (+0.03%) | 85780 (-0.25%)
libnative-1fb5e2c0-0.11.0-pre.so | 635785 | 639352 (+0.56%) | 621184 (-2.30%)
libregex-77385931-0.11.0-pre.so | 450538 | 450741 (+0.05%) | 449504 (-0.23%)
librustc-d252d482-0.11.0-pre.so | 51583741 | 51227703 (-0.69%) | 50930784 (-1.27%)
librustdoc-6ecbf63e-0.11.0-pre.so | 4557104 | 4501896 (-1.21%) | 4394409 (-3.57%)
libserialize-0352aab7-0.11.0-pre.so | 1126096 |
|
||
|---|---|---|
| .. | ||
| compiler-rt@62a4ca6055 | ||
| compiletest | ||
| doc | ||
| driver | ||
| etc | ||
| grammar | ||
| gyp@1e46da1000 | ||
| jemalloc@024c67ad65 | ||
| liballoc | ||
| libarena | ||
| libbacktrace | ||
| libcollections | ||
| libcore | ||
| libcoretest | ||
| libdebug | ||
| libflate | ||
| libfmt_macros | ||
| libfourcc | ||
| libgetopts | ||
| libglob | ||
| libgraphviz | ||
| libgreen | ||
| libhexfloat | ||
| liblibc | ||
| liblog | ||
| libnative | ||
| libnum | ||
| librand | ||
| librbml | ||
| libregex | ||
| libregex_macros | ||
| librlibc | ||
| librustc | ||
| librustc_back | ||
| librustc_llvm | ||
| librustdoc | ||
| librustrt | ||
| librustuv | ||
| libsemver | ||
| libserialize | ||
| libstd | ||
| libsync | ||
| libsyntax | ||
| libterm | ||
| libtest | ||
| libtime | ||
| libunicode | ||
| liburl | ||
| libuuid | ||
| libuv@dec0561d19 | ||
| llvm@90a3141620 | ||
| rt | ||
| rustllvm | ||
| test | ||
| README.md | ||
| snapshots.txt | ||
This is a preliminary version of the Rust compiler, libraries and tools.
Source layout:
| Path | Description |
|---|---|
librustc/ |
The self-hosted compiler |
liballoc/ |
Rust's core allocation library |
libcore/ |
The Rust core library |
libdebug/ |
Debugging utilities |
libstd/ |
The standard library (imported and linked by default) |
libgreen/ |
The M:N runtime library |
libnative/ |
The 1:1 runtime library |
libsyntax/ |
The Rust parser and pretty-printer |
libtest/ |
Rust's test-runner code |
| ------------------- | --------------------------------------------------------- |
libarena/ |
The arena (a fast but limited) memory allocator |
libbacktrace/ |
The libbacktrace library |
libcollections/ |
A collection of useful data structures and containers |
libflate/ |
Simple compression library |
libfmt_macros/ |
Macro support for format strings |
libfourcc/ |
Data format identifier library |
libgetopts/ |
Get command-line-options library |
libglob/ |
Unix glob patterns library |
libgraphviz/ |
Generating files for Graphviz |
libhexfloat/ |
Hexadecimal floating-point literals |
liblibc/ |
Bindings for the C standard library |
liblog/ |
Utilities for program-wide and customizable logging |
libnum/ |
Extended number support library (complex, rational, etc) |
librand/ |
Random numbers and distributions |
libregex/ |
Regular expressions |
libregex_macros/ |
The regex! syntax extension |
libsemver/ |
Rust's semantic versioning library |
libserialize/ |
Encode-Decode types library |
libsync/ |
Concurrency mechanisms and primitives |
libterm/ |
ANSI color library for terminals |
libtime/ |
Time operations library |
liburl/ |
URL handling lirary |
libuuid/ |
UUID's handling code |
| ------------------- | --------------------------------------------------------- |
rt/ |
The runtime system |
rt/rust_*.c |
- Some of the runtime services |
rt/vg |
- Valgrind headers |
rt/msvc |
- MSVC support |
rt/sundown |
- The Markdown library used by rustdoc |
| ------------------- | --------------------------------------------------------- |
compiletest/ |
The test runner |
test/ |
Testsuite |
test/codegen |
- Tests for the LLVM IR infrastructure |
test/compile-fail |
- Tests that should fail to compile |
test/debug-info |
- Tests for the debuginfo tool |
test/run-fail |
- Tests that should compile, run and fail |
test/run-make |
- Tests that depend on a Makefile infrastructure |
test/run-pass |
- Tests that should compile, run and succeed |
test/bench |
- Benchmarks and miscellaneous |
test/pretty |
- Pretty-printer tests |
test/auxiliary |
- Dependencies of tests |
| ------------------- | --------------------------------------------------------- |
librustdoc/ |
The Rust API documentation tool |
libuv/ |
The libuv submodule |
librustuv/ |
Rust libuv support code |
| ------------------- | --------------------------------------------------------- |
llvm/ |
The LLVM submodule |
rustllvm/ |
LLVM support code |
| ------------------- | --------------------------------------------------------- |
etc/ |
Scripts, editors support, misc |
NOTE: This list (especially the second part of the table which contains modules and libraries) is highly volatile and subject to change.