diff options
| author | kennytm <kennytm@gmail.com> | 2018-10-26 18:24:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-10-26 18:24:58 +0800 |
| commit | d83376c70511b2fc12506bb22c3bb02353e028d1 (patch) | |
| tree | 353af037de8376b9dbacb2bee255e5a95e0701e2 /src/rustllvm/RustWrapper.cpp | |
| parent | 4212896dcaf14003579644a058145939078799a1 (diff) | |
| parent | b5336c0b9755f635db4eafba6254e192ee451e6a (diff) | |
| download | rust-d83376c70511b2fc12506bb22c3bb02353e028d1.tar.gz rust-d83376c70511b2fc12506bb22c3bb02353e028d1.zip | |
Rollup merge of #55167 - nnethercote:is_missing_ctors_empty, r=varkor
Add a "cheap" mode for `compute_missing_ctors`. `compute_missing_ctors` produces a vector. It is called a lot, but the vector is almost always only checked for emptiness. This commit introduces a specialized variant of `compute_missing_ctors` (called `is_missing_ctors_empty`) that determines if the resulting set would be empty, and changes the callsite so that `compute_missing_ctors` is only called in the rare cases where it is needed. The code duplication is unfortunate but I can't see a better way to do it. This change reduces instruction counts for several benchmarks up to 2%. r? @varkor
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
