Skip to content

Commit 5c3b235

Browse files
authored
Merge branch 'master' into add-clap-3.1.6
2 parents 133a7e3 + 6037bc0 commit 5c3b235

File tree

365 files changed

+202286
-18939
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

365 files changed

+202286
-18939
lines changed

ci/check-profiling.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ test -f results/eprintln-Test-helloworld-Check-Full
129129
test ! -s results/eprintln-Test-helloworld-Check-Full
130130

131131
# llvm-lines. `Debug` not `Check` because it doesn't support `Check` profiles.
132-
# Including both `helloworld` and `futures` benchmarks, as they exercise the
132+
# Including both `helloworld` and `regex` benchmarks, as they exercise the
133133
# zero dependency and the greater than zero dependency cases, respectively, the
134134
# latter of which has broken before.
135135
RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=debug \
@@ -138,12 +138,12 @@ RUST_BACKTRACE=1 RUST_LOG=raw_cargo_messages=trace,collector=debug,rust_sysroot=
138138
--id Test \
139139
--profiles Debug \
140140
--cargo $bindir/cargo \
141-
--include helloworld,futures \
141+
--include helloworld,regex \
142142
--scenarios Full
143143
test -f results/ll-Test-helloworld-Debug-Full
144144
grep -q "Lines.*Copies.*Function name" results/ll-Test-helloworld-Debug-Full
145-
test -f results/ll-Test-futures-Debug-Full
146-
grep -q "Lines.*Copies.*Function name" results/ll-Test-futures-Debug-Full
145+
test -f results/ll-Test-regex-Debug-Full
146+
grep -q "Lines.*Copies.*Function name" results/ll-Test-regex-Debug-Full
147147

148148

149149
#----------------------------------------------------------------------------

collector/benchmarks/README.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,32 @@ They mostly consist of real-world crates.
1919
one in the Rust ecosystem.
2020
- **clap-3.1.6**: A command line argument parser. A crate used by many Rust
2121
programs.
22+
- **image-0.24.1**: Basic image processing functions and methods for
23+
converting to and from various image formats. Used often in graphics
24+
programming.
2225
- **clap-rs**: A command line argument parser. A crate used by many Rust
2326
programs.
2427
- **cranelift-codegen**: The largest crate from a code generator. Used by
2528
Firefox.
29+
- **cranelift-codegen-0.82.1**: The largest crate from a code generator. Used by
30+
wasmtime.
2631
- **diesel**: A type safe SQL query builder. Utilizes the type system to
2732
ensure a lot of invariants. Stresses anything related to resolving
2833
trait bounds, by having a lot of trait impls for a large number of different
2934
types.
30-
- **encoding**: Character encoding support. Contains some large tables.
31-
- **futures**: A futures implementation. Used by many Rust programs.
3235
- **helloworld**: A trivial program. Gives a lower bound on compile time.
3336
- **html5ever**: An HTML parser. Stresses macro parsing code significantly.
3437
- **hyper-2**: A fairly large crate. Utilizes async/await, and used by
3538
many Rust programs.
36-
- **inflate**: An old implementation of the DEFLATE algorithm. Stresses the
37-
compiler in certain ways.
3839
- **piston-image**: A modular game engine. An interesting Rust program.
3940
- **regex**: A regular expression parser. Used by many Rust programs.
4041
- **ripgrep**: A line-oriented search tool. A widely-used utility.
42+
- **ripgrep-13.0.0**: A line-oriented search tool. A widely-used utility.
4143
- **serde**: A serialization/deserialization crate. Used by many other
4244
Rust programs.
4345
- **stm32f4**: A crate that has many thousands of blanket impl blocks.
4446
- **syn**: A library for parsing Rust code. An important part of the Rust
4547
ecosystem.
46-
- **tokio-webpush-simple**: A simple web server built with tokio. Uses futures
47-
a lot.
48-
- **ucd**: A Unicode crate. Contains large statics that
49-
[stress](https://github.com/rust-lang/rust/issues/53643) the borrow checker's
50-
implementation of NLL.
5148
- **unicode_normalization**: Unicode character composition and decomposition
5249
utilities. Uses huge `match` statements that stress the compiler in unusual
5350
ways.
@@ -85,8 +82,8 @@ compiler in interesting ways.
8582
- **issue-88862**: A MCVE of a program that had a
8683
[severe performance regression](https://github.com/rust-lang/rust/issues/88862)
8784
when trying to normalize large opaque types with late-bound regions.
88-
- **keccak**: A cryptography algorithm. Contains a very high number of locals
89-
and basic blocks.
85+
- **keccak**: A cryptography algorithm. Contains a huge function with a very
86+
high number of locals and basic blocks.
9087
- **many-assoc-items**: Contains a struct with many associated items, which
9188
caused [quadratic behavior](https://github.com/rust-lang/rust/issues/68957)
9289
in the past.
@@ -95,11 +92,6 @@ compiler in interesting ways.
9592
one involving
9693
[`exhaustive_patterns`](https://github.com/rust-lang/rust/pull/79394)) of
9794
`match` code that caused bad performance in the past.
98-
- **match-stress-enum**: Contains a match against a huge enum, which used to
99-
have [quadratic runtime](https://github.com/rust-lang/rust/issues/7462).
100-
- **match-stress-exhaustive_patterns**: Contains code extracted from the `syn`
101-
crate to amplify the perf degradation caused by the `exhaustive_patterns`, as
102-
measured [here](https://github.com/rust-lang/rust/pull/79394).
10395
- **projection-caching**: A small program that causes extremely, deeply nested
10496
types which stress the trait system's projection cache. Removing that cache
10597
resulted in hours long compilations for some programs using futures,
@@ -114,6 +106,9 @@ compiler in interesting ways.
114106
with grid coordinates](https://github.com/urschrei/ostn15_phf) that was
115107
causing rustc to [run out of
116108
memory](https://github.com/rust-lang/rust/issues/36799).
109+
- **ucd**: A Unicode crate. Contains large statics that
110+
[stress](https://github.com/rust-lang/rust/issues/53643) the borrow checker's
111+
implementation of NLL.
117112
- **unify-linearly**: Contains many variables that all have equality relations
118113
between them, which caused [exponential
119114
behavior](https://github.com/rust-lang/rust/pull/32062) in the past.
@@ -134,13 +129,21 @@ longest continuous data set for compiler performance. As a result, they are
134129
quite old (e.g. 2017 or earlier), and not necessarily reflective of typical
135130
Rust code being written today.
136131

137-
- **encoding**: See above.
138-
- **futures**: See above.
132+
- **encoding**: An old crate providing character encoding support. Contains
133+
some large tables.
134+
- **futures**: v0.1.0 of the popular `futures` crate, which was used by many
135+
Rust programs. Newer versions of this crate (e.g. v0.3.21 from February 2021)
136+
contain very little code, instead relying on sub-crates. This makes them less
137+
interesting as benchmarks, because we only measure final crate compilation.
138+
This is why there is no futures crate among the primary benchmarks.
139139
- **html5ever**: See above.
140-
- **inflate**: See above.
140+
- **inflate**: An old implementation of the DEFLATE algorithm. Contains
141+
a very large function containing many locals and basic blocks, similar to
142+
`keccak` but less extreme.
141143
- **regex**: See above.
142144
- **piston-image**: See above.
143145
- **style-servo**: An old version of Servo's `style` crate. A large crate, and
144146
one used by old versions of Firefox.
145147
- **syn**: See above.
146-
- **tokio-webpush-simple**: See above.
148+
- **tokio-webpush-simple**: A simple web server built with a very old version
149+
of tokio. Uses futures a lot, but doesn't use `async`/`await`.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"git": {
3+
"sha1": "5b09b74f4c5e0fd817febd3263947ee3682759bd"
4+
},
5+
"path_in_vcs": "cranelift/codegen"
6+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
diff --git a/src/loop_analysis.rs b/src/loop_analysis.rs
2+
index 0e8715ae..4e44b2bd 100644
3+
--- a/src/loop_analysis.rs
4+
+++ b/src/loop_analysis.rs
5+
@@ -163,6 +163,7 @@ impl LoopAnalysis {
6+
domtree: &DominatorTree,
7+
layout: &Layout,
8+
) {
9+
+ println!("testing");
10+
let mut stack: Vec<Block> = Vec::new();
11+
// We handle each loop header in reverse order, corresponding to a pseudo postorder
12+
// traversal of the graph.

0 commit comments

Comments
 (0)